Unplanned
Last Updated: 29 Mar 2016 10:36 by ADMIN
ADMIN
Dimitar
Created on: 14 Apr 2015 13:00
Category: ChartView
Type: Bug Report
0
FIX. RadChartView - the last label is not visible when the MajorTickInterval property has specific value.
To reproduce:
LineSeries dailySeries = new LineSeries();
dailySeries.BorderColor = Color.DarkBlue;
dailySeries.BorderWidth = 1;
dailySeries.PointSize = new SizeF(5, 5);
dailySeries.ShowLabels = true;

for (int i = 0; i < 100; i++)
{
    dailySeries.DataPoints.Add(new CategoricalDataPoint(rnd.Next(100), DateTime.Now.AddMonths(i)) { Label = "old" });
}

DateTimeCategoricalAxis categoricalAxis = new DateTimeCategoricalAxis();
categoricalAxis.DateTimeComponent = DateTimeComponent.Date;

categoricalAxis.MajorTickInterval = 10;

categoricalAxis.PlotMode = AxisPlotMode.OnTicks;
categoricalAxis.LabelFormat = "{0:MMM-yy}";
categoricalAxis.ClipLabels = false;
categoricalAxis.LastLabelVisibility = AxisLastLabelVisibility.Visible;

CartesianArea area = this.radChart.GetArea<CartesianArea>();
area.ShowGrid = true;
CartesianGrid grid = area.GetGrid<CartesianGrid>();
grid.DrawHorizontalFills = true;
grid.BorderDashStyle = System.Drawing.Drawing2D.DashStyle.DashDot;

//First assign the axis to the VerticalAxis property and then add the series to the chart
dailySeries.HorizontalAxis = categoricalAxis;

this.radChart.Series.Add(dailySeries);

Workaround: 
Use different value for the MajorTickInterval.
0 comments