DHTMLX Docs & Samples Explorer

gradient

The color gradient.

Value type: “ligth” (default value), “3D”, function

Gradient can be set by fixed value:

  • “3D”
var chart =  new dhtmlXChart({
	...
        gradient:"3d",
	color: "#00FF22"
   ...
})
  • “Ligth”
var chart =  new dhtmlXChart({
	...
        gradient:"light",
	color: "#00FF22"
   ...
})

or by 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");
		        }
             );