您当前的位置: 首页 >  ar

杨林伟

暂无认证

  • 1浏览

    0关注

    3337博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

26Echarts - 折线图(Line Y Category)

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

效果图

在这里插入图片描述

源代码



	
		
		ECharts
		
		
	

	
		
		
// 基于准备好的dom,初始化echarts实例 var myChart = echarts.init(document.getElementById('main')); var option; option = { legend: { data: ['高度(km)与气温(°C)变化关系'] }, tooltip: { trigger: 'axis', formatter: "Temperature : {b}km : {c}°C" }, grid: { left: '3%', right: '4%', bottom: '3%', containLabel: true }, xAxis: { type: 'value', axisLabel: { formatter: '{value} °C' } }, yAxis: { type: 'category', axisLine: { onZero: false }, axisLabel: { formatter: '{value} km' }, boundaryGap: false, data: ['0', '10', '20', '30', '40', '50', '60', '70', '80'] }, series: [{ name: '高度(km)与气温(°C)变化关系', type: 'line', smooth: true, lineStyle: { normal: { width: 3, shadowColor: 'rgba(0,0,0,0.4)', shadowBlur: 10, shadowOffsetY: 10 } }, data: [15, -50, -56.5, -46.5, -22.1, -2.5, -27.7, -55.7, -76.5] }] }; myChart.setOption(option);
关注
打赏
1662376985
查看更多评论
立即登录/注册

微信扫码登录

0.1045s