javascript - Flot 0.8.2 Line Chart - Color Bug -


i working flot line charts , setting colors. found odd bug. after first 3 colors, plot uses last color of other lines. not correct behavior.

enter image description here

what makes more interesting legend displays correct colors. known bug?

var dataset = [         {label: "d1", data: demand},         {label: "d2", data: demand2},         {label: "d3", data: demand3},         {label: "d4", data: demand4},         {label: "d5", data: demand5},         {label: "d6", data: demand6}     ]  $.plot(placeholder2, dataset, {     series: {       },     legend: {         nocolumns: 0,         position: "nw"     },     colors:["#2980b9","#d35400","#f39c12","#7f8cff","#c0392b","#7f8c8d"] }); 

just make sure wasn't going crazy, , confirm, tried code again, removed colors specification. you'll see flot's default colors, last color "sticks". enter image description here

enter image description here

looks bug result of how had code setup. when removed series:{} code, seems work correctly.

the bug may fault, kind of repetitive behavior might need looked into.

$.plot(placeholder2, dataset, {     legend: {         nocolumns: 0,         position: "nw"     },     colors:["#2980b9","#d35400","#f39c12","#7f8cff","#c0392b","#7f8c8d"] }); 

Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -