enne87
enne87

Reputation: 2299

JavaScript- drawing line chart with gRaphael

I'd like to draw a line chart with gRaphael, like the one in the lower right corner: http://g.raphaeljs.com/linechart.html

Now I'd like to change the color of the axis, but I could not find any example how to do that. Here are some examples of how to manipulate the chart, but not how to change the axis color.

Does anyone of you know how to do that?

Thanks in advance,

enne

Upvotes: 1

Views: 1472

Answers (2)

hayesgm
hayesgm

Reputation: 9096

In part from here, the following Javascript will change the fill color for your axes:

 $.each(chart.axis[0].text.items, function(i, label) {
   label.attr({'fill': '#D6D6D6'});
 });

 $.each(chart.axis[1].text.items, function(i, label) {
   label.attr({'fill': '#D6D6D6'});
 });

Enjoy!

Upvotes: 3

enne87
enne87

Reputation: 2299

After a long time of research I couldn't find a possibility to change the axis-colour. I decided to generate my own diagram with rapahel, which is easier than I thought. Fortunately, the documentation of raphael is good enough to create a diagram in an adequate period of time.

Upvotes: 0

Related Questions