Skip to main content
Home Forums Silverlight Programming Silverlight Controls and Silverlight Toolkit Customizing Lineseries Legend
2 replies. Latest Post by weeser on July 2, 2009.
(0)
weeser
Member
133 points
96 Posts
06-24-2009 12:03 PM |
Greetings,
I was wondering how you could edit the legend of a lineseries to display custom data. For example, i have 4 line series that act as limits on the chart so they are just solid straight lines. In the legend, i would like to have the label and value for each of those lines....i.e. ( UpperLimit1 Value = 5 )...something like that anyways, a label, then value. Any help/guidance would be great!
Thanks
David Anson
Participant
1718 points
212 Posts
06-27-2009 3:41 AM |
Two possible suggestions:
1. Manually add the content you want to the Legend (possibly via a custom Template for Chart). Chart should leave your stuff alone when it adds/removes series entries.
2. Override DataPointSeries.CreateLegendItem to provide your own custom LegendItems. (Unfortunately, because the classes are all sealed for the time being, this would require building your own DLL and unsealing them.)
Hope this helps!
07-02-2009 11:16 AM |
David,
Do you have some sample code, or guidance regaurding number one? I dont know how to edit the legend in the chart template.