Hello.
You'll find a file attached, it's an example of a dynamic chart.
You can zoom and pan (horizontally).
Problem: depending on unknown circumstances excel may wish to plot some white space either before, after or both before and after the actual data.
The fact that it's not a problem in my code stems from playing with it: sometimes you'll get a decent plot (more or less no white space at the sides) and sometimes you'll get a horrible plot (lots of white spaces either side).
So I thought: since I know the data start and end, I could set the primary axis min and max.
But I can't control them.
Opening in vba any parent that's supposed to contain the charts, results in a chart object of zero childs. It's like the workbook does not have any chart at all!
So I can't access the chart's properties and so I can't explicitly set the axis min/max.
I'm very open to suggestions for this problem. I hope you can help me somehow.
Edit: ok I can't post attachments... right, so... here is a link, it's a zip with the xls in it
You'll find a file attached, it's an example of a dynamic chart.
You can zoom and pan (horizontally).
Problem: depending on unknown circumstances excel may wish to plot some white space either before, after or both before and after the actual data.
The fact that it's not a problem in my code stems from playing with it: sometimes you'll get a decent plot (more or less no white space at the sides) and sometimes you'll get a horrible plot (lots of white spaces either side).
So I thought: since I know the data start and end, I could set the primary axis min and max.
But I can't control them.
Opening in vba any parent that's supposed to contain the charts, results in a chart object of zero childs. It's like the workbook does not have any chart at all!
So I can't access the chart's properties and so I can't explicitly set the axis min/max.
I'm very open to suggestions for this problem. I hope you can help me somehow.
Edit: ok I can't post attachments... right, so... here is a link, it's a zip with the xls in it
Last edited: