echarts [Bug] 大量数据的折线图,前后不连续的点没有绘制

7kqas0il  于 2个月前  发布在  Echarts
关注(0)|答案(5)|浏览(39)

Version

5.3.3

https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBdEgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQeHnjawADuJuQAtgBGwP4EAGYB4aEeQmAiMQCMAKwADDywDQBMTQAsDQ2VAMzVna0A7M0AbLXWJaQU1HT-ENDKcXYktnYA3EA

Steps to Reproduce

链接里面即是复现

Current Behavior

  1. 折线图
  2. 大量数据,几万,不能sample
  3. 不能showSymbol,会非常卡顿
  4. 如果一个点 前后都为空,那么这个点也不会被绘制

Expected Behavior

  1. 希望这个点能被绘制出来

Environment

- OS: window
- Browser: edge
- Framework: vue

Any additional comments?

No response

a8jjtwal

a8jjtwal1#

@FanLu1994 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED

TITLE

[Bug] In the line chart of a large amount of data, the discontinuous points before and after are not drawn

BODY

Version

5.3.3

https://echarts.apache.org/examples/zh/editor.html?code=PYBwLglsB2AEC8sDeAoWsAeBBDEDOAXMmurGAJ4gCmRA5AMYCGYVA5sAE7m0A0J6AE2aMiAbVoBZGL1i0AKgFcqM2gHUqAlXIAWClQDEOEFQGVmphdFoBd EgF8-6cjnxFUpMpRqyAbowA2SrT2jrB4VEZUhLCi_MQeHnjawADuJuQAtgBGwP4EAGYB4aEeQmAiMQCMAKwADDywDQBMTQAsDQ2VAMzVna0A7M0AbLXWJaQU1HT-ENDKcXYktnYA3EA

Steps to Reproduce

The link is reproduced

Current Behavior

  1. Line chart
  2. A large amount of data, tens of thousands, cannot be sampled
  3. Can't showSymbol, it will be very stuck
  4. If a point is empty before and after, then this point will not be drawn

Expected Behavior

  1. Hope this point can be drawn

Environment

- OS: windows
-Browser: edge
- Framework: vue

Any additional comments?

No response

mspsb9vt

mspsb9vt2#

Do you want showSymbol as true or false ? Of course, when false, no points are shown. There is no option for "lines without points" mixed with single points. One workaround is to identify those singular points and create a scatter series to show them separately.

  1. If a point is empty before and after, then this point will not be drawn (=translation)

not true. In your example set showSymbol: true and the point for Wednesday will display

zte4gxcn

zte4gxcn3#

if i set showSymbol=true, my page will be very laggy。
i found a solution here: #18815
but it cannot work for me, because my xAxis type is time 😢

ws51t4hk

ws51t4hk4#

Good reference to #18815 . PR has been updated and works with type:'time'.
Demo Code .
So what I said - "There is no option for "lines without points" mixed with single points." - no longer applies, which is good news.
🤞 for PR to be approved (soon). Praise to @linghaoSu for pulling that off 🏆

lnvxswe2

lnvxswe25#

Good reference to #18815 . PR has been updated and works with type:'time'. Demo Code . So what I said - "There is no option for "lines without points" mixed with single points." - no longer applies, which is good news. 🤞 for PR to be approved (soon). Praise to @linghaoSu for pulling that off 🏆

You are right, modifiy directly will cause breaking change, so I add a new option showDisconnectSymbol , accepting 'auto' | true , default is 'auto' .

  • 'auto' will follow the showSymbol behavior.
  • true will show the disconnect symbol although showSymbol is false

live demo

相关问题