This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I have a chart that shows some values using the DoubleTimeSeries class. I've been requested to modify the chart legend to display the current values (the last item in the list) next to the values name (e.g. "Waste Pressure (10.15)"). I can't seem to find any binding for the legend display name. Any idea how to accomplish this? Thanks! |
|
|
Hi Nelson, To customize the display of the legend items, you'll need to create a custom legend style. This is very simple and you can see an example of how to do this in the Sample Explorer app. In the sample explorer, go to the Charts page, then under the Feature category, click the "Custom Chart Style" link. In this sample, click the round "<>" button in the bottom right corner of the window to see the xaml code. From this code copy the LegendItemTemplate and LegendStyle resources into your app. In the LegendItemTemplate, change the binding of the Text of the TextBlock to be whatever you need. The data context has a property called DataSeries which will give you the series the legend item is for. Please let me know if you need further explanation about any of this. -Jason Fauchelle |
|