您当前的位置: 首页 >  ar

杨林伟

暂无认证

  • 1浏览

    0关注

    3337博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

17Echarts - 折线图(Log Axis)

杨林伟 发布时间:2019-04-30 15:11:00 ,浏览量:1

效果图

在这里插入图片描述

源代码



	
		
		ECharts
		
		
	

	
		
		
// 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('main')); // 指定图表的配置项和数据 var option = { title: { text: '对数轴示例', left: 'center' }, tooltip: { trigger: 'item', formatter: '{a} {b} : {c}' }, legend: { left: 'left', data: ['2的指数', '3的指数'] }, xAxis: { type: 'category', name: 'x', splitLine: { show: false }, data: ['一', '二', '三', '四', '五', '六', '七', '八', '九'] }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, yAxis: { type: 'log', name: 'y' }, series: [{ name: '3的指数', type: 'line', data: [1, 3, 9, 27, 81, 247, 741, 2223, 6669] }, { name: '2的指数', type: 'line', data: [1, 2, 4, 8, 16, 32, 64, 128, 256] }, { name: '1/2的指数', type: 'line', data: [1 / 2, 1 / 4, 1 / 8, 1 / 16, 1 / 32, 1 / 64, 1 / 128, 1 / 256, 1 / 512] } ] }; myChart.setOption(option);
关注
打赏
1662376985
查看更多评论
立即登录/注册

微信扫码登录

0.2088s