要和mysql连接,最好有源代码,非常感谢
var dom = document.getElementById("container");
var myChart = echarts.init(dom);
var app = {};
var option;
option = {
xAxis: {
type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri']
},
yAxis: {
type: 'value'
},
series: [
{
data: <?php echo $arr1; ?>,
type: 'line'
}
]
};
if (option && typeof option === 'object') {
myChart.setOption(option);
}
这是目前的代码