Map Series with user defined colors and text

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Wisco
Newbie
Newbie
Posts: 2
Joined: Fri Mar 12, 2004 5:00 am
Location: Wisconsin
Contact:

Map Series with user defined colors and text

Post by Wisco » Tue Nov 01, 2005 7:51 pm

I can not find a way to work around the map series examples. I can create a map, I can assign values and their related colors. However I can not find a way to create a legend using my palette colors and user assigned text. I want to have a map where I can color code the map polygons, use the colors I assign, and also be able to omit coloring from some of the polygons when confidentiality is needed.
Image

When I use a visible legend, TChart creates it's own legend, and the map adjusts fine - However ---
Image

How can I create a legend with my colors, and my text, and integrate it into the Chart panel?

When I try to use a TChartListbox component, with an non-visible Legend, It causes a lot of problems:

1. TChartListBox does not adjust as the user resizes the screen.
2. The TChartListBox covers part of the map series.
3. I can not find any documentation to color each of the squares a different color as all points belong to the same map series.
4. The color squares also disappear if clicked in the TChartListBox.
Image
Terry Jepson

Pep
Site Admin
Site Admin
Posts: 3295
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Nov 07, 2005 9:57 am

Hi Terry,
How can I create a legend with my colors, and my text, and integrate it into the Chart panel?
I think the best way is to use the ChartListBox component, placing it over the Chart and setting a margin for the Chart (just to not overlap the Chart Series), but in case you do not want to use it, an alternative I can think of is to draw custom legend on the Chart panel using the Canvas techniques exposed into the TeeChart Pro Tutorials (Custom Drawing on the Chart).
When I try to use a TChartListbox component, with an non-visible Legend, It causes a lot of problems:

1. TChartListBox does not adjust as the user resizes the screen.
2. The TChartListBox covers part of the map series.
3. I can not find any documentation to color each of the squares a different color as all points belong to the same map series.
4. The color squares also disappear if clicked in the TChartListBox.
1) This should be solved setting width and height for the ChartListbox
2) This should be solved setting a right margin for the Chart
3) You can see how this is done in the TeeMaps demo, included into the TeeChart Pro installation.
4) Using the same code as in the Demo this does not happens.

Post Reply