SVGGraph 3.6
Published
SVGGraph 3.6 is a fairly small update, with a few fixes, a couple of useful extra options and one new feature that I plan to expand upon in future versions.
Multi-level axis division labels
This is the new feature, something I have actually been thinking about for
quite a long time. It is enabled with the new axis_levels_h
or
axis_levels_v
options, along with some method of providing the text
for the new labels.
If you click on the “View source” link you will see that this
example is using structured data with multiple axis_text
fields to
choose the label text. The text for the labels could also come from the
axis_text_callback_x
option or using datetime keys.
Some more details of how to use the option is in the axis_levels_h page.
New options
There are two new styling options in this version, axis_font_weight
and axis_text_back_colour
. Both of these options also have
horizontal and vertical flavours available with _h
and _v
added at the end. They add some basic styling to the axis division labels,
most useful in places where the labels are not clear like the radar graph Y
axis and population pyramid X axis.
Fixes
The link_target
and link_base
options have been
broken for some time, so this version fixes them. The Javascript crosshairs
should have been hidden when the cursor leaves the grid area, but this was not
working.
Finally, I added support for displaying gradients in all sorts of places in version 3.5, including the axes. Unfortunately, using a gradient to stroke a horizontal or vertical line in SVG doesn't show up at all, so now SVGGraph will draw gradient axes as filled rectangles instead.
The new version of SVGGraph is available from the downloads page, or from GitHub / Packagist with Composer.