Jump to content
Software FX Community

Selection during zooming - is there option to override this functionality?


AlexeyRedko

Recommended Posts

Hello!

There is an issue that I'd like to solve.

When I perfom selection in zoom mode with next settings :

this.Zoom.Mode = ZoomMode.Selection ;

this.Zoom.ViewStyle = ZoomViewStyle.Opacity;this.Zoom.Style = ZoomStyle.Auto;

1) I get selected zoomed area that is limited by pane's bounds.This is good till I have only one pane.Is it possible to cause to selection frame to get the height of plot area? (for example if there are some panes ) 

2) I want to override zoom functionality and instead of zooming to perform my own things (for example if my main axis x is datetime axis so when I make zoom I want to reload data into chart in the datetime range that I choose during selection).Is there anyway to do it?

Link to comment
Share on other sites

2) You can use the Chart.Selection.StartMouseSelection method, you can pass a null template to use our default selection template, we will notify the handler when the selection is finished. The handler receives a MouseSelectionArgs that provides you with the From and To as points, you can use Axis.PixelToValue to convert these coordinates to axis values, MouseSelectionArgs also provides a helper property Markers which will return all the markers selected by the user.

JuanC

Link to comment
Share on other sites

Hello Juan!

First of all thank you ,it works.

There is another question (related to first point that I asked but probably my first question was not clear for you).

When I perfom zoom there is a frame that is drawing on the chart's pane.When I choose these settings for zoom:

Zoom.Mode = ZoomMode.Selection;

.Zoom.ViewStyle = ZoomViewStyle.Selection;

Zoom.Style = ZoomStyle.Auto;

 the chart draws very nice frame that bounded by height of pane .

The only thing I'd like to know if it is possible to override drawing of this frame in such way that its height will be bounded by height of chart's plot area but not by height of pane (if I have some panes the frame will be drawn only on selected pane).

 For example I have some series placed on some panes.All series has only one axis that is datetime axis.So when I want to perform my custom zoom (just choosing new datetime frame and reload new data to chart) I'd like that my selection frame will get height of plot area of chart becuase I want to perfom datetime 'drill in' for all series. 

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...