lumean / svg-graph2

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

work out the number of times the scale_division needs to go in order … #35

Closed t12nslookup closed 3 years ago

t12nslookup commented 3 years ago

…to be slightly more than the max_value, and use that, rather than relying on step, which sometimes falls short.

I've checked visually against all the percy charts, and others produced by rake.

with the exception of "plot_test_plot_axis_too_short.html" the graphs look "alright" to me.

Jon

lumean commented 3 years ago

I've made the percy tests now public visible. Unfortunately due to the percy token being a hidden environment variable in travic CI, this is not available for pull requests builds, hence percy screenshots are not uploaded.

actually the axis_too_short looked ok before changes:

grafik

I'll merge your changes for now and we can still try to fix it.

lumean commented 3 years ago

https://percy.io/a5e00e98/svg-graph2

lumean commented 3 years ago

ups apparently this change also broke the y-axis placement for plots, sorry this whole scale_division thing is not easy to fix properly... took me quite some time some years back when I took over the code to find something working "acceptably" (but not really satisfactory) for all cases

https://percy.io/a5e00e98/svg-graph2/builds-next/8257848/changed/469571159?browser=firefox&browser_ids=9%2C14&subcategories=approved&viewLayout=overlay&viewMode=new&width=1280&widths=1280