option = { title: { left: '1%', text: '考试成绩', textStyle: { //标题颜色 color: '#6E6E6E', fontSize: '13px cursive', } }, tooltip: { trigger: 'axis' }, legend: { icon: 'circle', orient: 'horizontal', top: '93%', itemWidth: 28, itemHeight: 28, itemGap: 35, data: ['数学', '语文', '英语'], textStyle: { //标题颜色 color: '#6E6E6E', fontSize: '13px cursive', } }, color: ['#ffa414', '#CCC', '#6495ED', '#FF0000'], //设置legend颜色 grid: { left: '3%', right: '6%', bottom: '10%', containLabel: true }, toolbox: { feature: { saveAsImage: {} } }, xAxis: { type: 'category', boundaryGap: false, data: ['1-1', '1-2', '1-3'], axisLabel: { show: true, textStyle: { color: '#6E6E6E', }, fontSize: '13px cursive',//字体大小 padding: [0, 0, 0, 10],//值离刻度线位置 }, }, yAxis: { minInterval:1, type: 'value', axisLine: { show: false }, axisLabel: { show: true, textStyle: { color: '#6E6E6E', }, fontSize: '13px cursive',//字体大小 padding: [0, 20, 0, 0],//值离刻度线位置 }, }, series: [ { name: '数学', type: 'line', symbol: 'circle',//设置实心圆 symbolSize: 20, //设定实心点的大小 lineStyle: { //设置折线颜色 normal: { width: 4 } }, data: [3,5,1] }, { name: '语文', type: 'line', symbol: 'circle',//设置实心圆 symbolSize: 20, //设定实心点的大小 lineStyle: { //设置折线颜色 normal: { width: 4 } }, data: [5,3,8] }, { name: '英语', type: 'line', symbol: 'circle',//设置实心圆 symbolSize: 20, //设定实心点的大小 lineStyle: { //设置折线颜色 normal: { width: 4 } }, data: [1,2,3] } ] };
你好世界!
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步