SVG:::Graph is a pure Ruby library for generating charts, which are a type of graph where the values of one axis are not scalar. SVG::Graph has a verry similar API to the Perl library SVG::TT::Graph, and the resulting charts also look the same. This isn't surprising, because SVG::Graph started as a loose port of SVG::TT::Graph.
Other
50
stars
20
forks
source link
Bar graphs are rounding bars to nearest Y axis label number #4
When scale_integers is true, Vertical Bar graphs always round the bars to the nearest axis label number (and dotted line). This wasn't happening with horizontal bar graphs.
The fix was to make the height calculation first convert the y_scale_division value to a float before multiplying it with the current value.
When
scale_integers
is true, Vertical Bar graphs always round the bars to the nearest axis label number (and dotted line). This wasn't happening with horizontal bar graphs.The fix was to make the height calculation first convert the
y_scale_division
value to a float before multiplying it with the current value.See the example before and after the fix.