参考地址:https://www.makeapie.com/editor.html?c=xxxcG6NGk0

效果图打开上面的网址就可以看到。

核心代码如下,该效果实现的难点是数据的封装,还有eval函数的使用。代码直接拷贝过去肯定用不了,需要修改,这里主要记录数据的封装过程。

var img = [
'image://data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABRCAYAAABFTSEIAAAACXBIWXMAAAsSAAALEgHS3X78AAAEp0lEQVR42u3cz4sjRRTA8W9Vd3Vn8mMmjj9WQWSRZQ+CsH+B7MnDIgiCd0E8CYJ/gOAIelo8ehUP/gF6WLw5/gMueFP2sIcF0dHd2Z1kknR11fOQZJJJMtlZd03H7HtQpNOTnpn+8Lrm1etmjIig8e/DKoECKqACKqCGAiqgAiqghgIqoAIqoIYCKqACKqCGAiqgAiqghgIqoAJudKTr+osZMNPvBUQBHwHsPF9fB9R0DeHMOQ6T6WOrhEzXBM4swDOL0M6CrArRVoq3t2dGUIb9fTvatg8ZZup1PDBgzPmy98mey6qfzjLz2WaWjEUZKEvGyi9nWyneMOvGIyFQo2Sbg4MUSChpU9IeTTUpJdsEajPZOJeJG5uBZj7rLLduWS5dGm6XNLEELOFUFj54ACJCaychkpDSASK3bwsXL0YgVpWJKwM0iy9Zy8HdGru7jvt3Pbu7w0wES7drTwAbjTHMGCsQcIAnYTC1/wRx0wEnl27JNgZI8HQ6Kc1mQq83RNzaMjPzXqDbjTQaJRFLxIyyMSxAXEkWrhrQzAAmo5HOjCQf7jflILxOkohL+aUPgV4vEGNJo+E5PAy02+UIMEwBxo0CPDP7Dg5SnEtpt1PA0e87XO25FOoh8IYIH2Y5b45RzGAQBiIltZoHxqMcjbksXAVgdc2EQMYzzzdotyeZWKuleULXJtwT4SODfC2QCWR+IF9KnjuX1Xbo99Op7LVE8iXlz0YBTk5SyLEEjo5OLuccEoFUvHfO+reuUPx4zftXAIcx1hdcF+/TvFab4A0Bs0VwqyhpVnkJT89/Q4DDQ0e77YCMwIUsFMeFZD856699URRvX4nxE4A/jbnxXp7v4Z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fR3dvz7vZvZ1Oj3a3QW6WFVVNClBnwwaRGGYgNN0YMsJAFhPlUysgioK0cvlxRb8FEfyBC+507mYGM9/G37OD4AubmxfDndbArTkCV7yNsADFDxBj9/Sy7mzw7MMhc9QeGvykbPDs7f0cj5BjwcoeBu4bKqHC4JbQOa9noHnWYge7WL2vHbnfJrbxdFlmSdoymySPXt+2wGwe62Pmz/cAvHedMRi/xKrg5uL+xnWZVm5voJZzE0s/KzKTcTZu3a7TdibjTB7e3vy+nBwG86r0G367xafd+DnthzwuZV4dy3i4caIF/EiXsSLEfEiXsSLeDEiXsSLeBEv4sWIeBEv4kW8GBEv4kW8iBcj4v0f4l+bPQ5YnMn04QAAAABJRU5ErkJggg==',
];
var data_x=[01/04,01/05,01/06,01/07,01/08,01/09,01/10,01/11,01/12,01/13]
var y_evt_2=[12,3,0,0,0,0,0,6,3,0]
var y_evt_3=[4,1,0,0,0,0,0,1,1,0]
var y_evt_4=[8,2,0,0,0,0,0,4,2,0]
var y_evt_5=[0,0,0,0,0,0,0,0,0,0]
var data = [],eachData=[];
for (let i = 0; i <data_x.length ; i++) {
let tempArr1=[];
tempArr1[0]=data_x[i]
tempArr1[1]=y_evt_2[i]
tempArr1[2]=y_evt_3[i]
tempArr1[3]=y_evt_4[i]
tempArr1[4]=y_evt_5[i]
eachData.push(tempArr1);
}
data=[];
for (let k = 1; k < 5; k++) { //一共四条线,需要四组数据
let tempArr2 = [];
for (let j = 0; j < data_x.length; j++) {
let tempArr3 = [];
tempArr3[0] = '\"' + eachData[j][0] + '\"';
tempArr3[1] = eachData[j][k];
tempArr2[j] = "["+tempArr3+"]";
}
data.push("{coords:[" + tempArr2 + "]}");
}
data=evil("("+"["+data+"]"+")"); option = {
backgroundColor: '#0e2147',
grid: {
left: '5%',
top: '5%',
bottom: '5%',
right: '5%',
},
legend: {
type: "scroll",
data: "来电量",
itemWidth: 18,
itemHeight: 12,
textStyle: {
color: "#00ffff",
fontSize: 14
},
},
yAxis: [{
type: 'value',
position: 'left',
nameTextStyle: {
color: '#00FFFF'
},
splitLine: {
lineStyle: {
type: 'dashed',
color: 'rgba(135,140,147,0.8)'
}
},
axisLine: {
show: false
},
axisTick: {
show: false
},
axisLabel: {
formatter: '{value}',
color: '#fff',
fontSize: 14
}
}, ],
xAxis: [{
type: 'category',
axisTick: {
show: false
},
axisLine: {
show: false,
lineStyle: {
color: '#0696f9',
}
},
axisLabel: {
inside: false,
textStyle: {
color: '#fff', // x轴颜色
fontWeight: 'normal',
fontSize: '14',
lineHeight: 22
} },
data: XName,
}, ],
series: [{
symbolSize: 150,
symbol: img[2],
name: '小灯光',
type: "line",
data: data1,
itemStyle: {
normal: {
borderWidth: 5,
color: '#0696f9',
}
}
},
{
name: '滑行的光点',
type: 'lines',
coordinateSystem: 'cartesian2d',
symbolSize: 30,
polyline: true,
effect: {
show: true,
trailLength: 0,
symbol: "arrow",
period: 10, //光点滑动速度
symbolSize: 150,
symbol: img[0]
},
lineStyle: {
normal: {
width: 1,
opacity: 0.6,
curveness: 0.2
}
},
data: data
}
],
};
//计算表达式的值,等价于eval函数,防止有些网站禁用eval
function evil(fn) {
var Fn = Function; //一个变量指向Function,防止有些前端编译工具报错
return new Fn('return ' + fn)();
}

ECharts特效-折线图上一个光点来回移动的更多相关文章

  1. Echarts line折线图使用(vue)

    实现 首先引入echarts工具 // vue文件中引入echarts工具 let echarts = require('echarts/lib/echarts') require('echarts/ ...

  2. ECharts绘制折线图

    首先看实现好的页面 实现 首先引入echarts工具 // vue文件中引入echarts工具 let echarts = require('echarts/lib/echarts') require ...

  3. python3 requests获取某网站折线图上数据

    比如要抓取某网站折线图上数据,如下截图: 借助Chrome开发者工具Network.经过分析发现获取上面的热度数据,找到对应的事件url:https://pcw-api.iqiyi.com/video ...

  4. echart--如何在折线图上添加矩形背景(可以借用bar柱状图的实现效果)

    当鼠标滑过,如何在折线图上添加矩形背景图呢? 具体如下: 上面的dataShadow的来源

  5. ECharts使用—折线图动态加载

    最近需求中用到折线图,单线条,多线交错,之前是散点图,用的是另一个 amcharts.js,这个文档也能找的到,回归早本次重点:ECharts 一.首先引入echarts.common.min.js文 ...

  6. 移动端引用echarts的折线图

          移动端写一个图表引用echarts,highcharts插件,本次要找一个能够显示最新数据的折线图,最后只找到显示最大值: 找到echarts的实例:记一下个各功能.   <!DOC ...

  7. echarts自定义折线图横坐标时间间隔踩坑总结

    折线图需求:横坐标为时间,要求按一定间隔展示,鼠标移至折线上间隔时间内的数据也可展示 其实很简单的一个配置就可搞定,但在不熟悉echarts配置的情况下,就很懵逼 xAxis: { boundaryG ...

  8. echarts版本折线图

    1.效果如下:         绘制折线图,应该算是说echarts中使用最简单也算使用频率最高的一种功能了吧.根据官网列子能找出规律,只是有些属性对于初接触者来说,会有点陌生,不过仔细阅读一下还是不 ...

  9. echarts实现折线图

    前端框架使用的angular,折线图使用echarts实现. 这里实现的折线图只是简单是折线图,折线图显示在table中,不需要xy轴的数据说明. 1. item.component.html < ...

随机推荐

  1. CMake将生成的可执行文件保存到其他目录

    在运行一些程序的时候,我们一般会把数据文件放在其他位置.而当在修改程序时,需要不断的修改代码,编译,执行.每次编译之后,都得将可执行文件复制到数据文件的目录. 这一问题有两种解决方法,一是直接在数据目 ...

  2. 根据json数据和HTML模板,渲染嵌套的HTML

    2020-12-22 11:53:23 星期二 场景, HTML模板是多个div嵌套, 里边有列表, 也有键值对, 与之匹配的有一个json数据, 需要根据json去渲染这个HTML DOM 示例截图 ...

  3. js 根据条件删除数组中某个对象&js filter (find)过滤数组对象的使用

    删除 ----  item不设置 arr.splice(1,1)   //['a','c','d']         删除起始下标为1,长度为1的一个值,len设置的1,如果为0,则数组不变 arr. ...

  4. Autofac官方文档翻译--一、注册组件--3属性和方法注入

    官方文档:http://docs.autofac.org/en/latest/register/prop-method-injection.html Autofac 属性和方法注入 虽然构造函数参数注 ...

  5. (十二)、file--判断文件类型命令

    一.命令描述与格式 描述:linux在查看一个文件前,要首先确定该文件中数据的类型,之后再使用适当的命令或者方法打开该文件,在linux中文件的扩展名并不代表文件的类型,也就是说扩展名与文件的类型没有 ...

  6. 二、LINUX文本处理三剑客之grep

    1. grep一般格式:grep [选项] 基本正则表达式 [文件],其中基本正则表达式需要用引号引起来 引号引起来的作用:a.防止被误解为shell命令,b.可以用来查找多个单词组成的字符串 gre ...

  7. SQL语句中case,when,then的用法

    用法如下bai: 复制代码 SELECT s.s_id, s.s_name, s.s_sex, CASE WHENs.s_sex='1'THEN'男' WHENs.s_sex='2'THEN'女' E ...

  8. 推荐使用并手写实现redux-actions原理

    @ 目录 一.前言 二.介绍 2.1 创建action 2.2 reducer 2.3 触发action 三. 认识与手写createAction() 3.1 用法 3.2 原理实现 四.认识hand ...

  9. Redis集群搭建采坑总结

    背景 先澄清一下,整个过程问题都不是我解决的,我在里面就是起了个打酱油的角色.因为实际上我负责这个项目,整个过程也比较清楚.之前也跟具体负责的同事说过,等过段时间带他做做项目复盘.结果一直忙,之前做的 ...

  10. HelloGitHub 月刊最受欢迎的开源项目 Top10(2020 年)

    作者:HelloGitHub-卤蛋 2020 年已成往事,2021 年悄然而至. 在已经过完的 2020 年里 HelloGitHub 共发布了 12 期月刊,推荐了 419 个开源项目.​每个月的 ...