varechartLine=echarts.init(document.getElementById('echart_line'),theme);echartLine.setOption({title:{text:'Line',subtext:'Mes'},tooltip:{trigger:'axis'},legend:{x:220,y:40,data:['actions1','actions2','actions3']},toolbox:{show:true,feature:{magicType:{show:true,title:{line:'Line',bar:'Bar',stack:'Stack',tiled:'Tiled'},type:['line','bar','stack','tiled']},restore:{show:true,title:"Restore"
},
saveAsImage: {
show: true,
title: "Save Image"
}
}
},
calculable: true,
xAxis: [{
type: 'category',
boundaryGap: false,
// scale:true,
// splitNumber:12,
data: ['Mon', Tue', 'Wed', 'Thu', 'Fri'] //Quero receber aqui em JSON
}],
yAxis: [{
type: 'value'
}],
series: [{
name: 'stuff',
type: 'line',
smooth: true,
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data: [10, 12, 21, 54, 260, 830, 710] // Quero receber aqui em JSON
}, {
name: 'stuff',
type: 'line',
smooth: true,
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data: [30, 182, 434, 791, 390, 30, 10]
}, {
name: 'things',
type: 'line',
smooth: true,
itemStyle: {
normal: {
areaStyle: {
type: 'default'
}
}
},
data: [1320, 1132, 601, 234, 120, 90, 20]
}]
});
How can I get my array with querys from PHP to make my chart dynamic? I am in dire need of help. So far I've used JSON a little bit. Thanks