This is using Xamarin. I’m displaying a stock market graph.
I have a chart that is made up of 4 series connected together. This lets me color each one differently even
though the whole thing is displayed as one contiguous line chart. I’m trying to insert some blank padding space in between the plotted series and the X and Y axes.
I’ve looked at various methods of doing so and I don’t think any of them will work for my situation. So first of all, “AutoCalculateRange” is set to false on my axes. When the user presses one of the 4 change scale buttons (weekly, monthly, yearly, 5-years) I then call SetRange for both axes. Thus if you were viewing the 5 year scale and hit the yearly scale, the chart changes the ranges to fit a yearly view. Because the actual data never changes, just the range, I can’t pad the range manually using the various techniques I’ve seen.
Is there a way to just change the area in which my line chart is rendered? Here’s an example showing a 5-year view:
Circled in red is the area I’m talking about that I’d like to insert distance between the axes for.
Here’s a yearly view:
You can see that this is really just the 5-year view but with the range shrunk to encapsulate just the most recent year of data (as evidenced by the colors of the 4 series).