Page 1 of 1

Creating custom legend in Map Chart

Posted: Mon Oct 24, 2011 1:28 pm
by 15659467
Hi Steema Support,
Currently I am working on a project in which I have to display a traffic pattern map. This project is being made in Silverlight and I am using TeeChart .NET 2010. For traffic map I am using Map series of TeeChart. Initially it worked well. But I want to discuss the following tasks:

1. In following figure I have explained our basic requirement of legend. In this Map there are 6 polygons, I defined its color according some values assigned to it. In its legend we display the range as described in figure. Please suggest a way to do this using chart’s default legend.
Untitled.png
Untitled.png (144.11 KiB) Viewed 4628 times
2. Is there any way to highlight the polygon of Map on hovering mouse on any particular?
3. Is there any way to highlight all the polygons when move/hover mouse on a particular legend. Means if we move mouse over red Legend, then all the polygons with red color should be highlighted.

Note: Highlight means here just change the border thickness of any particular polygon.
Any suggestion will be highly appreciated.

Thanks and Regards
Ashish Kr. Pandey

Re: Creating custom legend in Map Chart

Posted: Mon Oct 24, 2011 2:27 pm
by narcis
Hi Ashish,
1. In following figure I have explained our basic requirement of legend. In this Map there are 6 polygons, I defined its color according some values assigned to it. In its legend we display the range as described in figure. Please suggest a way to do this using chart’s default legend.
You could create a custom legend similar to the example Christopher Ireland posted on this thread.
2. Is there any way to highlight the polygon of Map on hovering mouse on any particular?
You should do this manually as well. You can identify which polygon has been hovered with series' Clicked method and custom draw the sort of highlight you want. Here's an example painting a map polygon. This is a TeeChart ActiveX thread but something similar should be done in the .NET version.
3. Is there any way to highlight all the polygons when move/hover mouse on a particular legend. Means if we move mouse over red Legend, then all the polygons with red color should be highlighted.
Yes, once you have identified the color in the legend you can find all polygons having the same color in the map series, using Maps.Shapes[index].Color, and paint them accordingly.

Re: Creating custom legend in Map Chart

Posted: Mon Oct 24, 2011 2:48 pm
by narcis
Hi Ashish,

At this thread you'll find an example closer to the map highlighting you requested. This is a TeeChart VCL example but same applies to the .NET version.