Release notes for 2020
- October 2020 (v5.26)
- August 2020 (v5.25)
- June 2020 (v5.24)
- April 2020 (v5.23)
- March 2020 (v5.22)
- February 2020 (v5.21)
October 2020 (v5.26)
-
Added the
labelsValuePoint
andlabelsValueThousand
properties to thecanvas
Gauge chart
. -
The way that you create
Bubble charts
has been changed for this release and integrated into theScatter chart
. The Scatter chart documentation page has documentation about how to createBubble charts
now. -
There was a long-standing bug with the
responsive
function and anti-aliasing (it most likely has been present since theresponsive
function was added) where the anti-aliasing fix wasn't being reapplied when it needed to be. This has now been fixed. -
The
svg
Bar chart
Horizontal Bar chart
Line chart
Scatter chart
andWaterfall chart
now all have the capability to show X andy-axis
titles. This has been a feature of thecanvas
libraries for some time but now thesvg
libraries can show titles too. All of the relevant text configuration properties (iefont
size
color
bold
anditalic
) have also been added. For an example of just what properties have been added take a look at the SVG Bar chart documentation. -
The vertical positioning of the 3D
Bar chart
tooltips has been corrected (it was positioned incorrectly due to the 3D effect skewing). TheHorizontal Bar chart
andBipolar chart
have also been checked that they're using the correct positioning. -
Internally, the
canvas
libraries have used theRGraph.getTextConf
function to get five text configuration properties (font
size
color
bold
italic
). Now thesvg
libraries have been moved over to their own version of this function (RGraph.SVG.getTextConf
). This won't (shouldn't) affect you but does mean marginally smaller libraries and more consistent handling of the text configuration. -
If you had two Google Sheets reader blocks on the same page it could cause conflicts - this
has now been resolved so you can do this:
<script> new RGraph.Sheets('1ncvARBgXaDjzuca9i7Jyep6JTv9kms-bbIzyAxbaT0E', function (sheet) { // Create the first chart... }); new RGraph.Sheets('1lxNzvAdToUP4u-3SAJFZs6oJccj5BXPt3VCLkyE7Z1w', function (sheet) { // Create the second chart... }); </script>
-
Internally, the variable that referred to the object properties (which was
prop.xxx
) has been tweaked to beproperties.xxx
. This won't (shouldn't) affect you and slightly improves the readability of the source code. -
The tooltips pointer is now added to the tooltip as a property. So if you wanted to get to it
you could do this:
// For canvas charts var pointer = RGraph.Registry.get('tooltip').__pointer__; // For SVG charts var pointer = RGraph.SVG.REG.get('tooltip').__pointer__;
August 2020 (v5.25)
-
The default appearance for tooltips has changed in this release. Formerly they had a
similar appearance to Windows tooltips. However, now the default colors are white text
on a black background. Also, instead of appearing next to the pointer, they're positioned
statically. For example, on a
Bar chart
, the tooltips are shown at the top of the bar with an arrow indicating the bar. Have a look through the demos and the documentation pages for examples (not all of the demos have tooltips though). The SVG charts have also been converted to this style of showing tooltips. This was mentioned on the RGraph blog here. - Now, if your tooltips extend off the left or right of the screen, they will be arranged such that the tooltip pointer is no longer in the middle but at 10% of the width (or 90% if on the right-hand-side) and the tooltip will be moved accordingly.
-
The Date/Time library
MomentJS
is now bundled with RGraph. This library should help out when you're dealing with dates and times and theRGraph.parseDate
function does not suffice. You can read more about it on the MomentJS website. -
Some new properties have been added for tooltips:
-
tooltipsFormattedKeyColorsCss
This property allows you to addcss
values to the tooltip key color blob. There's also acss
class for the key color blob called:RGraph_tooltipsFormattedKeyColor
You can use it by adding this to the pagescss
(or your websitescss
file):.RGraph_tooltipsFormattedKeyColor { border: 2px solid black; }
-
tooltipsPointer
This property allows you to add a small pointer to the tooltip. -
tooltipsPointerCss
This property enables you to addcss
values to the tooltip pointer. -
tooltipsPositionStatic
Instead of the tooltip appearing at the same coordinate as the mouse pointer this property allows you to set the tooltips to appear at a fixed position (eg for aBar chart
it will normally be at the top of a bar).
-
-
The
canvas
Bipolar chart
now has aside
flag in the return value of theobj.getShape
method. This is0
for a bar on the left of the chart and1
for a bar on the right. -
Fixed a bug in the
svg
Line chart
that meant that not all tooltips were being shown when using tooltip templates. -
When you call the
wave
function of theBar chart
and there's only one bar it will now defer automatically to thegrow
effect instead. With only a single bar there's no difference between the two effects. -
Formatted tooltips can now contain the
%{table}
macro. This makes it easy to show a table in your tooltips. There are two properties that you can use to configure the table and pass it the data to show:tooltipsFormattedTableHeaders
andtooltipsFormattedTableData
You can read about them on the tooltips documentation page. The appearance of the table can be configured usingcss
. -
The
canvas
Line chart
now has four new tickmark styles:diamond
enddiamond
filleddiamond
filledenddiamond
-
Both the
canvas
andsvg
Scatter charts
have had a new property added:outofbounds
If you're setting they-axis
minimum and/or maximum values but you have points that fall outside these values and still want to show them then you will probably want to set this property to true.
June 2020 (v5.24)
-
The SVG Line chart now supports three new properties:
dashed
dotted
anddasharray
. This allows you to specify your line(s) to be dotted, dashed and also give your own style of linedash. Thedasharray
should be an array of two numbers - the length of the dash and the length of the gap. -
The charts that have a
y-axis
(ie theBar chart
Gantt chart
Horizontal Bar chart
Line chart
Scatter chart
Waterfall chart
and the drawingapi
y-axis
) before now rendered theiry-axis
title in nativecanvas
text. This was because vertical accessible text had positioning and alignment issues. Now that these have been resolved (in a previous release) these charts have been updated to usedom
text to render theiry-axis
titles. -
In what was most likely a regression - the default for the
Bar chart
labelsAboveOffsetx
property has now been set to zero.
April 2020 (v5.23)
-
Added the
labelsOffset
property to thesvg
Radar chart
. -
A fix for the
Rose chart
has been supplied by Mike Robinson that fixes labels not being rotated when theanglesStart
property is used. -
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 thecss
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 substitution tooltipsCss: { fontSize: '24pt', border: '3px solid %{property:colors[%{dataset}]}', backgroundColor: '%{property:tooltipBackgroundColors[%{dataset}]}' } ...
You can also use the macros when you set tooltipcss
values like this:RGraph.tooltips.style.backgroundColor = 'black'; RGraph.tooltips.style.color = '%{property:colors[%{index}]}';
-
The canvas tooltips documentation
(formatting macros can be used in
svg
chart tooltips as well)
-
The canvas tooltips documentation
(formatting macros can be used in
-
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 on the chart. This feature uses the newercanvas
functionisPointInStroke
so there are a few really old browsers (for example Internet Explorer 11) that don't support this function or feature. -
The
Waterfall chart
now supports having thex-axis
positioned at the top of the chart as well as at the bottom and in the center. -
Both the
canvas
andsvg
charts have had thetooltipsOffsetx
andtooltipsOffsety
properties added. - A long-standing bug with angled accessible text has been resolved. However, as a result, if you use angled text your text may need adjusting.
-
The
canvas
globalCompositeOperation
reference page has been updated with an interactive demonstration. By using this you can see exactly how the different modes affect your drawings. The globalCompositeOperation reference page. -
The
Segmented Bar chart
demo has been updated so that it now uses the new dedicated class that's part of theBar chart
file. This new class handles all of the drawing for you and is part of theBar chart
file so you don't need to include any extra files. The Segmented Bar chart demo. -
Both the
canvas
andsvg
Rose charts
have had the formatted tooltips property%{value2}
added. This is only applicable to you when you're displaying a non-equi-angular chart and allows you to show the second data piece (the value controlling the angular size of the segment). -
With the Waterfall
getShape
functions return value, theindex
and thedataset
properties have been swapped. This means that the first bar on theWaterfall chart
now has adataset
value of0
, the second has1
, the third has a value of2
etc. Theindex
value of each bar is0
. -
The
Rose chart
index
anddataset
properties in the return value of thegetShape
method were reporting values the wrong way around. This has been corrected so you may need to adjust your code if you use these properties. Tooltips should not be affected. The 3D Rose chart demo. -
Various objects have had a
label
property added to theirshape
objects. A part of this was also to add thedataset2
property to theBipolar chart
. For some charts thelabel
property makes no sense - ie the drawingapi
objects, the Fuel, Gauge,Horizontal Progress bar
, Meter, Odometer, Radial Scatter, Scatter, Thermometer andVertical Progress bar charts
. The charts that do support it are: Bar, Bipolar, Funnel, Gantt, Horizontal Bar, Line, Pie, Radar, Rose andWaterfall charts
. -
When the
Line chart
was using thearrow
orfilledarrow
tickmark types and thespline
option was enabled the arrowhead wasn't being angled correctly. This has now been remedied. - Internally, some custom formatted-tooltips code has been moved to be de-centralised. This will lead to smaller downloads - but not by much.
- Fixed a very obscure bug that presented itself when using a PDF converter - not a web browser. Believe it or not, it was just down to a spurious trailing comma - which web browsers ignored.
-
Finally fixed an old bug with the
Rose chart
which resulted in the tooltip hotspots not completely covering the visible segments. You can view the 3DRose chart
demo that's online for a demo. The 3D Rose chart demo. -
The
canvas
Funnel chart
has had thelabelsPosition
property added to it. This means that instead of the labels being vertically aligned to the edges of the segments they can be aligned to the center of each section instead. The possible values areedge
(the default) andsection
. Thesvg
Funnel chart
already has this capability. The example on theFunnel chart
documentation page has been changed to demonstrate this. The Funnel chart documentation page. -
Various charts have had the
highlightStyle
invert
option added. Using this in conjunction with thehighlightFill
option to specify the color you can have the charts fade out the non-selected shapes instead of highlighting the focused bar. For a demo of this, you can see it at the link below. A Bar chart demo with a dark background. -
In the download archive, the
line-banded-gradient.html
demo has had the colors altered slightly. The line colors are now similar to the fill and there's a shadow to help you distinguish the two. Download the latest version of RGraph.
March 2020 (v5.22)
-
The default for
svg
text is now to have thepointer-events
css
property set tonone
(like thecanvas
libraries). - The new car registrations demo has had formatted tooltips added to it - which look nice! Using the new formatted tooltips feature doesn't add code to your configuration - it allows you to significantly reduce the amount of code that you have and adds a lot of power to control your tooltips.
-
The colors for various charts have been updated so that they no longer use gradients
by default. These have been replaced by solid colors. So this means that if you use
the default colors then your charts may change if you upgrade. You will just need to
set the
colors
property to what you want to see. -
The ability for the
Scatter chart
to show trend lines has been added. You can see an example on the Scatter chart documentation page. - Formatted tooltips have been added to RGraph. These add the ability to RGraph that allows you to significantly customise your tooltips and easily use the chart data in them. You can read more about them here.
-
Internally, the RGraph
path
function has been updated and all of the calls to it from the various libraries have been updated to the new syntax. It now looks like this:// lw - linewidth // b - beginPath() // r - rect() // s - stroke() // f - fill() this.path( 'lw % b r % % % % s black f red', linewidth, x, y, width, height );
This call sets thelineWidth
and draws a filled red rectangle with a black border/stroke. Here's a version of theRGraph.path
function that you can easily incorporate into your own code: https://www.rgraph.net/blog/paths.htmlOr you could get the latest code for the function from the
RGraph.common.core.js
file. If you do the though it will need a tiny bit more massaging to make it work stand-alone. -
Added the
line-nvd.html
demo which is acanvas
version of an existing SVG demo. This is a stacked and filledLine chart
which, unlike thesvg
version, traces each dataset sequentially. -
The
textAccessiblePointerEvents
default for thecanvas
charts has been changed totrue
, except for theMeter chart
and theOdometer chart
. This is due to them using angled text. This change means that, by default, you'll be able to select text (as in cut/copy/paste operations). If you don't like it you can always change it back by setting thetextAccessiblePointerevents
property tofalse
. -
The RScatter labels are now offset by 25 pixels. You can change this by using the
labelsRadiusOffset
option. -
Added a
Bar chart
andLine chart
demo that shows a moving average Bar &Line chart
. -
The horizontal offset used for the
svg
Pie chart
sticks has been halved to50px
. -
The
tooltipsCss
property has been added. You can set this to an object that contains key/value pairs ofcss
values to be used on tooltips (these settings apply only to that object's tooltips). For example:... tooltipsCss: { fontFamily: 'Arial,Verdana,sans-serif', fontSize: '20pt', backgroundColor: 'black', color: 'white' }, ...
Notice that since it's
javascript
code (notcss
) you need to use thejavascript
versions of the property names - so for examplebackgroundColor
instead ofbackground-color
. - The
Bipolar charts
x-axis
labels have been adjusted down slightly.
February 2020 (v5.21)
This release has many changes to the internals of RGraph - particularly the shape
objects that each charts getShape
function returns. So if you upgrade and you
use this function you should definitely test your charts before you commit to the new version.
-
The
Line chart
arrow
andfilledarrow
tickmark styles now respect thetickmarksSize
property. -
The segmented meter chart variation of the Pie chart
now has a
valueDecimals
property. The Segmented meter is now a stand-alone chart type. -
Fixed a bug with the adjustable
svg
Gauge chart
and Firefox - it wasn't fetching the cursor position correctly so adjusting didn't work correctly. - Fixed a bug with the Pie/Donut 3D variants that meant that the shadow wasn't being drawn correctly.
- Lots of Internet Explorer 11 related bugs were fixed.
-
When using the drawing
api
x-axis
andy-axis
objects you should be aware that the color properties have changed. They're no longer calledcolors
- they're now calledxaxisColor
andyaxisColor
and they're not arrays but a single color. -
All of the margins have been synchronised at
35
. This may cause your charts to shift a little if you upgrade but you can just set them back to what you want them to be with themarginLeft
marginRight
marginTop
andmarginBottom
properties. -
If you use the
axes
property to turn off both the X and Y axes you will now need to use both thexaxis
andyaxis
properties. -
The
Bar chart
Horizontal Bar chart
Line chart
Gantt chart
Scatter chart
andWaterfall chart
and the drawingapi
x-axis
now all use a commonRGraph.drawXAxis
function. It is, quite naturally, a large function - but also quite versatile because it supports all kinds of different options. As a result, some chart types have new options for theirx-axis
. Notably, theyaxisLabels
option has been changed to theyaxisScale
option, which turns on and off they-axis
scale labels. -
The
Bar chart
Horizontal Bar chart
Line chart
Gantt chart
Scatter chart
Waterfall chart
and the drawingapi
y-axis
now all use a commonRGraph.drawYAxis
function. Again, it's a large function - but also quite versatile because it supports all kinds of different options. As a result. some chart types have new options. -
The
innerHTML
property that was used in a few places in theRGraph.common.core.js
has been changed to the fasterinsertAdjacentHTML
function. -
The property
yaxisScaleZerostart
has been removed. The scale now always starts with zero. - The documentation for the canvas Scatter chart has been bolstered with clearer information about the format of the data array.
-
A new feature that is coming in the next version of RGraph (which will be 5.22) and which
has already been
partially implemented in the
Bar chart
is formatted tooltips. There's a demo in the download archive called bar-tooltip-templates.html which demonstrates this exciting (!) new feature. You can read a little about it on the tooltips feature documentation page.