Hello,
I have a data bound Chart with zooming and scrolling enabled. There are lots of points on the chart and since it's a (DateTime) categorical chart, the X axis shows a LOT of ticks.
The problem is that when fully zoomed out (RangeStart = 0.0 and RangeEnd = 1.0), the X-axis ticker labels start to overlap. Is there an event or some other way to adjust the AxisX.LabelStep when zooming in and out ?
I've also attached a screenshot of the problem.
Thanks!
I have a data bound Chart with zooming and scrolling enabled. There are lots of points on the chart and since it's a (DateTime) categorical chart, the X axis shows a LOT of ticks.
chart.DefaultView.ChartArea.ZoomScrollSettingsX.MinZoomRange = range;
chart.DefaultView.ChartArea.ZoomScrollSettingsX.RangeStart = 0.0;
chart.DefaultView.ChartArea.ZoomScrollSettingsX.RangeEnd = range * 2;
chart.DefaultView.ChartArea.ZoomScrollSettingsX.ScrollMode = ScrollMode.ScrollAndZoom;
chart.DefaultView.ChartArea.AxisX.LabelStep = 1;
chart.DefaultView.ChartArea.AxisX.StepLabelLevelCount = 3;
chart.DefaultView.ChartArea.AxisX.MajorGridLinesVisibility = Visibility.Visible;
chart.DefaultView.ChartArea.AxisX.DefaultLabelFormat =
"MMM yyyy"
;
The problem is that when fully zoomed out (RangeStart = 0.0 and RangeEnd = 1.0), the X-axis ticker labels start to overlap. Is there an event or some other way to adjust the AxisX.LabelStep when zooming in and out ?
I've also attached a screenshot of the problem.
Thanks!