Skip to content

[Bug] linear-gradient color not work in tooltip icon #4182

@xile611

Description

@xile611

Version

2.0.4

Link to Minimal Reproduction

no

Steps to Reproduce

const spec = {
  type: 'bar',
  color: [
    'linear-gradient(to top, #1E90FF, #87CEFA)'
  ],
  legends: {
    visible: true
  },
  data: [
    {
      id: 'barData',
      values: [
        { month: 'Monday', sales: 22 },
        { month: 'Tuesday', sales: 13 },
        { month: 'Wednesday', sales: 25 },
        { month: 'Thursday', sales: 29 },
        { month: 'Friday', sales: 38 }
      ]
    }
  ],
  xField: 'month',
  yField: 'sales'
};

const vchart = new VChart(spec, { dom: CONTAINER_ID });
vchart.renderSync();

// Just for the convenience of console debugging, DO NOT COPY!
window['vchart'] = vchart;

Current Behavior

Image Image

Expected Behavior

tooltip 中的icon应该显示正确的颜色

Environment

- OS:
- Browser:
- Framework:

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions