This question is locked. New answers and comments are not allowed.
i have a chart with dates on X-axis , Chart is bound to a dataSource and there are 700 items .
with the default settings all the dates are displayed as labels and there is a overlap of labels on X-axis.
what i want to do is have only three labels on x-axis.
1) at start i.e Min of Dates (the x-axis starts from here)
2) at end i.e Max of Dates (the x-axis Ends here)
3) at the middle (approximately) (between the min and max date)
in Chart wizard, labels can be added to axis manually . but it only accepts INT's.
How can i achieve this with dates?
below is the code generated by the designer while adding labels manually for INT Data types
with the default settings all the dates are displayed as labels and there is a overlap of labels on X-axis.
what i want to do is have only three labels on x-axis.
1) at start i.e Min of Dates (the x-axis starts from here)
2) at end i.e Max of Dates (the x-axis Ends here)
3) at the middle (approximately) (between the min and max date)
in Chart wizard, labels can be added to axis manually . but it only accepts INT's.
How can i achieve this with dates?
below is the code generated by the designer while adding labels manually for INT Data types
Telerik.Charting.ChartAxisItem chartAxisItem1 = new Telerik.Charting.ChartAxisItem(); | |
Telerik.Charting.ChartAxisItem chartAxisItem2 = new Telerik.Charting.ChartAxisItem(); | |
Telerik.Charting.ChartAxisItem chartAxisItem3 = new Telerik.Charting.ChartAxisItem(); | |
chartAxisItem1.Value = new decimal(new int[] {1, 0,0,0}); | |
chartAxisItem2.Value = new decimal(new int[] {6,0,0,0}); | |
chartAxisItem3.Value = new decimal(new int[] {11,0,0,0}); | |
this.radChart1.PlotArea.XAxis.Items.AddRange(new Telerik.Charting.ChartAxisItem[] { | |
chartAxisItem1, | |
chartAxisItem2, | |
chartAxisItem3}); |