Closed manez closed 4 years ago
Cool, I didn't know about that. The Chart.js library offers a few neat UI features. See the pie and bar (vertical) examples at https://www.chartjs.org/samples/latest/.
Is it a big deal if the total number doesn't update when you remove data sets?
I don't think that would be a problem. You can move-over slices to see the subtotals.
Ok, I'll add "Click on entries in the legend to turn them on/off." Do you think it should be appended to the existing text on the same line, or on a new line below it?
A new line below it
OK, can you pull in changes and test?
It also works for bar charts, but so far, the only bar chart has only a single data series, so it woldn't make sense to tell the user something that would blank out their chart. We can add the help text to bar charts later if we want.
@manez you'll need to clear you cache (drush cr
) for the change to show up.
Minor nitpick: can the new text be unbolded? I think leaving the summary line bold and the help unbolded would make it read more like Drupal help text.
Don't know, I'll check. That text is all managed by Chart.js and I'll need to dig around in its myriad options.
Resolved in #18.
I discover quite by accident while testing the latest updates that clicking on the legend of the chart turns entries on and off. This is really cool! A brief "Click on entries in the legend to turn them on/off" line of in-UI help text would draw attention to this feature.