chartjs / chartjs/Chart.js

Allow dataset parsing to extract options from dataset (e.g. labels, colors, ...)

Open
#11,015 3 comments 0 reactions 0 assignees View on GitHub
type: enhancement
Dominant language
JavaScript
Stars
67.7k
Forks
11.9k
Avg merge
7h 39m
Merged PRs (30d)
5

Description

### Feature Proposal

I'm feeding this type of data-set to Chart.js:

```js
dataset= [
data: [
['people' => 'name' , 'x-axis' => 'yyyy-dd', 'y-axis' => 35 ],
['people' => 'other name' , 'x-axis' => 'yyyy-dd', 'y-axis' => 35 ],
],
'parsing': [ 'xAxisKey': 'x-axis', 'yAxisKey' : 'y-axis', ],
];
```
Unfortunately, 'parsing' only allow for 'xAxisKey' and 'yAxisKey' parsing. It would be interesting to allow for things like label (and color, etc.) to be extracted from data columns.

The goal is to create a stacked bar chart with each 'people' value having a different color using the autocolors plugin.

### Possible Implementation

_No response_

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.