Hello,
I want to display on the X axis in a stepline chart the hours (from 0 to 23) for one day.
like that : 0 1 2 3 4 5 6 7 8 9 10 ... 23
How can i do that?
Thank you in advance.
I think you can still display consecutive values if you set a custom axis range. For example, if the graph spans one day, you can set the following properties:chart.Axis.X.RangeType = AxisRangeType.Custom;chart.Axis.X.RangeMin = DateTime.Parse("4/8/2009").Ticks;chart.Axis.X.RangeMax = DateTime.Parse("4/9/2009").Ticks;chart.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval;chart.Axis.X.TickmarkInterval = 1;chart.Axis.X.TickmarkIntervalType = AxisIntervalType.Hours
This, in addition to setting the label format, should give you consecutive hour values.
Thank you for your response.
If i don't have consecutive hour values, can i force the label to display consecutive hour 0 1 2 3 ... 23?
Thank you in advance
The step line chart displays date values on the x axis, so it's sufficient to specify the proper format for the labels. If you want to display hours only, setchart.Axis.X.Labels.ItemFormatString = "<ITEM_LABEL:hh>"
However, the label itself will be based on the data you assigned to the chart's datasource, so you would need data with consecutive hour values.