Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Scatter chart data points lost one. #18656

Closed
katherinebai opened this issue May 23, 2023 · 3 comments · Fixed by #18867
Closed

[Bug] Scatter chart data points lost one. #18656

katherinebai opened this issue May 23, 2023 · 3 comments · Fixed by #18867
Labels

Comments

@katherinebai
Copy link

katherinebai commented May 23, 2023

Version

5.4.2

Link to Minimal Reproduction

https://echarts.apache.org/examples/zh/editor.html?c=line-simple&version=5.4.2

Steps to Reproduce

The following series data has five points, but now only show four points. And version 4.7 does exist this issue.

Click to view the full demo code
option = {
   "series":[
      {
         "name":"整数",
         "type":"scatter",
         "data":[
            {
               "value":[
                  "2017-12-31T16:00:00.000Z",
                  1
               ]
            },
            {
               "value":[
                  "2018-01-01T16:00:00.000Z",
                  3
               ]
            },
            {
               "value":[
                  "2018-01-02T16:00:00.000Z",
                  2
               ]
            },
            {
               "value":[
                  "2018-01-03T16:00:00.000Z",
                  4
               ]
            },
            {
               "value":[
                  "2018-01-04T16:00:00.000Z",
                  5
               ]
            }
         ],
         "itemStyle":{
            "color":"#4F81BD",
            "opacity":1,
            "borderColor":"#4F81BD",
            "borderWidth":1,
            "borderType":"solid"
         },
         "showAllSymbol":true,
         "connectNulls":false,
         "lineStyle":{
            "color":"#4F81BD",
            "width":1,
            "type":"solid"
         },
         "symbol":"circle"
      }
   ],
   "xAxis":{
      "show":true,
      "type":"time",
      "axisLine":{
         "show":true,
         "lineStyle":{
            "color":"#000000",
            "width":1,
            "type":"solid"
         }
      },
      "axisLabel":{
         "show":true,
         "rotate":0,
         "textStyle":{
            "color":"#000000",
            "fontFamily":"'SimSun'",
            "fontSize":14.67,
            "fontStyle":"Normal",
            "fontWeight":400
         }
      },
      "splitLine":{
         "show":false
      }
   },
   "yAxis":{
      "show":true,
      "type":"value",
      "axisLine":{
         "show":true,
         "lineStyle":{
            "color":"#000000",
            "width":1,
            "type":"solid"
         }
      },
      "axisLabel":{
         "show":true,
         "rotate":0,
         "textStyle":{
            "color":"#000000",
            "fontFamily":"'SimSun'",
            "fontSize":14.67,
            "fontStyle":"Normal",
            "fontWeight":400
         }
      },
      "max":6,
      "min":0,
      "splitNumber":6
   }
};

Current Behavior

image

Expected Behavior

image

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

@echarts-bot echarts-bot bot added en This issue is in English pending We are not sure about whether this is a bug/new feature. labels May 23, 2023
@helgasoft
Copy link

yes, looks like a bug. On resize the first or last point (or both) may disappear.
Workaround is to add min/max to xAxis:

xAxis: {
    min: '2017-12-31T14:00:00.000Z',
    max: '2018-01-04T17:00:00.000Z'
}

@katherinebai
Copy link
Author

I add the max and min for xAxis, the bug still occur.

@plainheart
Copy link
Member

It's clipped due to the tiny offset. Try to set clip: false to disable the default clipping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants