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

eblbsuwk  于 5个月前  发布在  Echarts
关注(0)|答案(4)|浏览(109)

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

8yparm6h

8yparm6h1#

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

emeijp43

emeijp432#

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 .

mccptt67

mccptt673#

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

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 null s in the data arrays.

pxq42qpu

pxq42qpu4#

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.

相关问题