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

Message ListMessage List     Post MessagePost Message

  Finance Chart - Xaxis - data with different intervals
Posted by gerard is on Dec-16-2010 19:24
Attachments:
Hi there

I am plotting data for a financial index.  Some of the values are spaced at monthly intervals, and some are at daily intervals.

As a result some years take up less space on the x-axis than others.  Is there a way to specify that the years should be spaced evenly?

Regards

Gerard
finchart.jpg

  Re: Finance Chart - Xaxis - data with different intervals
Posted by Peter Kwan on Dec-17-2010 01:49
Hi Gerard,

The FinanceChart object created by ChartDirector is for plotting standard financial charts that can have technical indicators like moving averages, RSI, etc). By definition of technical indicators, all data points must be evenly spaced in the chart, no matter they are evenly spaced in time or not.

For example, in a standard financial chart, if you have data points at Mon, Tue, Wed, Thu, Fri, Mon, Tue, ...., the spacing between Thur and Fri is the same as the spacing between Fri and Mon, even though the actual duration between Fri and Mon is 300% of that between Thur and Fri.

So it is normal that some years will be shorter than other years if those years have less data points.

For your case, there are two methods:

(a) Based on the way you would like them to be drawn, it should be considered as a normal line chart. As no technical indicator can be defined based on this method of drawing the chart, the FinanceChart should not be needed. So instead of using the FinanceChart, may be you can start from the sample code "Uneven Data Points" for your chart type.

or

(b) You may manipulate your data by inserting additional data points in the year with monthly data. For example, if you only have a data point at Jan 1, and another point at Feb 1, you may insert additional daily points in between to interpolate between these two points.

Hope this can help.

Regards
Peter Kwan

  Re: Finance Chart - Xaxis - data with different intervals
Posted by gerard is on Dec-17-2010 01:52
Thank you Peter.

Always so helpful:-)