Pre loader

Empty spaces between records

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

1
0

Please tell me, is it possible to make sure that there is no empty space between records on those days when there is no trading on the stock exchange? It appears that the X-axis is linear and not transactional. How can I make it transactional?

Version
3.1.346
Images
  • You must to post comments
0
0

Yes,

For stock market data you need a different axis type, called the CategoryAxis

Take a look at this: Category Axis documentation.

  • NumericAxis, DateTimeNumericAxis are value axis. this means they measure the x-distance based on value
  • CategoryAxis: measures the x-distance based on index.

Everything in a chart with a CategoryAxis is measured according to the index of the first series. This adds some extra complications, for example:

  • Every series must have the same length (same number of points)
  • Moving averages which have empty points at the start should have values prepended with X=date, Y=NaN

However, if you do that, you will achieve a stock market chart with collapsed values at weekends and overnight.

Take a look particularly at the Creating a CategoryAxis with Financial Data example in the Category Axis documentation. Also see our Multi Pane Stock Charts demo which uses EUR/USD data and a category axis on the XAxis.

Best regards
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.