[Feature] Apply styling on a stack level for bar charts

Open
#21,519 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Start by locating BarItemStyleOption and the stacked bar rendering entry points, then trace how borders and rounded corners are currently applied to individual series or data points. Done should provide an agreed API for stack-level targeting and make dashed borders and rounded top corners render once around the stacked group.

Written by the indexing model from the issue text.

Description

en new-feature pending
What problem does this feature solve?

Currently, styling is applied to each individual series/data point, but there's no way to apply it to the whole stacked group. Therefore, some styling may look strange since the bar isn't considered as a whole when applying the styling.

2 concrete examples where this issue matters are borders (which cut into the bar) and rounded corners (which get repeated in the middle of the graph).

This is how a dashed border looks on a stacked bar currently:

Image

And this is how it should look:

Image

This is how rounded top corners look on a stacked bar currently:

Image

And this is how they should look:

Image
What does the proposed API look like?

The simplest I can think of is to introduce a new optional field in BarItemStyleOption, which could change where the styling is applied, for example target?: 'stack' | 'series'.

Dominant language
TypeScript
Stars
67.7k
Forks
19.9k
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/echarts

All issues in apache/echarts

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.