apache / apache/echarts

[Bug] Linear gradient for axis lines and split lines not shown when renderer type is SVG

Open
#21,274 1 comment 0 reactions 0 assignees View on GitHub
bug en pending SVG
Dominant language
TypeScript
Stars
67.3k
Forks
19.8k
Avg merge
11d 14h
Merged PRs (30d)
8

Description

### Version

6.0.0

### Link to Minimal Reproduction

https://codesandbox.io/p/sandbox/m6p4p5

### Steps to Reproduce

1. Create chart with svg renderer (used bar chart in example but checked line chart as well)
2. Add axisLines and axis splitLines with linear gradient color
3. View chart, look for axes and split lines

### Current Behavior

Axis lines and split lines are not shown. Inspecting the DOM shows the path elements are there with the stroke for the linear gradient, but they do not show in the chart.

### Expected Behavior

Axis lines and split lines with a linear gradient color display in svg charts with the correct gradient.

### Environment

```markdown
- OS:
- Browser: Chrome, Firefox
- Framework:
```

### Any additional comments?

Tried passing a gradient configuration object directly and using new echarts.graphic.LinearGradient() function. Neither worked for me. If switching renderer to canvas with no other changes, the lines display with the gradient.

Saw this issue https://github.com/apache/echarts/issues/17029 which seemed similar, but for only the chart background color.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.