Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
190
XamChart using DataPoint Labels in Legend instead of Series Labels
posted

I am populating a XamChart from code.  I have 3 Series that have 3 DataPoints each.  The chart itself is correct, but the legend is not.  Why is the legend showing all the DataPoint labels instead of the 2 series labels?

While in debug mode, I inspected the labels for both the series and DataPoints:

series[0].Label - "Proposed Budget\r\nJul 2010"

series[1].Label - "Proposed Budget\r\nAug 2010"

 

series[0].DataPoints[0].Label - "1-2300-6100"

series[0].DataPoints[1].Label - "1-2300-6110"

series[0].DataPoints[2].Label - "1-2300-6200"

 

series[1].DataPoints[0].Label - "1-2300-6100"

series[1].DataPoints[1].Label - "1-2300-6110"

series[1].DataPoints[2].Label - "1-2300-6200"

I'm attaching a screenshot of my XamChart.  Note that the Legend items match the DataPoint Labels.

 

 

Parents
No Data
Reply
  • 190
    posted

    I figured out the issue.  I had set the Series.DataPointColor = DataPointColor.Different;  Removing that corrected the legend, and now my Series labels are my LegendItems.

Children
No Data