Joe John
Joe John

Reputation: 1

How can i implement scrollbar in oxyplot and still the zooming working

I am trying to implement a wide Chart using the Oxyplot in silverlight. I am stuck on couple of items. Could anyone help me here.

1) How can I implement horizontal and vertical scrollbars in Oxyplot chart in silverlight? Objo suggest to follow the overlay sample. But a bit more information about that will be more helpful.

2) How to disable auto shrinking up of items when there are lot of items in the linear axis, butstill the zooming should works. The vertical scrollbar should help to see items below.

Upvotes: 0

Views: 1633

Answers (1)

Jose
Jose

Reputation: 1897

You can modify the oxyplot controller to allow you zoom using shift+scroll instead of only scroll. Then you can use the "only scroll" to do other stuff:

var customController = new PlotController();
customController.UnbindMouseWheel();
customController.BindMouseWheel(OxyModifierKeys.Shift,PlotCommands.ZoomWheel);

Then you can bind your controller to your plot in xaml:

<oxy:PlotView Controller="{Binding customController}"/>

Hope it helps.

Upvotes: 2

Related Questions