scroll goes over numbers when scroll on Yaxes is on the same side as axes
Moderator: Queue Moderators
scroll goes over numbers when scroll on Yaxes is on the same side as axes
When I have scroll on the left and yaxes on the left scroll bar goes over the numbers
-
- Posts: 141
- Joined: Wed Mar 27, 2019 1:05 pm
Re: scroll goes over numbers when scroll on Yaxes is on the same side as axes
Hello,
This happens because the chart doesn't automatically adjust the margins to fit the Y-axis labels, title and the scrollbar.
To make the scrollbar not to overlap the labels, you need to adjust its Offset property:
scrollBar.Offset = new PointIntXY(20, 0);
This will place the bar on the right side of the Y-axis within the graph area.
If you want to have the scrollbar outside the graph (to the left of the axis), you need to manually adjust the margins as well. For example:
scrollBar.Offset = new PointIntXY(-50, 0);
_chart.ViewXY.AxisLayout.AutoAdjustMargins = false;
_chart.ViewXY.Margins = new System.Windows.Thickness(70, 30, 10, 50);
Hope this helps.
Best regards,
Lasse
This happens because the chart doesn't automatically adjust the margins to fit the Y-axis labels, title and the scrollbar.
To make the scrollbar not to overlap the labels, you need to adjust its Offset property:
scrollBar.Offset = new PointIntXY(20, 0);
This will place the bar on the right side of the Y-axis within the graph area.
If you want to have the scrollbar outside the graph (to the left of the axis), you need to manually adjust the margins as well. For example:
scrollBar.Offset = new PointIntXY(-50, 0);
_chart.ViewXY.AxisLayout.AutoAdjustMargins = false;
_chart.ViewXY.Margins = new System.Windows.Thickness(70, 30, 10, 50);
Hope this helps.
Best regards,
Lasse