Nevron Forum

Horizontal Bar chart and Data Zoom Tool

https://www.nevron.com/Forum/Topic4456.aspx

By N Rezza - Wednesday, November 10, 2010

Hi!

To create Horizontal Bar chart (Gantt chart) Vertical Bar chart should be rotated by 270 degree.
But Data Zoom Tool for the chart would be rotated too.
So, to zoom in Horizontal Bar chart the user must move mouse cursor from right to left (for other types of charts - from left to right).

Can Data Zoom Tool for Horizontal Bar chart work the same way as for other charts?

Thanks
By Nevron Support - Thursday, November 11, 2010

 Hi,

Yes you have to change the way the range selection treats "up" and "down" directions. For example:

NCartesianChart chart = (NCartesianChart)nChartControl1.Charts[0];
chart.SetPredefinedChartStyle(PredefinedChartStyle.HorizontalLeft);

NBarSeries bar = new NBarSeries();
bar.Values.Add(10);
bar.Values.Add(20);
bar.Values.Add(20);

NRangeSelection rs = new NRangeSelection();
rs.HorizontalAscendingZoom = true;
rs.VerticalAscendingZoom = true;
chart.RangeSelections.Add(rs);
chart.Series.Add(bar);

nChartControl1.Controller.Tools.Add(new NSelectorTool());
nChartControl1.Controller.Tools.Add(new NDataZoomTool());

This feature was added in one of the SP for Vol1 so if HorizontalAscendingZoom / VerticalAscendingZoom  are not recognized by the compiler you'll have to download the component again.

Best Regards,
Nevron Support Team
 

By N Rezza - Thursday, November 11, 2010

Thank you very much!
By N Rezza - Tuesday, November 23, 2010

One more question.
Is it possible to place reset scrollbar button for vertical axis to the bottom?
Now it is on the top of the axis scrollbar.

Thanks
By Nevron Support - Tuesday, November 23, 2010

Hi,

Currently the layout of scrollbar displays the reset button at the scrollbar start only, if this is much needed we can extend the control to place it at the end as well.

By N Rezza - Tuesday, November 23, 2010

It would be great.
We are using different types of chart in the project. For consistency, all chart features (zoom in direction, reset button position, etc.) should be the same.
By Nevron Support - Wednesday, November 24, 2010

Hi,

We just added this feature - will appear as ShowResetButtonAtEnd property of the scrollbar in the next SP :

axis.ScrollBar.ShowResetButtonAtEnd = true;

By N Rezza - Thursday, November 25, 2010

Thank you!