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

Fix bug in Plot.rb making line 9 invisible #11

Closed ashleydavies closed 5 years ago

ashleydavies commented 5 years ago

Line 9 had a minor typo in the CSS which resulted in it not displaying; this patches that so lines 1-12 are displayed correctly.

Would you be receptive to a PR which algorithmically generated colours and added them to the CSS for lines > 12 (probably by interpolating between existing colours and #000 #fff to get an optimal spread)? I'd find it very useful for my use case but I understand if you'd rather not support more than 12 lines officially.

Sorry for the small PRs - hope they're not inconvenient!

lumean commented 5 years ago

No worries about the small PRs, I appreciate your effort! Sure you can submit a PR for support of more than 12 lines. I also startet integrating c3js support to generate a bit more "modern" graphs if you need support of more graph types or lines you might want to look at this as well. Basically it's just a small html generator wrapper. See https://github.com/lumean/svg-graph2/blob/master/examples/c3js.rb

Currently this is not part of the gem but I'll probably release a new gem version this or next week, also including your PRs.