frappe/charts

Truncate tooltip labels & stack values vertically

Open

#198 aperta il 27 set 2018

Vedi su GitHub
 (4 commenti) (6 reazioni) (0 assegnatari)JavaScript (769 fork)batch import
Feature Requesthacktoberfest

Metriche repository

Star
 (14.858 star)
Metriche merge PR
 (Nessuna PR mergiata in 30 g)

Descrizione

Hi there.

Firstly, thanks for an amazing lib! It's a breeze to use : )

I'm wondering if under tooltipOptions I could also pass in a format method to deal with long labels?

Ideally (expected behaviour)...

tooltipOptions: {
  formatTooltipX: d=> (d + '').toUpperCase,
  formatTooltipY: d => d,
  formatTooltipLabelY: d => (d + '').substring(0, 10) + '...'
}

Edit: Another request would be to list the values vertically stacked instead of horizontally. This would allow users to avoid situations like these: screen shot 2018-11-02 at 10 44 37

And allow for tooltips which are better to grasp (cognitively), like these: screen shot 2018-11-02 at 10 44 57

Guida contributor