SVGGraph 3.1 adds a few new things, the most significant being support for
subgraphs, something that should make the
EmptyGraph a bit more
Subgraphs are basically entire graphs drawn on top of a parent graph. They can inherit the parent graph's settings, or have their own settings. Likewise, they can inherit the colours or have their own colour set. They don't inherit data values or lists of links though, because each graph can deal with its data in very different ways.
JPEG Saver 5.3 is a strange update, adding something I really didn't want to do. For several years various JPEG Saver functions haven't worked well, and it was all down to a change that Microsoft made to how screensavers work. This is going to take some explanation.
The whole reason JPEG Saver has been having trouble is a change Microsoft made in about Windows 8 that meant Windows now starts a screensaver on its own desktop. I suspect the reason behind this is security related, but it doesn't provide a lot of protection as far as I can tell. The screensaver still has access to all the user's files, but it can't directly interact with the main desktop display.
Whatever the reason for the change, it broke all the JPEG Saver features that did want to interact with the main desktop:
SVGGraph 3.0.1 is a bugfix release, but there are a lot of changes in it. Sometimes you just have to rip up the floorboards to kill that annoying insect.*
2,75px s'il vous plaît
The bug that caused all these changes is a very simple one: PHP automatically converts numbers to strings using its current locale. This makes perfect sense, but it meant that running SVGGraph in a locale that uses a comma instead of a full-stop for the decimal separator produced garbled SVG output. SVG always uses a full-stop for its decimal separator, with commas or spaces used for separating values.
In my last news item I said I was going to work on version 3.0 of SVGGraph next, and that is what I have been doing. There is a lot more I want to do, but I could have spent months tinkering on the new version without ever being completely happy with it. So here it is.
The example EmptyGraph above is something that I thought might be useful, and will become more useful when something else I have planned comes to fruition. At the moment it can be used to draw shapes and labels, plus it supports the graph title, border and background options. You can assign values, colours and links, but it doesn't do anything with them and you can get away with code as simple as this:
require 'SVGGraph/autoloader.php'; $graph = new Goat1000\SVGGraph\SVGGraph(600, 300); $graph->render('EmptyGraph');
This version of SVGGraph adds some more options for drawing things on the
graph, building on the existing
shape option. The graph below is
the example from the shapes page with the
new features added.
The main difference in this version is the addition of the
option, which defines named shapes or groups of shapes that can then be used as
shapes, in other figures, or as markers on scatter and line graphs. The example
graph above has one figure defined and used three times for the red squares with
the shaded box over the top.