c3js / c3js/c3

Custom shapes for points

Open
#1,071 47 comments 42 reactions 0 assignees View on GitHub
C-feature-request R-needs-docs
Dominant language
JavaScript
Stars
9.3k
Forks
1.4k
Avg merge
6d 16h
Merged PRs (30d)
1

Description

It would be great to be able to define different shapes (circle, square, triangle, star, ...) for the graph points.

They are 2 main reason for that:
- Printing on a grey scale printer
- Color blind people

Some topic were create on google group without response:
https://groups.google.com/d/topic/c3js/I2UhY4U6zI0/discussion
https://groups.google.com/d/topic/c3js/gZrpl0QpKYw/discussion
https://groups.google.com/d/topic/c3js/6QRQ1VWx3vw/discussion

Legend should use the same shape as the one define for the points.

Here is how I imagine the configuration:

```
point: {
shape: {
'data1': 'circle',
'data2': 'square',
'data3': 'triangle'
}
}
```

or, in order to define some other custom attributes:

```
point: {
'data1': {
shape: 'circle',
color: '#ff0000',
r: 2
},
'data2': {
shape: 'square',
color: '#0000ff',
r: 3
}
}
```

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.