|
addSimpleMovingAvg drawing in margin |
Posted by Steve on Jul-14-2011 03:42 |
|
Hi Peter,
I am calling c.addSimpleMovingAvg(50, 0xE60000) in my chart and it is sometimes drawing the line into the margin.
the top margin is set to 5.
I am able to set theClipRect for drawArea objects to fix those issue. But is there a similar solution for the LineLayer created by addSimpleMovingAvg?
Thanks,
Steve
|
Re: addSimpleMovingAvg drawing in margin |
Posted by Peter Kwan on Jul-14-2011 19:00 |
|
Hi Steve,
If the y-axis is auto-scaled by ChartDirector, ChartDirector should choose an axis range such that the line will not go outside the plot area.
For your case, is your code explicitly setting the y-axis range (instead of letting ChartDirector chooses the y-axis range)? If this is the case, your code must have already got the XYChart object that represent the main price chart. You may then call XYChart.setClipping to clip the contents to the plot area. For example:
myMainPriceChart.setClipping();
Hope this can help.
Regards
Peter Kwan |
Re: addSimpleMovingAvg drawing in margin |
Posted by Steve on Jul-15-2011 22:22 |
|
that worked. thanks! |
|