Is there any AutoScale function for axes?

Oct 3, 2009 at 1:15 AM


I'm new to D3 and I couldn't find a way to auto scale axes. I thought "fit to view" was doing that; I mean the axes were automatically scaled to fit the all shapes in plotter. We are using ZedGraph and there is an AxisChange method on GraphControl which does that. I searched the posted threads and seen that the this is done manually by setting the appropriate DataRect to the Plotter.Viewport.Visible.

But we need this to be done automatically. Is this possible?

Thanks in advance

Oct 14, 2009 at 3:02 PM


if you have something inside plotter that has a content bounds (e.g., line chart or marker chart), viewport will respect their content bounds and FotToView method will set to Visible such a rectangle that contains all charts' data.

Also you can manually set the visible area of plotter using its plotter.Visible property.