chartjs / chartjs/Chart.js

Border around or over the shape

Open
#9,820 1 comment 0 reactions 0 assignees View on GitHub
type: documentation
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

Documentation Is:

- [ ] Missing or needed
- [x] Confusing
- [ ] Not Sure?

### Please Explain in Detail...
Are borders in ChartJs generally meant to be:

- drawing around a shapes background (leads to bigger size of the shape)
- drawing over a shapes background (leads to same size of a shape)

In the following doughnut chart I tried to add a transparent border, which isn't working as the border seems to be drawn over the shape:
https://codepen.io/elitastic/pen/BadJePW

I'm not sure if this is a bug or by design. However, the bar chart behaves differently, the border is drawn around the bar: https://codepen.io/elitastic/pen/RwZxzNo

I've a use case, where I should have a transparent border in a doughnut chart, white borders are not working cause of a dynamic background:
https://codepen.io/elitastic/pen/BadJePW

### Your Proposal for Changes
I would expect the border to be drawn around the shape like in the bar chart. Either way it would great if this would be documented.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.