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

Message ListMessage List     Post MessagePost Message

  how many bars allowed?
Posted by jef on Nov-26-2024 06:31
try to plot a number of hi/low bars and when I went from 5 to 10 items on x-axis I get an error from chartdir. Is there a limit to number of x axis bars or does scroll enable if more?

  Re: how many bars allowed?
Posted by Peter Kwan on Nov-26-2024 17:49
Hi jef,

There is no built-in limit to the number of hi/low bars. In practice, it is limited by your computer resource (eg. the amount of memory). In a normal computer, you can easily plot millions of hi/low bars without any issue.

I am not sure what type of "hi/low bars" you are plotting. Sometimes the open/high/low/close bar in a finance chart can be called a high/low bar. The box-whisker symbol also is sometimes used for high/low bars. The ChartDirector sample code includes examples of these chart types with more than 5 bars and they work fine.

If your code works with 5 bars, but not 6 bars, the most common reason is memory corruption. In C++, the programmer needs to manage memory allocation. May be you can check if your code has allocated enough memory for your data.

Best Regards
Peter Kwan

  Re: how many bars allowed?
Posted by jef on Dec-18-2024 04:59
thanks, I figured it out by using c->xAxis()->setLinearScale(0, nalt, 1); where nalt was number of items. it then compressed the x axis to fit everything (my max is 50).