Allow formatting other than the default for the X axis on the DateY plots.
This is done by setting
datey.x_label_format = "%Y-%m-%d"
The formatting is done by the strftime function, so any valid format will work.
See: http://docs.python.org/2/library/time.html#time.strftime
An XML filter can be defined as a function taking a single argument,
supplied as the 'svg' atribute of the graph (an lxml etree?) and
returning a modified version/copy thereof.
XML filters can be added to a plot using the new plot method
add_xml_filter(func).
The hook that executes any filters added to the plot, executes them in
order immediately prior to conversion to a string, in the class method
svg.render, and also immediately prior to returning a copy of the tree
in BaseGraph.render_tree
available areas are defined in the i18n file
it can be used like this:
- add("Legend", "europe")
- add("Legend", ["europe", "oecd"])
- or even add("Legend", {"nafta", 1000}) if you wish to add a value for the
entire area
available areas are defined in the i18n file
it can be used like this:
- add("Legend", "eur")
- add("Legend", ["eur", "oecd"])
- or even add("Legend", {"nafta", 1000}) if you wish to add a value for the
entire area
When there are more x-axis labels than there are pixels of space the division will result in `truncation` being equal to zero. This causes truncation of x-axis labels to be completely bypassed as the `truncate()` function ignores truncations that are equal to 0.
This patch makes 1 the minimum which means that in the worst case all the x-axis labels will be displayed as '...'. I think this is preferable to having the full labels positioned on top of one another.