mjordan / islandora_repository_reports

A Drupal 8 module that provides a collection of graphical reports on various aspects of an Islandora repository.
GNU General Public License v2.0
2 stars 5 forks source link

Add help text to chart #16

Closed manez closed 4 years ago

manez commented 4 years ago

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.

image

mjordan commented 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?

manez commented 4 years ago

I don't think that would be a problem. You can move-over slices to see the subtotals.

mjordan commented 4 years ago

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?

manez commented 4 years ago

A new line below it

mjordan commented 4 years ago

OK, can you pull in changes and test?

mjordan commented 4 years ago

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.

mjordan commented 4 years ago

@manez you'll need to clear you cache (drush cr) for the change to show up.

manez commented 4 years ago

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.

mjordan commented 4 years ago

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.

mjordan commented 4 years ago

Resolved in #18.