Area Chart Example var income = document.getElementById("chartIncome"); var myLineChart = new Chart(income, { type: "line", data: { labels: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], datasets: [{ label: "Income", lineTension: 0.3, backgroundColor: "rgba(0, 97, 242, 0.05)", borderColor: "rgba(0, 97, 242, 1)", pointRadius: 3, pointBackgroundColor: "rgba(0, 97, 242, 1)", pointBorderColor: "rgba(0, 97, 242, 1)", pointHoverRadius: 3, pointHoverBackgroundColor: "rgba(0, 97, 242, 1)", pointHoverBorderColor: "rgba(0, 97, 242, 1)", pointHitRadius: 10, pointBorderWidth: 2, data: @json($dataIncome['data']), }] }, options: { maintainAspectRatio: false, layout: { padding: { left: 10, right: 25, top: 25, bottom: 0 } }, scales: { xAxes: [{ time: { unit: "date" }, gridLines: { display: false, drawBorder: false }, ticks: { maxTicksLimit: 7 } }], yAxes: [{ ticks: { maxTicksLimit: 5, padding: 10, // Include a dollar sign in the ticks callback: function(value, index, values) { return "Rp " + number_format(value); } }, gridLines: { color: "rgb(234, 236, 244)", zeroLineColor: "rgb(234, 236, 244)", drawBorder: false, borderDash: [2], zeroLineBorderDash: [2] } }] }, legend: { display: false }, tooltips: { backgroundColor: "rgb(255,255,255)", bodyFontColor: "#858796", titleMarginBottom: 10, titleFontColor: "#6e707e", titleFontSize: 14, borderColor: "#dddfeb", borderWidth: 1, xPadding: 15, yPadding: 15, displayColors: false, intersect: false, mode: "index", caretPadding: 10, callbacks: { label: function(tooltipItem, chart) { var datasetLabel = chart.datasets[tooltipItem.datasetIndex].label || ""; return datasetLabel + ": Rp " + number_format(tooltipItem.yLabel); } } } } }); var expense = document.getElementById("chartExpense"); var myLineChart = new Chart(expense, { type: "line", data: { labels: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ], datasets: [{ label: "Expense", lineTension: 0.3, backgroundColor: "rgba(0, 97, 242, 0.05)", borderColor: "rgba(0, 97, 242, 1)", pointRadius: 3, pointBackgroundColor: "rgba(0, 97, 242, 1)", pointBorderColor: "rgba(0, 97, 242, 1)", pointHoverRadius: 3, pointHoverBackgroundColor: "rgba(0, 97, 242, 1)", pointHoverBorderColor: "rgba(0, 97, 242, 1)", pointHitRadius: 10, pointBorderWidth: 2, data: @json($dataExpense['data']), }] }, options: { maintainAspectRatio: false, layout: { padding: { left: 10, right: 25, top: 25, bottom: 0 } }, scales: { xAxes: [{ time: { unit: "date" }, gridLines: { display: false, drawBorder: false }, ticks: { maxTicksLimit: 7 } }], yAxes: [{ ticks: { maxTicksLimit: 5, padding: 10, // Include a dollar sign in the ticks callback: function(value, index, values) { return "Rp " + number_format(value); } }, gridLines: { color: "rgb(234, 236, 244)", zeroLineColor: "rgb(234, 236, 244)", drawBorder: false, borderDash: [2], zeroLineBorderDash: [2] } }] }, legend: { display: false }, tooltips: { backgroundColor: "rgb(255,255,255)", bodyFontColor: "#858796", titleMarginBottom: 10, titleFontColor: "#6e707e", titleFontSize: 14, borderColor: "#dddfeb", borderWidth: 1, xPadding: 15, yPadding: 15, displayColors: false, intersect: false, mode: "index", caretPadding: 10, callbacks: { label: function(tooltipItem, chart) { var datasetLabel = chart.datasets[tooltipItem.datasetIndex].label || ""; return datasetLabel + ": Rp " + number_format(tooltipItem.yLabel); } } } } });