Hi, I have a problem with charts not being displayed properly and being cropped to the left and right edges as the attached picture suggests. The code I use to construct the chart is as follows:
this
.radChart.View.Margin =
new
Padding(15);
ChartTooltipController toolTipController =
new
ChartTooltipController();
toolTipController.DataPointTooltipTextNeeded += toolTipController_DataPointTooltipTextNeeded;
this
.radChart.Controllers.Add(toolTipController);
this
.radChart.ShowToolTip =
true
;
this
.radChart.ShowPanZoom =
true
;
LineSeries dailySeries =
new
LineSeries();
dailySeries.BorderColor = Color.DarkBlue;
dailySeries.BorderWidth = 1;
dailySeries.PointSize =
new
SizeF(5, 5);
dailySeries.ShowLabels =
true
;
foreach
(var r
in
(from q
in
DailyData orderby q.FIXING_DATE select q))
{
dailySeries.DataPoints.Add(
new
CategoricalDataPoint(r.FIXING, r.FIXING_DATE) { Label =
"old"
});
}
DateTimeCategoricalAxis categoricalAxis =
new
DateTimeCategoricalAxis();
categoricalAxis.DateTimeComponent = DateTimeComponent.Date;
categoricalAxis.MajorTickInterval = 21;
categoricalAxis.PlotMode = AxisPlotMode.OnTicks;
categoricalAxis.LabelFitMode = AxisLabelFitMode.MultiLine;
categoricalAxis.LabelFormat =
"{0:MMM-yy}"
;
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);
Can you pleaase suggest a solution to this problem?
Regards,
George