tags:

views:

1621

answers:

1

I understand that

Scrollbars are only shown when zooming occurs. In other words, even if a scrollbar is enabled, it will only be visible when a view is being displayed.

but then, how do I enable zooming on the Chart Control. I am looking to do this in order to avoid having my Axis-Lables break into two columns after a certain number of values are added to the graph.

+2  A: 

ok, this explains it: http://msdn.microsoft.com/en-us/library/dd456730(VS.100).aspx

In the Chart control for Windows Forms, you can give the chart viewer the flexibility to zoom and scroll the data view by enabling cursors and selections. To do this, use the CursorX and CursorY properties.

You can enable cursors, zooming, and scrolling for the X or Y axes, or both. To enable the cursor in the data view, set the IsUserEnabled property to True. To enable data view selection, use the IsUserSelectionEnabled property to True. Zooming and Scrolling

By default, zooming and scrolling are enabled when you enable data view selection. Use the ScaleView and ScrollBar properties in the chart area's X or Y axis to adjust the look and feel of the scroll bar when it is shown.

To disable zooming, use the Zoomable property found in the respective axis' ScaleView object. To disable scrolling, use the Enabled property found in the respective axis' ScrollBar object.

Sebas