DHTMLX Docs & Samples Explorer

Index
dhtmlxchart
Bar Chart Propeties

## gradient

A color gradient.

Value type: Function

    var chart =  new dhtmlXChart({
    	...
    	gradient:function(gradient){
    			gradient.addColorStop(0.0,"#FF0000");
    			gradient.addColorStop(0.8,"#FFFF00");
    			gradient.addColorStop(1.0,"#00FF22");
    		                   },

        ...
    })

or

    chart.define("gradient",function(gradient){
    			gradient.addColorStop(0.0,"#FF0000");
    			gradient.addColorStop(0.8,"#FFFF00");
    			gradient.addColorStop(1.0,"#00FF22");
    		        }
                 );