javascript - CanvasJS Chart - repeating values on Y-Axis -
i have got issue canvasjs - i'm doing measurments on speed time of apis, problem - while i'm leaving 1 of api charts visible, values on y-axis repeating themselves.
how can turn them off , leave 1 instance of each of values?
i've attached screenshot , snippet of code used generate chart
window.onload = function () { var chart = new canvasjs.chart("chartcontainer", { animationenabled: true, animationduration: 700, zoomenabled: true, title:{ text: "crm response time chart", fontweight: "bolder", fontcolor: "#008b8b", fontfamily: "tahoma", fontsize: 25, padding: 10 }, legend: { fontsize: 20, cursor: "pointer", itemclick: function (e) { //console.log("legend click: " + e.datapointindex); //console.log(e); if (typeof (e.dataseries.visible) === "undefined" || e.dataseries.visible) { e.dataseries.visible = false; } else { e.dataseries.visible = true; } e.chart.render(); } }, axisx:{ labelfontsize: 18, gridcolor: "lightgreen", gridthickness: 1, griddashtype: 'dash', labelmaxwidth: 50 }, axisy:{ valueformatstring: '#0s', labelfontsize: 18, gridthickness: 1 }, label : {fontsize: 18}, data: [ { showinlegend: true, legendtext: 'first crm', type: "splinearea", fillopacity: .05, datapoints: arrone, fontsize: 20 }, { showinlegend: true, legendtext: 'second crm', type: "splinearea", fillopacity: .05, datapoints: arrtwo, fontsize: 20 }, { showinlegend: true, legendtext: 'third crm', type: "splinearea", fillopacity: .05, datapoints: arrthree, fontsize: 20 }, { showinlegend: true, legendtext: 'fourth crm', type: "splinearea", fillopacity: .05, datapoints: arrfour, fontsize: 20 }, { showinlegend: true, legendtext: 'fifth crm', type: "splinearea", fillopacity: .05, datapoints: arrfive, fontsize: 20 }, { showinlegend: true, legendtext: 'sixth crm', type: "splinearea", fillopacity: .05, datapoints: arrsix, fontsize: 20 }, { showinlegend: true, legendtext: 'seventh crm', type: "splinearea", fillopacity: .05, datapoints: arrsenven, fontsize: 20 } ] }); chart.render(); }
<script src="https://canvasjs.com/assets/script/canvasjs.min.js"></script> <div id="chartcontainer" style="height: 200px; width: 100%;"></div>
Comments
Post a Comment