SVGGraph 3.13
Published
In this new version of SVGGraph there are some new graph types, a couple of options that improve some other things and sundry other updates and fixes.
Curved lines and shifted markers
The first change is something that has been on the to-do list for a very
long time - curved lines on line graphs. The example below shows the new
line_curve
option used on a bar and line graph, but it works on
all the line graphs and the radar graphs too.
For this example all the lines have the same curvature, but it is a per-dataset option so you can specify how curved you want each line to be.
This example also demonstrates the new line_bar
option, which can
be used to position the markers of a bar and line graph over specific bars. This is
a per-dataset option too, which is why the markers are over different bars (except
for the round markers - they are in the middle of the group because the position for
them is set to NULL
).
Horizontal 3D bar graphs
Someone asked for this, and I thought it would be fairly simple. It turned out to be a bit more complicated than I expected, though I got there in the end. Here's an example:
I have implemented the plain HorizontalBar3DGraph
, the
HorizontalGroupedBar3DGraph
and HorizontalStackedBar3DGraph
shown
in the example. They support all the options you would expect from 3D bar graphs, just
with bars that change width instead of height.
Other changes
The changes I had to make to get horizontal 3D bar graphs working meant that how 3D bars are drawn has changed. Instead of defining a symbol for the shape at top of the bar and reusing it for each bar, now the bars are all drawn in full. This should make no difference to how they appear, but the SVG source has changed a bit.
This change also extends to the cylinder graphs, which now have their tops
drawn in full each time too. While I was making this update I fixed them to support the
bar_top_overlay_colour
and bar_top_overlay_opacity
options,
so they will look slightly different by default - the bar tops will be a bit paler.
The front and side overlays are still not supported by cylinder graphs because they
have the depth shade gradient for that kind of thing.
The one major fix in this version is when using multiple datasets and non-structured data. SVGGraph's multi-dataset graphs always convert to structured data to make things easier, and it was getting the datasets in the wrong order when the (numerically) first data key was not in the first dataset.
Where to get it
The new version of SVGGraph is available from the downloads page, or from GitHub / Packagist with Composer.