javascript - FillColor on Highcharts working differently -
what i'm trying fill individual symbols color based on how it's performing against it's goal. used work, reason no longer is. i've tried figure out issue is, couldn't figure out:
    var seriescolor = "#000";     preprocessdata = function (divid, data, last, goal) {         var ndata = []; var symbol = "diamond"; var radius = 5;         var colorgood = '#348017'; var colorbad = '#e42217'; var coloruse;         (var = 0; < data.length; i++) {             if (data[i] <= goal[i]) { coloruse = colorgood; }             else if (data[i] > goal[1] * 1.17) { coloruse = colorbad; }             else { coloruse = '#ffe303'; }             if((divid == "webservitrun" || divid == "isoservicesrun") && == 9 ){                 symbol = "circle";                 radius = 10;             }             else if((divid == "webservitrun" || divid == "isoservicesrun") && != 7){                 symbol = "diamond";                 radius = 5;             }             ndata.push({                 y: data[i],                 x: i,                 color: coloruse,                 fillcolor: coloruse,                 marker: {                     symbol: symbol,                     radius: radius                 }             });         }         seriescolor = coloruse;         return ndata;     };   then in series calls:
    {             type: 'spline',             name: series2,             data: preprocessdata(divid, current, last, goal),             color: seriescolor,             marker: {                 symbol: 'diamond'             }         }   any idea
if you're trying set fill color of marker, fillcolor declaration needs inside marker object.
so, this:
        fillcolor: coloruse,         marker: {             symbol: symbol,             radius: radius         }   should this:
    marker: {         fillcolor: coloruse,         symbol: symbol,         radius: radius     }      
Comments
Post a Comment