网站建设 psd,openssl 3漏洞补丁,网上销售平台有哪些,有什么做数据的网站第018个点击查看专栏目录本示例是描述如何在Echarts上配置横轴竖轴指示线#xff0c;更换颜色、线型和大小。方法很简单#xff0c;参考示例源代码。 文章目录示例效果示例源代码#xff08;共85行#xff09;相关资料参考专栏介绍示例效果 示例源代码#xff08;共85行更换颜色、线型和大小。方法很简单参考示例源代码。 文章目录示例效果示例源代码共85行相关资料参考专栏介绍示例效果 示例源代码共85行
/*
* Author: 还是大剑师兰特CSDN
* 下面源代码版权归还是大剑师兰特所有可供学习或商业项目中借鉴未经授权不得重复地发表到博客、论坛问答git等公共空间或网站中。
* Email: 2909222303qq.com
* First published in CSDN
* First published time: 2023-02-17
*/
templatediv classcontainerh3vueecharts配置横轴竖轴指示线更换颜色、线型和大小/h3p大剑师兰特还是大剑师兰特/pdiv idvue-echarts refrefEcharts /div/div
/template
scriptimport * as echarts from echarts; //局部引用如果采用全局模式这里不写export default {name: cuclife,data() {return {}},methods: {initCharts() {let myChart echarts.init(this.$refs.refEcharts);myChart.setOption({tooltip: {trigger: axis,axisPointer: { // 设置指示线type: line, // 默认为直线可选为line | shadowlineStyle: {color:#f00,type: [5, 15], //设置折线类型 dashOffset: 10,width:5, }}},title: {text: 基本曲线图},legend: {data: [cuclife, openlayers]},color: [orange, blue],xAxis: {type: category,data: [Mon, Tue, Wed, Thu, Fri, Sat, Sun]},yAxis: {type: value},series: [{name:cuclife,type: line, // 设置拐点的大小和形状 symbol :rect,// circle, rect, roundRect, triangle, diamond, pin, arrow, none, emptyCirclesymbolSize : 10,symbolRotate: 45, data: [820, 932, 901, 934, 1290, 1330, 1320],smooth: true,}]});}},mounted() {this.initCharts();}}
/script
style scoped.container {width: 840px;height: 580px;margin: 50px auto 0;border: 1px solid rgb(228, 57, 97);}#vue-echarts {width: 800px;height: 460px;border: 1px solid #d8d;margin: 0 auto;}
/style
相关资料参考
https://echarts.apache.org/zh/option.html#series-line.markLine
专栏介绍
在vue和echarts联合技术栈的操控下本专栏提供行之有效的源代码示例。这里既包括样式的修改又包括常用bug的解决。 1提供title示例展示控制标题的颜色、位置、子标题连接等 2提供legend示例展示控制图例的类型、宽度、高度、位置、间隙边框、阴影、透明度、偏移字体、颜色提示语等 3提供grid示例展示控制绘图网格的位置、宽度、高度、边框、阴影等 4提供xAxis示例展示控制x 轴的位置、类型、名称、字体、对齐方式、边框、阴影、宽度、高度等 5提供yAxis示例展示控制y 轴的位置、类型、名称、字体、对齐方式、边框、阴影、宽度、高度等 6提供dataZoom示例展示控制区域缩放的类型、位置、filterMode等 7提供tooltip示例展示控制提示框组件的触发方式、位置、样式标签、动画、内容格式器等 8提供地理坐标系示例展示控制地理坐标的经纬度、放缩、位置距离、字体、边框等 9提供animation示例展示控制动画的持续时间、延迟时间、动画方式连接等 10提供其他示例展示series等组件的信息内容。