开发者

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


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!


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜