Making a Line dashed

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 Jared B on 4th September 2013
Is there a way to make the line in a line graph dashed instead of solid. I am having a readability issue with having 2 line charts on one canvas. They are both defaulted to be solid lines and one being dashed would be very helpful.
Posted by RGraph support on 5th September 2013
Hi there,

There's no way to make them dashed at the moment - though a setLineDash() function is coming to canvas that will allow it. At the moment you could use different lineWidth settings or different colors.

obj.Set('linewidth', [1,3]);




Richard, RGraph Support
Posted by Jared B on 5th September 2013
Is there a way to make the key which is interactive highlight 2 separate lines instead of just one line. And is there a timetable on the setLineDash()?
Posted by RGraph support on 5th September 2013
Hi there,

That's what the interactive key does - for example:

www.rgraph.net/demos/line-interactive-key.html
www.rgraph.net/docs/interactive-keys.html

Browser support for dashed lines is improving - Chrome, Opera and IE11 (reportedly) support them.


Richard, RGraph Support
Posted by Jared B on 5th September 2013
I have been using the interactive key for a while and it works great I have just ran into a chart that for example has 6 lines on the graph and only 3 key names. lines would be a, b, c, a1, b1, c1 and the keys would be a, b, c. Is there a way when key a is clicked it would highlight line a and a1?
Posted by RGraph support on 5th September 2013
Hi there,

Afraid not. The key just highlights one line on the chart.


Richard, RGraph Support
Posted by Jared B on 25th September 2013
I have been looking for the effect that the interactive key does to the canvas putting a transparent layer on top of the lines not selected to fade them out and leave the line selected the same. Is there a property that can be set to handle this in rgraph as i have created a menu that allows for 2 separate lines be selected and would like to be able to show all the lines just fade out the ones like the original interactive key does. right now i am just clearing the canvas to get rid of them.
Posted by RGraph support on 25th September 2013
Hi there,

Instead of adding highlight to the selected line - you could add highlight to every line *except* the one selected and use a semi-transparent white color like rgba(255,255,255,0.7). That would give the effect of "fading the lines out".

I doubt it would work too well with the background grid though so you may have to turn that off.

You could do all this in Line charts .interactiveKeyHighlight() function.




Richard, RGraph Support

Add a reply




« Back to message list