chartjs / chartjs/Chart.js

Parsing data object does not allow for Array Label

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

Description

### Expected behavior

When datasets contain data objects with keys, the configured label key (`xAxisKey`) should also allow for multiple lines using the array notation.

### Current behavior

When parsing data objects, labels on that object that are split into multiple lines using the `array` notation are not recognized.

I can enable the correct labels by adding a `labels` array. This will show the label, but the value for it is still not displayed.

### Reproducible sample

https://codepen.io/doekenorg/pen/raaNPvM

### Optional extra steps/info to reproduce

_No response_

### Possible solution

_No response_

### Context

_No response_

### chart.js version

v4.4.9

### Browser name and version

_No response_

### Link to your project

_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.