Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2085
Change axis range without changing tick mark values
posted

I have a time-based line series with markers turned on that has one data value per half hour in a 24 hour period starting from midnight.  I have the CategoryDateTimeXAxis Interval property set to 1 hour.  When I graph this, I have a nice set of hour tick labels (00:00, 01:00, 02:00, etc) but I see the markers for the first and last points in the series are cut off by the edge of the chart.  I have attempted to adjust this but adding 15 minutes to the CategoryDateTimeXAxis min/max datetime values, which brings the full marker into view on the chart, but changes tick labels to 15 minute bounds (23:45, 00:45, 1:45, etc).  How can I adjust the min/max just slightly to make the end point markers completely visible and NOT change the tick mark labels?  There is a similar issue on the y-axis.

Attached is an example program, click the "Switch" button to adjust the chart x-axis min/max back and forth and note the x-axis label change.

Due to the way I have a CategoryXAxis and series on that axis over-laying the above CategoryDateTimeXAxis, I cannot simply shift the min/max by the interval time(1 hour), so I need a different option than that.

ShiftingDataChartAxisLabels.zip