Creating custom legend in Map Chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Planoresearch
Newbie
Newbie
Posts: 57
Joined: Thu Jun 02, 2011 12:00 am

Creating custom legend in Map Chart

Post by Planoresearch » Mon Oct 24, 2011 1:28 pm

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 4593 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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Creating custom legend in Map Chart

Post by Narcís » Mon Oct 24, 2011 2:27 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Creating custom legend in Map Chart

Post by Narcís » Mon Oct 24, 2011 2:48 pm

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply