PredefinedChartStyle Horizontal and DataZoomTool problem


Author
Message
Ricardo Sousa
Ricardo Sousa
Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)
Group: Forum Members
Posts: 10, Visits: 1
Hello,

I'm trying to rotate a chart (HorizontalLeft or HorizontalRight) and use DataZoomTool, but it doesn't work.

The only way it makes zoom is if I set one of the ValueSnapper property (Vertical or Horizontal) in the NRangeSelection.

But I want to zoom both.

Any ideas?

To replicate, just use the Nevron.Examples.ChartGallery.Bar.HorizontalBar and add the zoom tool lines:

(chart as NCartesianChart).RangeSelections.Add(new NRangeSelection());
nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NAxisScrollTool());
nChartControl1.Controller.Tools.Add(new NDataZoomTool());


Thanks,
Ricardo
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Ricardo,

The range selection will by default zoom in when the distance from the begin point and the end point produces a positive offset on the x axis and negative offset on the y axis - that is when the range selection starts from [left, top] and goes [bottom, right] on a standard, non rotated cartesian chart.

This is why in the case of the rotated bar the zoom will be when you drag from the [right, top] to the [bottom, left] (in order to produce a negative) value on the y axis. Currently you can workaround this by using the AlwaysZoomIn property of the data zoom tool:

NDataZoomTool dzt = new NDataZoomTool();
dzt.AlwaysZoomIn = true;
nChartControl1.Controller.Tools.Add(dzt);

We've also added two properties to the range selection that allow you to modify the direction of the zoom.

NRangeSelection rangeSelection = new NRangeSelection();
rangeSelection.HorizontalAscendingZoom = true;
rangeSelection.VerticalAscendingZoom = true;

these two properties will be available in the next SP (probably at the end of this week).



Best Regards,
Nevron Support Team


Ricardo Sousa
Ricardo Sousa
Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)Junior Member (10 reputation)
Group: Forum Members
Posts: 10, Visits: 1
Thanks
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search