[FEATURE] Timeseries scale type

We currently have a time scale. This is a continuous scale. It also would be nice to have a time scale (which I’m calling a “timeseries scale”), which handles discrete time values similar to a category scale.

We’ve gotten numerous requests for this or similar things. E.g. see #2006, #2415, #3107, #3263, #3277, #3297, #3780, #4185, #4343, etc. In particular, it’s currently difficult to utilize bar charts with the time scale.

I’d like this for another use case, which is candlestick charts for stocks. Candlestick charts are essentially bar charts where the bottom of each bar may be greater than 0. For stock charts, we typically specify the days to include on the chart since stocks are not traded on weekends, holidays, etc. and we don’t want empty gaps in the chart. However, I believe this scale should be incorporated into the core library rather than chartjs-chart-financial because it is useful in so many other scenarios like the examples above.

The reason I propose a new scale type rather than using category is that it’s still nice for the scale to have an understanding that you’re working with times. E.g. you cannot have a scale which draws grid lines only on the first of each day, week, month, etc. without a knowledge of time. See #4187 for a more full description of that feature including screenshots.

There should be a lot of code that can be shared between the “time” and “timeseries” scales.

Author: Fantashit

2 thoughts on “[FEATURE] Timeseries scale type

Comments are closed.