echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Feature] Visualize gaps in charts without needing to explicitly specify nulls in the data

Open jwwlai opened this issue 1 year ago • 4 comments

What problem does this feature solve?

Be able to visualize gaps in charts without needing to specify nulls in the data, especially in Timeseries type charts and the interval can be given.

What does the proposed API look like?

It would be similar to Highcharts's gap feature given the "gapSize" and "gapUnit" option

https://api.highcharts.com/highstock/plotOptions.series.gapSize

jwwlai avatar Aug 23 '24 22:08 jwwlai

By "Timeseries type charts" I assume you mean candlestick. Using candlestick with xAxis.type category requires indeed having nulls for missing data, But using it with xAxis.type time, does not need nulls - Demo image

helgasoft avatar Aug 24 '24 00:08 helgasoft

This feature is called broken-axis and is expected to be introduced in ECharts 6.0, which is expected to be released earlier next year. Please follow #19459 .

Ovilia avatar Aug 26 '24 07:08 Ovilia

By "Timeseries type charts" I assume you mean candlestick. Using candlestick with xAxis.type category requires indeed having nulls for missing data, But using it with xAxis.type time, does not need nulls - Demo image

Thanks for your reply. I would need it for just the basic chart types like "line" and "bar", not "candlestick" unfortunately. By "timeseries", I mean that the x-axis data would just be timestamps. And the other critical part of this feature request, is to not be required to specify the nulls in the data arrays.

jwwlai avatar Aug 26 '24 14:08 jwwlai

The broken-axis will support line / bar series, as long as candlestick. It supports numberic axis like value, time, and log. Category axis is not supported.

You don't need to add null in data, but you do need to define the range of the break.

Ovilia avatar Aug 27 '24 10:08 Ovilia