Presets
preset: "column"
preset: "stick"
preset: "alpha"
</> Source
<!DOCTYPE html>
<html>
<head>
<title>Presets</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/fonts/font_roboto/roboto.css"/>
<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
<script src="../../../codebase/dhtmlx.js"></script>
<script src="../common/testdata.js"></script>
<style>
#chartContainer1,#chartContainer2,#chartContainer3{
width:400px;
height:250px;
}
#cont1,#cont2,#cont3{
margin:10px;
display:inline-block;
}
</style>
<script>
var myBarChart, myBarChart2, myBarChart3;
function doOnLoad() {
var baseConfig = {
view:"bar",
value:"#sales#",
yAxis:{
start:0,
step:10,
end:100,
template:function(value){
return (value%20?"":value);
}
},
xAxis:{
template:"'#year#"
},
padding:{
left:20
}
};
// myBarChart1
var config1 = {
container:"chartContainer1",
preset:"column"
};
dhtmlx.extend(config1,baseConfig);
myBarChart1 = new dhtmlXChart(config1);
myBarChart1.parse(dataset,"json");
// myBarChart2
var config2 = {
container:"chartContainer2",
preset:"stick"
};
dhtmlx.extend(config2,baseConfig);
myBarChart2 = new dhtmlXChart(config2);
myBarChart2.parse(dataset,"json");
// myBarChart3
var config3 = {
container:"chartContainer3",
preset:"alpha"
};
dhtmlx.extend(config3,baseConfig);
myBarChart3 = new dhtmlXChart(config3);
myBarChart3.parse(dataset,"json");
};
</script>
</head>
<body onload="doOnLoad();">
<div id="cont1">
preset: <b>"column"</b>
<div id="chartContainer1"></div>
</div>
<div id="cont2">
preset: <b>"stick"</b>
<div id="chartContainer2"></div>
</div>
<div id="cont3">
preset: <b>"alpha"</b>
<div id="chartContainer3"></div>
</div>
</body>
</html>
Documentation
Check documentation to learn how to use the components and easily implement them in your applications.