DHTMLX Docs & Samples Explorer

Series

Source
<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>
window.onload = function() {
    var chart1 = new dhtmlXChart({
        view: "area",
        container: "chart",
        value: "#sales#",
        color: "#58dccd",
        alpha: 0.7,
        xAxis: {
            template: "'#year#";
        },
        yAxis: {
            start: 0,
            step: 10,
            end: 100;
        },
        legend: {
            values: [{
                text: "Type A",
                color: "#58dccd"
            }, {
                text: "Type B",
                color: "#914ad8"
            }, {
                text: "Type C",
                color: "#36abee"
            }],
            valign: "middle",
            align: "right",
            width: 90,
            layout: "y";
        },
        eventRadius: 5;
    });
    chart1.addSeries({
        alpha: 0.5,
        value: "#sales2#",
        color: "#914ad8";
    });
    chart1.addSeries({
        alpha: 0.5,
        value: "#sales3#",
        color: "#36abee";
    });
    chart1.parse(multiple_dataset, "json");
}
</script> <div id="chart" style="width:600px;height:250px;border:1px solid #A4BED4;"></div></td>