Skip to content

[Bug] If clear linechart before setOption - then color option working wrong #18500

@winkyBrain

Description

@winkyBrain

Version

5.4.1

Link to Minimal Reproduction

https://codesandbox.io/s/stacked-line-chart-forked-c57zbj?file=/index.js:506-528

Steps to Reproduce

  1. Take any line chart example with multicolored lines, more than 2
  2. Set option color like color: ["#87205d", "#ec933d"]
  3. Run myChart.clear() before myChart.setOption(option)

Current Behavior

First two lines actually have colors from array, what I set in option color, all next lines take own colors from basic eCharts palette or whatever, but not from array of my colors

Expected Behavior

All next lines must takes same colors as who first lines, from color array. Like if I don't run myChart.clear();

Environment

- OS: Windows 10
- Browser: Chrome
- Framework: Vanilla JS

Any additional comments?

Someone can white 'just don't use clear()', bit I need to run it because of the specifics of the environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions