DHTMLX Docs & Samples Explorer

fill

Fills the chart area with the specified background color.

Value type: string, function

Background colork can be defined by:

  • some fixed value

    var chart =  new dhtmlXChart({
            view:"radar",
    	fill:"#66cc33",
            ...
    })
  • a string template

    var chart =  new dhtmlXChart({
            view:"radar",
    	fill:"#color#",
            ...
    })
  • a function that takes data object as an argument

    var chart =  new dhtmlXChart({
            view:"radar",
    	fill:function(obj){
    	    if (obj.sales > 5) return "#ff9900";
    	    else return "#66cc00";
    	},
            ...
    })