Open hamza-ae opened 12 months ago
not-a-bug Yes, it's hard to look at a 44K points chart without dataZoom. But improvements can be made:
const data = ... 44K points with plenty of 0 and null...
const data2 = data.filter((item) => item.y && item.y!=0);
option = {
tooltip: {
formatter: (p) => {return p.data.x+' '+p.data.y;},
trigger: 'item' //'axis'
},
dataset: {source: data2},
xAxis: {},
yAxis: {},
series: [
{
type: 'line',
encode:{x:'x', y:'y'},
symbolSize: 2
}
],
dataZoom: [{type: 'slider', filterMode: 'none', xAxisIndex: 0}]
};
Thanks but that's not quite the graph I'm looking for. Only 4% of the dataset is null values, I also noticed that when I browser zoom out, the graph starts looking more as expected, correctly with only a few gaps where the values are actually null:
(Browser zoom out at start and then pinched zoomed in with trackpad)
@Ovilia @helgasoft Sorry to bother but could you have a look at my response above, I do think it is a bug considering the line can look correct by adjusting the browser zoom. Please let me know if I have missed something but in my mind the large gaps in the line should not be present when only 4% of the dataset is null values.
Thank you!
Version
5.4.3
Link to Minimal Reproduction
https://codesandbox.io/s/basic-line-chart-forked-kxw3cm?file=/index.js
Steps to Reproduce
By hovering over the gap areas, the tooltip shows there is data there (mostly 0 values though they should still be displayed on the line). You can also see there is data values present in the data const itself.
Current Behavior
Expected Behavior
There should not be gaps where data is present
Environment
Any additional comments?
No response