none
bar chart problem in asp.net chart control

    Pregunta

  • 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....

    miércoles, 07 de marzo de 2012 12:30

Respuestas

Todas las respuestas

  • Use a Range Bar Chart for each of the series.
    miércoles, 07 de marzo de 2012 12:54
    Moderador
  • but i placed 3 range bar but all these 3 bars started from 0..please help by codes.
    miércoles, 07 de marzo de 2012 12:55
  • 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.

    • Marcado como respuesta mridulcs miércoles, 07 de marzo de 2012 13:13
    miércoles, 07 de marzo de 2012 12:59
    Moderador
  • 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

    miércoles, 07 de marzo de 2012 13:12
  • 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.

    miércoles, 07 de marzo de 2012 13:38
    Moderador
  • 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.

    domingo, 11 de marzo de 2012 11:18
  • 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.

    lunes, 12 de marzo de 2012 14:15
    Moderador