antvis / antvis/G2Plot

🤔 [QUESTION] Area plot line config not working with seriesField

Open
#3,597 0 comments 0 reactions 0 assignees View on GitHub
Question
Dominant language
TypeScript
Stars
2.7k
Forks
591
PR merge metrics
No merged PRs in 30d

Description

### 🐛 Question description
When you add seriesField to Area plot, and want to adjust the width/size of the area line, it does not work.

### Example Code
Code is from here: https://g2plot.antv.antgroup.com/en/examples/area/stacked#basic
```js
import { Area } from '@antv/g2plot';

fetch(
'https://gw.alipayobjects.com/os/bmw-prod/b21e7336-0b3e-486c-9070-612ede49284e.json',
)
.then((res) => res.json())
.then((data) => {
const area = new Area('container', {
data,
xField: 'date',
yField: 'value',
seriesField: 'country',
areaStyle: () => {
return {
fillOpacity: 0.1,
};
},
line: {
size: 1, // not working because of seriesField?
},
});
area.render();
});
```
Wondering how I can modify line of the area plot when seriesField config is used.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the stacked Area example linked in the issue with seriesField and the line.size setting. Check whether changing line.size affects the rendered area lines, then verify whether the behavior is documented or whether the configuration should work; done means the expected line width is applied or the limitation is clearly explained.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data-visualization
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.