当前位置: 首页 > news >正文

echarts折线图设置背景颜色


    initChartsBox() {this.option = {tooltip: {trigger: "axis",axisPointer: {// 方法一type: "shadow", // 默认为直线,可选为:'line' | 'shadow'shadowStyle: {color: "rgba(41, 95, 204, 0.2)",},},borderColor: "rgba(0, 170, 255)", // 边框颜色}, // 坐标轴指示器配置textStyle: {color: "#333", // xy轴的提示文字颜色,不包含背景刻度线},color: ["#1492FF"],grid: {top: "25px",left: "50px",right: "20px",bottom: "35px",},xAxis: [{type: "category",data: this.chartsData.time,axisLine: {show: true,lineStyle: {color: "#004080",// width: 0,// type: "solid",}, // x轴线的颜色以及宽度},// axisLabel: {//   show: true,//   textStyle: {//     color: "rgba(255, 255, 255, 0.3)",//   }// }, // x轴文字的配置splitLine: {show: false,lineStyle: {}, // 分割线配置},axisTick: {show: false,}, // x轴的刻度线},],yAxis: [{type: "value",splitLine: {show: true,lineStyle: {color: "#333",opacity: 0.1,}, // 设置横向的线的颜色},axisLabel: {show: true,margin: 20,// textStyle: {//   color: "rgba(255, 255, 255, 0.3)",// }, // y轴的字体配置},splitArea: {show: true,areaStyle: {color: ['rgba(21, 190, 80, 0.1)','rgba(109, 217, 147, 0.1)','rgba(245, 221, 102, 0.11)','rgba(255, 107, 0, 0.1)','rgba(212, 0, 0, 0.1)',]}}},],series: [{data: this.chartsData.roadNorm,type: "line",smooth: true,symbolSize: 0, // 设置圆点大小为 0,即不显示圆点},],};this.myChart = this.$echarts.init(document.getElementById("chartsBox")); // 图标初始化this.myChart.setOption(this.option); // 渲染页面var that = this;let index = 0;this.eChartsTimer = setInterval(function () {let len = that.chartsData.time.length;if (index >= len) {index = 0;}that.myChart.dispatchAction({type: "showTip", // 提示框seriesIndex: 0,dataIndex: index, // 第 lightIndex 柱子高亮});index += 1}, 1000);/* ECharts动态效果 */window.addEventListener("resize", () => {this.myChart.resize();});},

http://www.lryc.cn/news/188823.html

相关文章:

  • spring boot+ vue+ mysql开发的一套厘米级高精度定位系统源码
  • 【初试396分】西北工业大学827学长经验分享
  • 【Qt之信号和槽】对象多层嵌套后,高效使用信号和槽
  • 搬砖日记:vue2 用require引入图片项目编译失败
  • 国内外都可以使用的【免费AI工具】,实用性满满
  • 银河麒麟服务器x86安装ntp客户端,并配置成功可以同步时间
  • vue踩的坑:属性报undefined错误问题汇总
  • Ubuntu22.04.3安装教程
  • Vue2和Vue3的emit、props、watch等知识点对比
  • HTML 笔记:初识 HTML(HTML文本标签、文本列表、嵌入图片、背景色、网页链接)
  • 使用弹性盒子flex对html进行布局和动态计算视口高度
  • 华为云云耀云服务器L实例评测|华为云耀云服务器L实例评测用例(五)
  • uniapp-vue3微信小程序实现全局分享
  • Qt如何实现动态背景-视频背景
  • vue按键全屏和F11全屏共存
  • springboot就业信息管理系统springboot32
  • 深入探讨芯片制程设备:从原理到实践
  • Vuex的简介以及入门案例
  • 上海亚商投顾:沪指探底回升 华为汽车概念股集体大涨
  • Android网络监听
  • Kubernetes 常用命令 持续更新
  • 达梦数据库常用命令行
  • 【通信系列 6 -- AT 命令介绍】
  • flask捕获@app.errorhandler/@app.after_request全局异常总结
  • 智能晾衣架丨以科技解放双手
  • asp.net饭店订餐管理系统VS开发sqlserver数据库web结构c#编程Microsoft Visual Studio计算机设计定制
  • Pushgateway的场景使用
  • 时间范围配置(昨天,今天,本周,本月,本季度,本年)
  • PlantUML 绘图
  • spring boot自定义配置时在yml文件输入有提示