Version 5.23 of RGraph is now available

Written by Richard Heyes, on 30th April 2020

It's been not quite two months since version 5.22 was released so it's about time that I released 5.23 - so that's what I've done!

A notable change is that you can now use (certain) tooltip substitutions in the tooltipsCss values as well as in the tooltips themselves. This makes it even easier to customise how your tooltips look. So you could set the css like this:

...
// Some colors used by the chart
colors: ['red','green','blue'],

// A custom property
tooltipBackgroundColors: [
    'rgb(255,239,239)',
    'rgb(239,255,239)',
    'rgb(239,239,255)'
],

// Some CSS values for the tooltips that use substitutions
tooltipsCss: {
    fontSize: '24pt',
    border: '3px solid %{property:colors[%{dataset}]}',
    backgroundColor: '%{property:tooltipBackgroundColors[%{dataset}]}'
}
...

The Line chart has had dataset tooltips added. These are just like regular tooltips but allow you to click anywhere on a line and get a tooltip. You can have one for every dataset that's shown on the chart. This feature uses the newer canvas function isPointInStroke so there are a few really old browsers (Internet Explorer 11, for example) that don't support this function or feature.

Various charts have had the highlightStyle invert option added. Using this in conjunction with the highlightFill option to specify the color you can have the charts fade out the non-selected shapes instead of highlighting the focused bar. For an example of this, you can see it on this demo page.

Other changes can be seen on the changelog page and you can download the latest version from the download page.

https://www.rgraph.net/download.html#stable