ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Redraw chart after change y-axis range
Posted by Frank on May-26-2017 22:47
Hi Peter,

after long time I have new question. At runtime we will change the y-axis scaling. But I found no way for redraw chart with new y-axis scaling range. For change I use c.yAxis().setLinearScale( yMin, yMax ). But I get every time the chart with first range after drawing. What wrong? What I forgot?

  Re: Redraw chart after change y-axis range
Posted by Peter Kwan on May-27-2017 17:42
Hi Frank,

To change the y-axis scale, simply redraw the chart with a different y-axis scale. In the ChartDirector distribution, there are quite a number of zooming and scrolling examples in which the axis scales would change based on user interactions. The code simply redraws the chart with different axis scales.

Note that redrawing means creating a new XYChart object, not modifying an existing XYChart object that has already been displayed.

Hope this can help.

Regards
Peter Kwan