Financial time series axisSee original GitHub issue
Adding an issue to track based off the discussion at https://github.com/chartjs/Chart.js/pull/6695#discussion_r343698429
Most financial applications such as Yahoo Finance, Trading View, etc. have each data point equally spaced apart. I originally didn’t notice this wasn’t done on the gold high/low example because there were lots of points. But it’s more noticeable when there are fewer points or the points are drawn as candlesticks, ohlc, or bars because you end up with gaps for weekends.
The actual logic is really simple. Each point is just placed on the x-axis by
index / numIndices. (The Chart.js code for this is stupidly over complicated and a terrible example to follow so I wouldn’t even look at it as it would only confuse)
- Created 4 years ago
- Comments:15 (15 by maintainers)