SVGGraph 2.12

Published

The new version of SVGGraph doesn't contain any really big changes, but it does have several new options for how the graphs should look. I've tried to illustrate most of the new options on the example graph below.

LineGraph showing time and distance

Unless you are profoundly colour-blind, the most obvious new feature on this graph should be the addition of green stripes - this is enabled with the grid_back_stripe option and the colour can be set using grid_back_stripe_colour. The stripes are drawn from the major grid lines on the Y-axis.

The next change is on the Y-axis, where it is using a logarithmic scale. This is enabled with the log_axis_y option, and the base for the logarithm can be set using log_axis_y_base. I've added some extra documentation about using the log scale on the axis and grid options page.

Next we have some new options for setting individual axis text styles: axis_font_h, axis_font_v, axis_font_size_h, axis_font_size_v, axis_font_adjust_h, axis_font_adjust_v, axis_text_colour_h, axis_text_colour_v, axis_text_space_h and axis_text_space_v. On the example graph I've used axis_font_h = 'Arial Black', axis_font_size_h = 12 and axis_text_colour_h = '#339'.

The example graph also shows the new units_x and units_y options in use. units_x has been set to “s” and units_y to “m” to append these units to the axis labels. The Y axis also demonstrates the last of the new options that appear on the graph - decimal has been set to “,” and thousands to “ ” (a space character) to change the default number formatting from a “.” for the decimal point and “,” for the thousands separator.

There are two new pie graph options that I didn't manage to demonstrate on the line graph above - show_label_key defaults to true to show the slice index or name (it was always displayed in earlier versions) and label_percent_decimals allows you to set the number of decimal places displayed for the percentage in the label.

The last new option is empty_use, which defaults to true. This makes SVGGraph output <use> elements as empty elements (<use ...></use>) instead of self-closed elements (<use .../>). The reason for this option is that Safari 6 uses a buggy version of WebKit that doesn't handle the self-closed elements properly. Using an empty element instead shouldn't cause any problems, but the option is there to disable it.

There are a couple of bugs fixed in this version too. The structure option now takes precedence over the scatter_2d option, and 3D pie charts will automatically adjust their size if the depth option is greater than the space available to draw the graph in.

The updated zip files are available from the downloads page.

« Previous: TagCanvas 2.1.2 Next: JPEG Saver 4.9 »

This site uses cookies - details here.