I try to use graph component in dashboard, but the result is blank box (not displaying anything).
And then i try to use phprad from radysystem using the same database & query, the result is good (graph displayed)
This is the script of graph that i copy from inspector :
$(function (){
var chartData = {
labels : ["9","10"],
datasets : [
{
label: 'Dataset 1',
backgroundColor:[
'rgba(138,94,38,0.5)','rgba(159,207,225,0.5)', ],
borderWidth:3,
pointStyle:'circle',
pointRadius:5,
lineTension:0.1,
type:'line',
steppedLine:true,
data : ["1","2"],
}
]
}
var ctx = document.getElementById('barchart_salesgraph');
var chart = new Chart(ctx, {
type:'bar',
data: chartData,
options: {
scaleStartValue: 0,
responsive: true,
scales: {
xAxes: [{
ticks:{display: true},
gridLines:{display: true},
categoryPercentage: 1.0,
barPercentage: 0.8,
scaleLabel: {
display: true,
labelString: "Month"
},
}],
yAxes: [{
ticks: {
beginAtZero: true,
display: true
},
scaleLabel: {
display: true,
labelString: "Sales"
}
}]
},
}
,
})});
What's is wrong with this....? can anyone help me... please....