bar chart problem in asp.net chart control
-
2012年3月7日 12:30
hello asp.net chart creators,
plz help see the below image the second %value bar series will not start from 0...how will i make
this kind of chart where 2nd and 3rd bars will start from a datapoint not from 0 and end will a datapoint ?
plz reply....
すべての返信
-
2012年3月7日 12:54モデレータUse a Range Bar Chart for each of the series.
-
2012年3月7日 12:55but i placed 3 range bar but all these 3 bars started from 0..please help by codes.
-
2012年3月7日 12:59モデレータ
A range bar needs two y values for each x value. For example:
Chart1.Series(0).Points.AddXY(1, 2, 3)
Have a look at the Samples Environment for chart control basics.
- 回答としてマーク mridulcs 2012年3月7日 13:13
-
2012年3月7日 13:12
so if my data point was like that -
<asp:DataPoint YValues="40" AxisLabel="companyname1" />
then
Chart1.Series(0).Points.AddXY("companyname1", 20, 40) is same as above data point ? in sample environment i did not find range bar example
-
2012年3月7日 13:38モデレータ
This:
Chart1.Series(0).Points.AddXY("companyname1", 20, 40)is the same as:
<asp:DataPoint Axislabel="companyname1" YValues="20,40" />
The Range Bar example is in the Samples Environment under Content > Chart Types > Range Charts > Range Bar Charts.
-
2012年3月11日 11:18
hi Sipla and every1
i created rangebar the way was said above posts...i set YValues and label from code behind but the label of the bar is shown at the middle of the bar not at right of bar! please reply i want to show labels at right side of range bar.
-
2012年3月12日 14:15モデレータ
Use the BarLabelStyle custom property to specify the position of the label.
Chart1.Series(0)("BarLabelStyle") = "Outside"Note that the label will appear on the left side of the bar if Y1 is bigger than Y2.

