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
360
Chart - only 2 of 3 labels appear in legend
posted

I have seen a lot of information on formatting the legend and cannot find anything on what makes something appear in the legend or not. I think it has to do with the 'label' property, since changing that changes the text that appears in the legend.

The issue I face is only 2 of 3 items appear in the legend. The first item, cows, does not appear. Any ideas on how to make it appear in the legend are most welcome. The data appears on the chart just fine.

Thanks!

        Dim seriesImpact As New NumericSeries
        seriesImpact.DataBind(dataSet, 0, "Cows", "Cows")
        seriesImpact.PEs.Add(New PaintElement(Color.Red))
        seriesImpact.Label = "Cows"
        ObjChart.CompositeChart.Series.Add(seriesImpact)

        Dim seriesOccurances As New NumericSeries
        seriesOccurances.DataBind(dataSet, 0, "Serum", "Serum")
        seriesOccurances.PEs.Add(New PaintElement(Color.Purple))
        seriesOccurances.Label = "Dosage"
        ObjChart.CompositeChart.Series.Add(seriesOccurances)

        Dim seriesAHT As New NumericSeries
        seriesAHT.DataBind(dataSet, 0, "Mutation", "Terminal")
        seriesAHT.PEs.Add(New PaintElement(Color.LightBlue))
        seriesAHT.Label = "Variation"
        ObjChart.CompositeChart.Series.Add(seriesAHT) 

  • 360
    Verified Answer
    posted

    I was able to make all the labels appear by increasing the vertical size of the Legend rectangle. I'm not sure why that one label didn't appear and the others did.