Are there any visual themes that are available?


« 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 Omar on 1st January 2017
I can't find any documentation on visual themes. Is there a way to create a theme and apply it to a chart using rgraph?
Posted by RGraph support on 24th July 2013
Hi there,

There's no concept of themes - you need to set the individual properties of each chart. What you could do though is use the RGraph.SetConfig() function though to group your properties and make applying them easier:

myTheme1 = {
             'chart.colors': ['red', 'green'],
             'chart.strokestyle': '#ddd'
            }

myTheme2 = {
             'chart.colors': ['yellow', 'pink'],
             'chart.strokestyle': '#000'
            }

You could put those in a seperate "themes" file so that they can be easily reused.

Then you can use them like this:

RGraph.SetConfig(obj, myTheme2);

You can read more here:

www.rgraph.net/blog/why-are-there-different-ways-of-configuring-rgraph.html

Richard

Add a reply




« Back to message list