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

Message ListMessage List     Post MessagePost Message

  clipping in finance chart tracking
Posted by Craig Roberts on Apr-27-2018 07:04
Hello Peter,

I have the same issue as post;

http://www.chartdir.com/forum/download_thread.php?bn=chartdir_support&pattern=clipping&thread=1378836718#N1438162668

but my issue is the main chart is being clipped, but the sub charts are OK. I have added the line of code as per above post.

Regards
Craig Roberts

  Re: clipping in finance chart tracking
Posted by Peter Kwan on Apr-27-2018 12:33
Hi Craig,

The clipping in that post is not related to the code. It is simply because there are insufficient data.

If the user zooms to 1 Jan 2018 to 1 Mar 2018, and the code obtains the data in that range, then the moving average indicators will not appear on the left side. It is because to compute the 14-days moving average on 1 Jan 2018, you need 13 days of data before 1 Jan 2018. So the data should begin from mid Dec 2017. That means the code should obtain more data than the selected range, and in the FinanceChart.setData API, it should specify the number of "extra points" provided.

As most technical indicators are defined using moving averages or requires prior data, they may not display on the left side if there are insufficient data.

For your case, I am not sure how your main chart "clip". The candlesticks, OHLC bars and volume bars should appear from the left side, and they do not require prior data. Moving averages, price bands, etc, can disappear on the left side if there are insufficient data. The amount extra prior data depends on the period of the moving average or the indicator.

If you need further help, would you mind to confirm if your code have provided extra points? Also, it would be useful if you can attach a chart image to allow me determine which part of the main chart is missing.

Regards
Peter Kwan

  Re: clipping in finance chart tracking
Posted by Craig Roberts on Apr-27-2018 13:04
Hello Peter,

sorry Peter, when I say clipping, the top left data looks overridden, as if 2 labels are ontop of each other. The link I posted has it on the subcharts, mine is on the main chart, sub charts ok.

Regards
Craig

  Re: clipping in finance chart tracking
Posted by Peter Kwan on Apr-27-2018 13:10
Hi Craig,

Have you insert the line below before you call addMainChart? If you put it after addMainChart, it may not have any effect to the main chart.

c.setLegendStyle("normal", 8, Chart.Transparent, Chart.Transparent);

Regards
Peter Kwan

  Re: clipping in finance chart tracking
Posted by Craig Roberts on Apr-27-2018 13:19
Thanks Peter, resolved.