|
Custom Scaling on Finance Charts |
Posted by Madhu Khemani on Mar-30-2011 23:26 |
|
Hi Peter,
Any way I can control the vertical scaling of the finance chart to be controlled by the Open-Hi-Lo-Close values only, and ignore the scaling due to the moving averages and other lines included in the graph.
In the attachment example, I would like the vertical scale to begin at 40 minimum.
Thanks,
Madhu
|
Re: Custom Scaling on Finance Charts |
Posted by Peter Kwan on Mar-31-2011 01:20 |
|
Hi Madhu,
You can ask ChartDirector to use any value you like as the minimum value for auto-scaling purposes. For example, you can compute the minimum value using the low values only, and ask ChartDirector to use that value for the purpose of auto-scaling.
In VB/VBScript, the code is like:
'Please modify your existing addMainChart code to store the returned XYChart object
Set m = c.addMainChart(........)
'Ask ChartDirector to use your computed myMinValue for the purpose of auto-scaling
Call m.yAxis().setLinearScale(myMinValue, cd.NoValue)
Note that some of your lines may go outside the plot area, as they are outside the axis scale. If you would like to clip the lines to the plot area, you may use XYChart.setClipping, like:
Call m.setClipping()
Hope this can help.
Regards
Peter Kwan |
Re: Custom Scaling on Finance Charts |
Posted by Madhu Khemani on Mar-31-2011 03:21 |
|
Perfect. Thanks, Peter! |
|