It is currently Thu Apr 24, 2014 11:16 pm Advanced search

[2.0.1]How to change series's color Dynamically

Technical support, bug reports and more.

[2.0.1]How to change series's color Dynamically

Postby wocake » Thu Jul 29, 2010 3:59 am

in [2.0.1] How to change series's color Dynamically,When i set the series step= true,
I use
chart.series[0].color = newcolor;
chart.series[0].redraw;
but it don't work,and how can I change the line's shadow color,I set the shadow color Dynamically and redow the chart but it don't work ,but in 1.6 it works .
wocake
 
Posts: 18
Joined: Mon Jun 28, 2010 5:00 am

Re: [2.0.1]How to change series's color Dynamically

Postby not » Thu Jul 29, 2010 3:46 pm

Unfortunately you have to reload whole affected series. It was explained well here: viewtopic.php?f=9&t=7011
Maciej Piecha,
ex Highcharts Support Team
User avatar
not
 
Posts: 340
Joined: Mon Jun 07, 2010 4:01 pm

Re: [2.0.1]How to change series's color Dynamically

Postby fongg » Thu Jul 29, 2010 4:00 pm

Is there any plan to add the series.update() method (like the points.update) to the series any time soon?

Thanks.
fongg
 
Posts: 27
Joined: Tue Jul 20, 2010 10:51 pm

Re: [2.0.1]How to change series's color Dynamically

Postby not » Fri Jul 30, 2010 9:32 am

Only Torstein can give you answer for this question and he will be available on Monday or Tuseday .
Maciej Piecha,
ex Highcharts Support Team
User avatar
not
 
Posts: 340
Joined: Mon Jun 07, 2010 4:01 pm

Re: [2.0.1]How to change series's color Dynamically

Postby torstein.honsi » Mon Aug 02, 2010 12:55 pm

There is a slighly less expensive solution at http://jsfiddle.net/CAKQH/825/.

A series.update method is planned, but it is somewhat complicated as all config options have to be handled separately.
Torstein Hønsi
CTO, Founder
Highsoft Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9182
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: [2.0.1]How to change series's color Dynamically

Postby fongg » Mon Aug 02, 2010 4:40 pm

Thanks. This redraw is much faster. Is there a fast way to refresh the legend too?
fongg
 
Posts: 27
Joined: Tue Jul 20, 2010 10:51 pm

Re: [2.0.1]How to change series's color Dynamically

Postby torstein.honsi » Tue Aug 03, 2010 6:20 pm

Yes, with another line added: http://jsfiddle.net/G5Pk7/
Torstein Hønsi
CTO, Founder
Highsoft Solutions
User avatar
torstein.honsi
Site Admin
 
Posts: 9182
Joined: Thu Nov 09, 2006 1:22 pm
Location: Vik i Sogn, Norway

Re: [2.0.1]How to change series's color Dynamically

Postby wocake » Fri Aug 06, 2010 10:58 am

point.graphic.attr({
fill: '#FF00FF'
});
? Is this the Heighcharts2.0.1? I use point.graphic but the point don't have graphic prototype
wocake
 
Posts: 18
Joined: Mon Jun 28, 2010 5:00 am

Re: [2.0.1]How to change series's color Dynamically

Postby not » Sun Aug 08, 2010 5:25 pm

I use 2.0.1 and something like this below works perfectly:

Code: Select all
chart.series[0].data[0].graphic.attr({
    fill: '#FF00FF'
});
Maciej Piecha,
ex Highcharts Support Team
User avatar
not
 
Posts: 340
Joined: Mon Jun 07, 2010 4:01 pm


Return to Highcharts Usage

Who is online

Users browsing this forum: Google [Bot] and 5 guests