var list= [{xAxis: "周一", name: "规划局", ynum: 10},
{xAxis: "周二", name: "规划局", ynum: 15},
{xAxis: "周三", name: "规划局", ynum: 20},
{xAxis: "周四", name: "规划局", ynum: 9},
{xAxis: "周五", name: "规划局", ynum:35},
{xAxis: "周六", name: "规划局", ynum: 40},
{xAxis: "周日", name: "规划局", ynum: 7},
{xAxis: "周一", name: "撒旦法", ynum: 5},
{xAxis: "周二", name: "撒旦法", ynum: 8},
{xAxis: "周三", name: "撒旦法", ynum: 15},
{xAxis: "周四", name: "撒旦法", ynum: 6},
{xAxis: "周五", name: "撒旦法", ynum: 30},
{xAxis: "周六", name: "撒旦法", ynum: 23},
{xAxis: "周日", name: "撒旦法", ynum: 14} ]
chart = new Chart({
container: 'c1',
autoFit: true,
height: 500,
})
chart.data(list)
chart.scale({
xAxis: {
range: [0, 1],
},
ynum: {
nice: true,
},
})
chart.tooltip({
showCrosshairs: true,
shared: true,
})
chart
.line()
.position('xAxis*ynum')
.color('name')
.shape('smooth')
chart
.point()
.position('xAxis*ynum')
.color('name')
.shape('circle')
chart.render()
const e = document.createEvent('Event')
e.initEvent('resize', true, true)
window.dispatchEvent(e)