Gradient
0
20
40
60
80
100
'02
'03
'04
'05
'06
'07
'08
'09
'10
'11
<script src="../../codebase/dhtmlxchart.js" type="text/javascript"></script> <link rel="STYLESHEET" type="text/css" href="../../codebase/dhtmlxchart.css"> <script src="../common/testdata.js"></script> <script></script> <div id="chartDiv" style="width:600px;height:250px;margin:20px;border:1px solid #A4BED4;"></div>window.onload = function() { var barChart = new dhtmlXChart({ view: "bar", container: "chartDiv", value: "#sales#", gradient: function(gradient) { gradient.addColorStop(1.0, "#FF0000"); gradient.addColorStop(0.2, "#FFFF00"); gradient.addColorStop(0.0, "#00FF22"); }, alpha: 0.8, radius: 2, border: false, xAxis: { template: "'#year#"; }, yAxis: { start: 0, end: 100, step: 10, template: function(obj) { return (obj % 20 ? "": obj); } } }); barChart.parse(dataset, "json"); }