Multi Series Area Charts are used to compare two or more cumulative values over a period of time. It is useful when you are interested in cumulative totals (shaded area) over a period of time or range of values. Given example shows Multi Series Area Chart along with source code that you can edit in-browser or save to run locally.
window.onload = function () { var chart = new CanvasJS.Chart("chartContainer", { animationEnabled: true, title: { text: "Daily Email Analysis" }, axisX: { valueFormatString: "DDD", minimum: new Date(2017, 1, 5, 23), maximum: new Date(2017, 1, 12, 1) }, axisY: { title: "Number of Messages" }, legend: { verticalAlign: "top", horizontalAlign: "right", dockInsidePlotArea: true }, toolTip: { shared: true }, data: [{ name: "Received", showInLegend: true, legendMarkerType: "square", type: "area", color: "rgba(40,175,101,0.6)", markerSize: 0, dataPoints: [ { x: new Date(2017, 1, 6), y: 220 }, { x: new Date(2017, 1, 7), y: 120 }, { x: new Date(2017, 1, 8), y: 144 }, { x: new Date(2017, 1, 9), y: 162 }, { x: new Date(2017, 1, 10), y: 129 }, { x: new Date(2017, 1, 11), y: 109 }, { x: new Date(2017, 1, 12), y: 129 } ] }, { name: "Sent", showInLegend: true, legendMarkerType: "square", type: "area", color: "rgba(0,75,141,0.7)", markerSize: 0, dataPoints: [ { x: new Date(2017, 1, 6), y: 42 }, { x: new Date(2017, 1, 7), y: 34 }, { x: new Date(2017, 1, 8), y: 29 }, { x: new Date(2017, 1, 9), y: 42 }, { x: new Date(2017, 1, 10), y: 53}, { x: new Date(2017, 1, 11), y: 15 }, { x: new Date(2017, 1, 12), y: 12 } ] }] }); chart.render(); }
You can assign different color to each data series using color property. You can also use fillOpacity to make the visually appealing. Other related customizations include lineColor, lineThickness, markerColor, markerBorderThickness, etc.