-
-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be great if the left side of the plot could be labeled with the data names of each line.
User story
Users would be able to quickly gain insight into what the plot was representing if the data labels were shown. Then they would be able to hover over the lines that correspond to the specific data users are interested for the actual values.
Additional context
I was able to add some of the words represented in the plot by adding them to the ticks on the y axis in options. This did lead to a gap between the left most edge of the plot and the start of the actual plot, most words were left out using this method, and the words were not properly aligned with the corresponding line.
const chart = new Chart(ctx, {
type: 'pcp',
data: {
labels: pcpWords.map((c) => c.word),
datasets: attrs.map((attr) => ({
label: attr,
data: pcpWords.map((c) => c[attr]),
})),
},
options: {
scales: {
y: {
type: 'linear',
position: 'left',
title: {
display: true,
text: 'Words'
},
ticks: {
callback: function (value, index) {
return pcpWords[index].word;
}
}
}
}
},
});
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request