Profile Picture

Zoom tools on chart with several vertical axes

Posted By Ereona 12 Years Ago
Author
Message
Ereona
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
Hello.
I use several vertical axes on NCartesianChart, they are displaying one above the other. And I have the tools for data zooming:

_chartControl.Controller.Tools.Add(new NSelectorTool());
_chartControl.Controller.Tools.Add(new NAxisScrollTool());
_chartControl.Controller.Tools.Add(new NDataPanTool());
_chartControl.Controller.Tools.Add(new NDataZoomTool());

But if I use the zoom tool it is applied only to primary vertical axis (other axes are custom axes). I.e. the zooming rectangle appears only on the part of chart where is primary axis and I cannot zoom other axes. See the attachment. Is it possible to obtain something like WithZoomDesired.png? I tried to use slaves, but result is not as I need.

Attachments
WithoutZoom.png (68 views, 56.00 KB)
WithZoomNow.png (66 views, 55.00 KB)
WithZoomDesired.png (58 views, 180.00 KB)
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Ereona,

It is now quite clear what you want to accomplish can you please elaborate. Following are some suggestions:

1. You can modify the pair of zoom axis where the zoom is applied by changing the horizontal and vertical axis id properties of the range selection object added to the chart:

   chart.RangeSelections.Clear();
   NRangeSelection rs = new NRangeSelection();
   rs.VerticalAxisId = chart.Axis(StandardAxis.SecondaryY).AxisId;
   chart.RangeSelections.Add(new NRangeSelection());

The above code for example creates a range selection that will zoom in the secondary y axis.

2. You cannot zoom two axes that show completely different information simultaneously because they'll have a different range.

Hope this helps - let us know if you meet any problems or have any questions.



Best Regards,
Nevron Support Team



Ereona
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
Thank you for your help.

Ereona
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
One more question. I added range selections for both vertical axes. But now, if I want to zoom the first axis, I see the line in the second axis area (see the attachment). I understand that it's range selection for second axis. Is it possible to hide it in this situation?

Attachments
UnwantedLine.png (61 views, 92.00 KB)
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Ereona,

Most likely you have a slave range selection which is updated when the master range selection is modified - you can workaround this in two ways:

1. You can remove the range selection from the range selection collection.

2. You can set the range selection filling and border to transparent / zero width respectively:

rs.FillStyle = new NColorFillStyle(Color.Transparent);
rs.BorderStyle.Width =
new NLength(0);

Let us know if you meet any problems...



Best Regards,
Nevron Support Team



Ereona
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
Thank you for advice. But I met another problem. I cannot set NRangeSelection appearance via NRangeSelection's properties. It takes the values from NDataZoomTool's fill styles and border styles. Is it possible to set different colors for different zooming range selections on one chart?

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Ereona,

Can you elaborate on what you like to achieve? In particular how do you want the axis of the other plots to behave when a zoom in? You may have to write a custom tool for this purpose...



Best Regards,
Nevron Support Team



Ereona
Posted 12 Years Ago
View Quick Profile
Forum Member

Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)Forum Member (43 reputation)

Group: Forum Members
Last Active: 11 Years Ago
Posts: 43, Visits: 1
The behavior is appropriate. I want to change only the appearance of range selections. I have rectangulars with one color on all axes, the color is set via NDataZoomTool.ZoomInFillStyle property (see DuringZoomActual.png). But I need different colors for different axes (see DuringZoomDezired.png). Is it possible with NDataZoomTool?

Attachments
DuringZoomActual.png (64 views, 52.00 KB)
DuringZoomDesired.png (64 views, 51.00 KB)
Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi Ereona,

Currently you cannot achieve this with the build in functionality, however it can be done if you create a custom drag tool...



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic