You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed when performing unselect on a path the 'd' node that is passed through to generate color is the object that contains a 'data' sub object with no id. This results in generateColor function not finding the color for the selected/unselected element and it will then just change the color of that path to the next unused color in the list of colors.
This is probably best seen in a pie chart. See: http://jsfiddle.net/lakerz/n8hqk3z1/
Steps to replicate:
1> select a pie segment
2> select a second pie segment
Note that the first segment is now red instead of its original color.
The fix for this should be pretty simple. It should be something along the lines of:
c3_chart_internal_fn.generateColor=function(){var$$=this,config=$$.config,d3=$$.d3,colors=config.data_colors,pattern=notEmpty(config.color_pattern) ? config.color_pattern : d3.scale.category10().range(),callback=config.data_color,ids=[];returnfunction(d){varcolor;varid=d.id||(d.data&&d.data.id)||d;// if callback function is providedif(colors[id]instanceofFunction){color=colors[id](d);}
The text was updated successfully, but these errors were encountered:
I have noticed when performing unselect on a path the 'd' node that is passed through to generate color is the object that contains a 'data' sub object with no id. This results in generateColor function not finding the color for the selected/unselected element and it will then just change the color of that path to the next unused color in the list of colors.
This is probably best seen in a pie chart. See: http://jsfiddle.net/lakerz/n8hqk3z1/
Steps to replicate:
1> select a pie segment
2> select a second pie segment
Note that the first segment is now red instead of its original color.
The fix for this should be pretty simple. It should be something along the lines of:
The text was updated successfully, but these errors were encountered: