I have 3DScatterChart. And I am working on zooming surface chart. I am using C++ surfacechartRotation demo. Now I can zoom in or out to chart by axis scale. After narrowing the scale of the axis a narrower scale is shown so I can see zoomed chart. For zoom out I do opposite of this method. After zoom out I can only see chart that highlighted with green lines. But I want to extend the surface to the boundaries as in the photo. Can you suggest a way for solve this problem?
From my understand of your enquiry, the attached chart is what you want after zooming out.
After zoom in and then zoom out, does the y-axis show -100 to 100, and the x-axis show 1000-16000? The axis scales are set by your code, so no matter what is displayed, the axis scale should still be those values. Is this the case?
Would you mind to attached a chart image that shows what you see after zooming out?
Range of X-axis and Y-axis changes after mouse wheel move. I attached three chart images and first image is original view, second image is after once zoom out, third image is after twice zoom out. As you can see the surface is center of chart. I want to extend this surface until borders.
In the second chart, I see that the y-axis from -20 to 120, but the data points are from y = 0 to 100. If you want the surface to be from -20 to 120, you would need to provide the data points for y=-20 to y=120. Otherwise ChartDirector cannot draw the surface from y = -20 to 120.
In brief, to extend the surface, you would need to extend your data points.
According to your suggestion, I extend surfaceChart when I do zooming in ( because I you described above, it is not logical to extend it when doing zooming out). For zooming in, I am changing linear scale. Here is my data set;
In setLinearScale, if your code leaves out the third parameter (the tick increment), ChartDirector may adjust the lowerLimit and upperLimit to the next label position. This ensures the axis starts and ends at a label position. See:
For your case, because 1250 is not a label position, it is adjusted to the nearest label position 1000. Similarly, 5750 is adjusted to 6000. If you use Axis.setRounding(false, false), ChartDirector will no longer adjust the axis scale.