Wednesday, 15 February 2012

c# - Custom labels alignment issue - ASP.Net BarChart -



c# - Custom labels alignment issue - ASP.Net BarChart -

i creating chart command chartype bar chart. when adding custom labels, labels not displayed (except first label). happening both x , y axis.

code

chbar.series["series1"].charttype = seriescharttype.bar; chbar.series["series1"].xvaluetype = chartvaluetype.string; chbar.series["series1"].yvaluetype = chartvaluetype.string; chbar.series["series1"]["barlabelstyle"] = "center"; chbar.series["series1"]["drawingstyle"] = "cylinder"; chbar.series["series1"]["pointwidth"] = "0.6"; int xpos = 0; //customlabel xaxis customlabel clabelx; customlabel clabely; foreach(string x in axisxvalues.choices) { clabelx = new customlabel(xpos, xpos + 1, x, xpos, labelmarkstyle.linesidemark); chbar.chartareas[0].axisx.customlabels.add(clabelx); xpos++; } chbar.chartareas[0].axisx.minimum = 0; chbar.chartareas[0].axisx.maximum = 5;

rowindex in custom label constructor should 0.

clabelx = new customlabel(xpos, xpos + 1, x, 0, labelmarkstyle.linesidemark);

c# asp.net .net charts bar-chart

No comments:

Post a Comment