echarts icon indicating copy to clipboard operation
echarts copied to clipboard

[Bug] The line is not displayed on the graph, for the SVG rendering mode

Open twin720 opened this issue 1 year ago • 1 comments

Version

5.5.1

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?renderer=svg&code=PYBwLglsB2AEC8sDeBYAULTsBEAPAgrhAM7YBcy6W1OYAniAKbk4DGAhmIwObABOdbABoqWAL4iMWbHUIkWqKTVoNmFbADd2AGwCuzSdQmjM2Yoz4RGpCgG0TNRcuUATTuzsPnWWwHJ82iAAFuy-QrAATAC6ht40fgHBoeEADDFecQmBIWGw0Lra2ulKcZhZSblpsaVl_tnJsACMxTU-dRWpLa2wfgBCfOwawLnN1TV-AMIhfNpWufmFXa1-ACKM2mANjWkZyktx2PRMLNiz0Aa7NGYAtsDAYEEsYHz6Y97YrDDnrGAAcgXaGywZ6vS5iBzFMQAbiAA

Steps to Reproduce

  1. Open link example or open Offical Editor, select Render SVG echarts-example3 and type code:
option = {
    "xAxis": {
        "type": "category",
    },
    "yAxis": {
        "type": "value",
    },
    "series": [
        {
            data: [
              ['Alpha', 2],
              ['Alpha', 0],
              ['Alpha', null],
              ['Alpha', 0],
              ['Alpha', 1],
              ['Alpha', 0],
              ['Bravo', 1],
              ['Charlie', null],
              ['Delta', 10]
            ],
            "type": "line",
            "smooth": true,
            "connectNulls": true,
        }
    ],
};
  1. Make sure the graph line is not displayed. echarts-example

Current Behavior

the graph line is NOT displayed for SVG rendering mode echarts-example

Expected Behavior

the graph line is displayed for SVG rendering mode echarts-example2

Environment

- OS: Windows 10 Pro 22H2 19045.2486
- Browser:
Chrome 127.0.6533.120 (64 bit)
Firefox 129.0.1 (64 bit)
- Framework: -

Any additional comments?

Please note that the error is reproduced only for SVG rendering mode! For CANVAS rendering mode the line on the graph is displayed normally.

twin720 avatar Aug 20 '24 07:08 twin720

gosh, how do you find this stuff ?! It's a bug in the first data point for SVG line - does not like a null mixed with other values. ['Alpha', null] is the culprit, other values like ['Bravo', null] would be ok - Demo

helgasoft avatar Aug 20 '24 21:08 helgasoft