0๐
You need to place the , options
part after the lineChartData
part, for the last line of the code to be:
var myLine = new Chart(document.getElementById("canvas-2010").getContext("2d")).Line(lineChartData, options);
0๐
You can use this option for disable the labels
<canvas id="canvas-2010" width="800" style="width: 100% !important; height: auto !important;"></canvas>
<script>
options = {
scaleShowLabels : false
}
var lineChartData = {
labels : ["Jan","Feb","Mar","Apr","Maj","Jun","Jul", "Aug", "Sep", "Okt", "Nov", "Dec"],
datasets : [{
fillColor : "rgba(151,187,205,0.5)",
strokeColor : "rgba(151,187,205,1)",
pointColor : "rgba(151,187,205,1)",
***showScale: false ,***
pointStrokeColor : "#fff",
data : [0,0,0,0,0,0,0,0,0,0,-6147.20,22333.57]
}]
}
var myLine = new Chart(document.getElementById("canvas-2010").getContext("2d"), options).Line(lineChartData);
</script>
I hope it will work
- Chartjs-How to get value of defaultdic in JS (Django framework)?
- Chartjs-Get position in array element
Source:stackexchange.com