apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.2k stars 19.61k forks source link

ConnectNulls not connecting to values #9567

Closed Bjodol closed 5 years ago

Bjodol commented 5 years ago

General Questions

In this issue, I have provided information with: 在这个 issue 中我提供了以下信息:

Issue Type

Issue Details

connectNulls:false is not connecting to non-values.

Expected Behavior

Simple modified screenshot to describe expected behaviour image

Even both of the neighbor values are null, there should there be an area beneath the current value.

Current Behavior

Currently only the marker is drawn, and no area is shown beneath it.

image

Online Example

http://jsfiddle.net/2f67q5yu/

Options:

option = {
    xAxis: {
        type: 'category',
        data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
    },
    yAxis: {
        type: 'value'
    },
    series: [{
        data: [null, null, 901, null, null, null, null],
        type: 'line',
        areaStyle:{color: '#ff00ff'}
    }]
};

Topics

Anything Else We Need to Know

Environment

Ovilia commented 5 years ago
  1. You should set connectNulls: true to make it connect nulls
  2. You don't have connectNulls in your demo
  3. It only connects from value to null, which means [null, 1, null, 2] will not have the line from the first data to 1, but will connect between 1 and 2.
Bjodol commented 5 years ago

I don't think you understand what I meant. Given that you have a series of with only one value, and the rest of them null. Then you should still be able to draw that one value. Take the real example where null indicates data loss. Over a time series you have the following: [null, null, null, 100, null, null] (which indicates [dataLoss, dataLoss, dataLoss, DATA!, dataLoss,dataLoss,]) Then you would want to draw the line and area for 100 (DATA!), but not for the rest as you want to highlight that there is no data there. Using connect nulls, will give the user an indication that there actually is data there as the lines would be drawn.

Ovilia commented 5 years ago

@Bjodol Sorry, I can't understand your requirement here.

Even both of the neighbor values are null, there should there be an area beneath the current value.

What does the area mean? And why should it be?

echarts-bot[bot] commented 5 years ago

This issue is closed due to not being active. Please feel free to open it again (for the author) or create a new one and reference this (for others) if you have further questions.