Adding labels to series (Horizontal Bar)
Posted: Tue Jun 09, 2015 2:59 pm
Hi,
I have a small sample application in which I create a Horizontal Bar Series.
I use the following code to create it:
horizBar1.Clear();
horizBar1.Add(50);
horizBar1.Add(80);
horizBar1.Add(70);
horizBar1.Add(60);
I want to add labels to the bars like this:
horizBar1.Labels.Clear();
horizBar1.Labels.Add("fifty");
horizBar1.Labels.Add("eighty");
horizBar1.Labels.Add("seventy");
horizBar1.Labels.Add("sixty");
but the labels do not correspond with the bar values: bar with value '50' should correspond with label "fifty".
The result of the above code is: What is the relation of the labels and the bars?
I know you can add the label when you add the data point (horizBar1.Add() method), but at the point where I create the bars, the labels are not known yet and need to be added afterwards.
Thanks for your help.
I have a small sample application in which I create a Horizontal Bar Series.
I use the following code to create it:
horizBar1.Clear();
horizBar1.Add(50);
horizBar1.Add(80);
horizBar1.Add(70);
horizBar1.Add(60);
I want to add labels to the bars like this:
horizBar1.Labels.Clear();
horizBar1.Labels.Add("fifty");
horizBar1.Labels.Add("eighty");
horizBar1.Labels.Add("seventy");
horizBar1.Labels.Add("sixty");
but the labels do not correspond with the bar values: bar with value '50' should correspond with label "fifty".
The result of the above code is: What is the relation of the labels and the bars?
I know you can add the label when you add the data point (horizBar1.Add() method), but at the point where I create the bars, the labels are not known yet and need to be added afterwards.
Thanks for your help.