Patch to make dashed Line plot possible

Share RGraph:   Share or Like RGraph on Facebook!

« Back to message list

Enter your email address to get email updates on this topic. You can stop receiving updates by clicking the link in the update email messages.

Posted by Max on 7th December 2016
Hi all

I just made a few changes to add a new option that controls if a Line is dashed or not in RG.Line()

The logic is simple, just add a new option to get dashed lines:

...
colors: [ bla, bla ],
dashed: [ false, true ],
...

I can't find the proper way to send the patch, or any tip on coding standard, it is important because my patch affects very few lines (less than 20 maybe) but I re-indented all RGraph.line.js file since it confused me a lot because of bad indentation.

Can you guys please help me with directions about how to send ? if acceptable, I can perfectly revert identation changes if wanted, but I would love to see the new code with better look :D

Regards !! you have a great tool

Max
Posted by Richard on 7th December 2016
Hi,

You can email me the patch if you want if it's that small ( richardheyes@gmail.com ).

RGraph already supports dotted/dashed background grids in the Line chart using the standard canvas API but not every browser supports it - only Chrome and Firefox the last time I checked. Here's some demos that show it:

www.rgraph.net/demos/bar-background-grid-dotted.html
www.rgraph.net/demos/line-background-grid-dotted.html
www.rgraph.net/demos/scatter-background-grid-dotted.html




Richard
Posted by Max on 8th December 2016
I sent you the patch without re-indentation

The change enables dashed line in plot lines, and it is flexible so that you can enable or disable with a list just as the one used to set lines colors, it was pretty simple, since dash was already supported for line path context, and it works quite well for my needs.

Regards!
Max

Add a reply




« Back to message list