vue实现echarts中 9种 折线图图例

news2024/9/30 19:30:04

在这里插入图片描述

let datas = [
  { DivideScore: 7, UserScore: 7.2, Name: '目标制定' },
  { DivideScore: 7, UserScore: 7, Name: '具体性' },
  { DivideScore: 7, UserScore: 7.5, Name: '可衡量性' },
  { DivideScore: 7, UserScore: 7, Name: '可实现性' },
  { DivideScore: 7, UserScore: 7, Name: '时间限定' }
];
let aveList = datas.map((n) => {
  return n.DivideScore;
});
let uList = datas.map((n) => {
  return n.UserScore;
});
let nameList = datas.map((n) => {
  return n.Name;
});
option = {
  xAxis: {
    type: 'category',
    data: nameList
  },
  yAxis: {
    type: 'value',
    max: 10,
    axisLabel: {
      formatter: '{value} 分'
    }
  },
  series: [
    {
      type: 'line',
      data: uList,
      color: '#326092',
      label: {
        show: true,
        fontSize: 16,
        position: 'top'
      },
      markLine: {
        itemStyle: {
          color: '#3dc6c8'
        },
        label: {
          fontSize: 16,
          formatter: '平均分',
          itemStyle: {
            color: '#3dc6c8'
          },
          padding: [0, 0, 2.2, 0],
          position: 'end'
        },
        data: [
          [
            {
              name: '两点之间的线',
              coord: [0, aveList[0]]
            },
            {
              name: '两点之间的线',
              coord: [4, aveList[0]]
            }
          ]
        ]
      }
    }
  ]
};

在这里插入图片描述

let datas = [
  { UserScore: 13, Name: '11-23' },
  { UserScore: 15, Name: '11-24' },
  { UserScore: 19, Name: '11-25' },
  { UserScore: 26, Name: '11-26' },
  { UserScore: 18, Name: '11-27' },
  { UserScore: 15, Name: '11-28' },
  { UserScore: 14, Name: '11-29' }
];
let uList = datas.map((n) => {
  return n.UserScore;
});
let nameList = datas.map((n) => {
  return n.Name;
});
 
option = {
  tooltip: {
    trigger: 'axis'
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    data: nameList,
    axisLabel: {
      textStyle: {
        color: '#333',
        fontSize: 20
      }
    },
    // x轴颜色
    axisLine: {
      show: false
    },
    axisTick: {
      show: false
    }
  },
  yAxis: {
    type: 'value',
    boundaryGap: [0, '30%'],
    max: 40,
    // y轴文字颜色
    axisLabel: {
      show: false,
      formatter: '{value} °C'
    },
    axisLine: {
      show: false
    },
    axisTick: {
      show: false
    },
    // 取消网格线
    splitLine: {
      show: false
    }
  },
  series: [
    {
      name: '实时温度',
      type: 'line',
      symbolSize: 8, //折线点的大小
      data: uList,
      label: {
        normal: {
          show: true,
          fontSize: 20,
          position: 'top',
          formatter: '{c} °C'
        }
      },
      color: '#0097F5'
    }
  ]
};

在这里插入图片描述

option = {
    tooltip: {
      trigger: 'axis'
    },
    legend: {
      data: [
        { name: '土壤含水量', icon: 'circle' },
        { name: '土壤温度', icon: 'circle' },
        { name: '土壤电导率', icon: 'circle' }
      ],
      itemWidth: 6, //宽度
      itemHeight: 6, //高度
      itemGap: 30, //间距
      textStyle: {
        color: '#333',
        fontSize: 20,
        lineHight: 20
      }
    },
    xAxis: [
      {
        type: 'category',
        axisTick: {
          alignWithLabel: true
        },
        axisLine: {
          onZero: false,
          lineStyle: {
            color: '#333'
          }
        },
        axisLabel: {//坐标轴刻度标签的相关设置。
          textStyle: {
            color: '#333',
            fontSize:20
          },
          formatter: function (params) {
            var newParamsName = "";// 最终拼接成的字符串
            var paramsNameNumber = params.length;// 实际标签的个数
            var provideNumber = 10;// 每行能显示的字的个数
            var rowNumber = Math.ceil(paramsNameNumber / provideNumber);// 换行的话,需要显示几行,向上取整
            /**
             * 判断标签的个数是否大于规定的个数, 如果大于,则进行换行处理 如果不大于,即等于或小于,就返回原标签
             */
            // 条件等同于rowNumber>1
            if (paramsNameNumber > provideNumber) {
              /** 循环每一行,p表示行 */
              for (var p = 0; p < rowNumber; p++) {
                var tempStr = "";// 表示每一次截取的字符串
                var start = p * provideNumber;// 开始截取的位置
                var end = start + provideNumber;// 结束截取的位置
                // 此处特殊处理最后一行的索引值
                if (p == rowNumber - 1) {
                  // 最后一次不换行
                  tempStr = params.substring(start, paramsNameNumber);
                } else {
                  // 每一次拼接字符串并换行
                  tempStr = params.substring(start, end) + "\n";
                }
                newParamsName += tempStr;// 最终拼成的字符串
              }
 
            } else {
              // 将旧标签的值赋给新标签
              newParamsName = params;
            }
            //将最终的字符串返回
            return newParamsName
          }
 
        },
        data: ['2020/11/24 09:56:23', '2020/11/25 09:56:23', '2020/11/26 09:56:23', '2020/11/27 09:56:23']
      }
    ],
    yAxis: [
      {
        type: 'value',
        // y轴文字颜色
        axisLabel: {
          textStyle: {
            color: '#333',
            fontSize:20
          }
        }
      }
    ],
    series: [
      {
        name: '土壤含水量',
        type: 'line',
        smooth: true,
        data: [320, 332, 301, 334]
      },
      {
        name: '土壤温度',
        type: 'line',
        smooth: true,
        data: [120, 132, 101, 134]
      },
      {
        name: '土壤电导率',
        type: 'line',
        smooth: true,
        data: [862, 1018, 964, 1026],
        markLine: {
          lineStyle: {
            type: 'dashed'
          },
          data: [
            [{ type: 'min' }, { type: 'max' }]
          ]
        }
      },
    ]
  };

在这里插入图片描述

option = {
    tooltip: {
      trigger: 'axis',
      axisPointer: {
        type: 'cross',
        label: {
          backgroundColor: '#6a7985'
        }
      }
    },
    legend: {
      orient: 'horizontal',
      data: [
        {
          name: '水温',
          icon: 'circle'// 用圆点替换
        },
        {
          name: '浊度',
          icon: 'circle'
        },
        {
          name: '酸碱度',
          icon: 'circle'
        },
        {
          name: '化学需氧量',
          icon: 'circle'
        },
        {
          name: '总氮',
          icon: 'circle'
        },
        {
          name: '总磷',
          icon: 'circle'
        },
        {
          name: '溶解氧',
          icon: 'circle'
        },
        {
          name: '水电导率',
          icon: 'circle'
        }
      ],
      itemWidth: 6, //宽度
      itemHeight: 6, //高度
      itemGap: 30,  //间距
      textStyle: {
        color: '#333',
        fontSize: 16,
        lineHight: 20
      }
    },
    grid: {
      top: 100,
      left: 5,
      right: 30,
      bottom: 5,
      containLabel: true
    },
    xAxis: [
      {
        type: 'category',
        boundaryGap: false,
        data: ['11/9', '11/10', '11/11', '11/12'],
        axisLabel: {
          color: '#333',
          fontSize: 18
        },
        axisLine: {
          show: false
        },
        axisTick: {
          show: false
        }
      }
    ],
    yAxis: [
      {
        type: 'value',
        max: 1.0,
        min: 0,
        axisLabel: {
          color: '#333',
          fontSize: 16
        },
        axisLine: {
          show: false
        },
        axisTick: {
          show: false
        },
        // 网格颜色
        splitLine: {
          lineStyle: {
            color: '#00A0E9',
            opacity: 0.5
          }
        }
      }
    ],
    series: [
      {
        name: '水温',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.01, 0.1]
      },
      {
        name: '浊度',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.1, 0.1]
      },
      {
        name: '酸碱度',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.2, 0.1]
      },
      {
        name: '化学需氧量',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.2, 0.1]
      },
      {
        name: '总氮',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.1, 0.1]
      },
      {
        name: '总磷',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.2, 0.1]
      },
      {
        name: '溶解氧',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.12, 0.1, 0.1]
      },
      {
        name: '水电导率',
        smooth: true,
        type: 'line',
        stack: '总量',
        areaStyle: {},
        data: [0.1, 0.1, 0.2, 0.1]
      },
    ]
  };

在这里插入图片描述

option = {
  xAxis: {
    type: 'category',
    boundaryGap: false,
    axisLabel: {
      textStyle: {
        color: '#999', //坐标的字体颜色
        fontSize: 20
      }
    },
    data: ['6月21日', '6月22日', '6月23日', '6月24日', '6月25日', '6月26日', '6月27日']
  },
  yAxis: {
    type: 'value',
    axisLabel: {
      textStyle: {
        color: '#aaa', //坐标的字体颜色
        fontSize: 20
      }
    },
    axisLine: {
      show: false
    },
    axisTick: {
      show: false
    }
  },
  tooltip: {
    trigger: 'axis'
  },
  series: [
    {
      data: [108, 100, 90, 78, 108, 128, 132],
      type: 'line',
      symbolSize: 5, //设定实心点的大小
      symbolColor: '#2e6bd3',
      areaStyle: {
        color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
          {
            offset: 0,
            color: 'rgb(48, 115,230)'
          },
          {
            offset: 1,
            color: 'rgb(13, 34, 66)'
          }
        ])
      },
      label: {
        show: true,
        position: 'top',
        textStyle: {
          color: '#999',
          fontSize: 20
        }
      },
      lineStyle: {
        color: '#2e6bd3'
      }
    }
  ]
};

在这里插入图片描述

option = {
  grid: {
    top: '20%',
    left: '5%',
    right: '5%',
    bottom: '3%'
  },
  title: {
    text: '期待的我',
    left: 'center'
  },
  xAxis: {
    type: 'category',
    data: ['D', 'I', 'S', 'C'],
    show: true,    // 是否显示x轴
    position: 'top',    // x轴的位置(top/bottom)
    axisTick: {
        show: false    // 是否显示坐标轴刻度
    },
    axisLabel: {
        show: true,     // 是否显示刻度标签
        interval: '0',    // 坐标轴刻度标签的显示间隔,在类目轴中有效.0显示所有
        color: '#fff',// 刻度标签文字的颜色
        width: 35,
        lineHeight: 35,    // 行高
        borderRadius: 10,
        fontSize: 20,    // 文字字体大小
        backgroundColor: '#999'
        
    },
    splitLine: {
        show: true,    // 是否显示分隔线。默认数值轴显示,类目轴不显示
        interval: '0',    // 坐标轴刻度标签的显示间隔,在类目轴中有效.0显示所有
        color: ['#ccc'],    
        width: 3, // 分隔线线宽
        type: 'solid', // 坐标轴线线的类型(solid实线类型;dashed虚线类型;dotted点状类型)
    }
  },
  yAxis: {
    type: 'value',
    show: true,
    max: 10,
    axisLabel: {
        show: false
    },
    splitArea: {
        show: true, // 是否显示分隔区域
        interval: 0, // 坐标轴刻度标签的显示间隔,在类目轴中有效.0显示所有
        areaStyle: {
            // color分隔区域颜色。分隔区会按数组中颜色顺序依次循环设置颜色。默认是一个深浅的间隔色
            color: ['rgba(250,250,250,0.3)','rgba(200,200,200,0.3)'], 
            opacity: 1, // 图形透明度。支持从0到1的数字,为0时不绘制该图形
        },
    }
  },
  visualMap: {
    show: false,
    dimension: 0,
    pieces: [
      {
        lte: 0,
        color: '#ff0000'
      },
      {
        gt: 0,
        lte: 1,
        color: '#fca906'
      },
      {
        gt: 1,
        lte: 2,
        color: '#00b050'
      },
      {
        gt: 2,
        lte: 3,
        color: '#00b1f2'
      }
    ]
  },
  series: [
    {
      type: 'line',
      lineStyle: {
          color: "#333", //线条颜色
      },
      symbol: 'circle',
      symbolSize: 20,
      data: [5, 7, 2, 8],
      itemStyle: {
        normal: {
            label: {
                show: true, // 是否显示
                position: 'right', // 显示位置
                color: '#333',
                fontSize: 20
            }
        }
    },
    markLine: {
        lineStyle: {
            type: 'solid',
        },
        // symbol: ['none', 'none'],
        label: { show: false },
        data: [
          { 
            xAxis: 0,
            lineStyle: {
                color: '#ff0000'
            }
          },
          {
            xAxis: 1,
            lineStyle: {
               color: '#fca906',
              
            }
          }, 
          {
            xAxis: 2,
            lineStyle: {
               color: '#00b050'
            }
          },  
          {
            xAxis: 3,
            lineStyle: {
               color: '#00b1f2',
               barWidth:260
            }
          }
        ]
      }
    }
  ]
};

在这里插入图片描述

option = {
  backgroundColor: '#173565',
  visualMap: [
    {
      show: false,
      type: 'continuous',
      seriesIndex: 0,
      min: 0,
      max: 400
    },
    {
      show: false,
      type: 'continuous',
      seriesIndex: 1,
      dimension: 0,
      min: 0,
      max: 100
    }
  ],
  title: [
    {
      top: '2%',
      left: 'center',
      text: '初中',
      textStyle: {
        color: '#fff',
        fontSize: 15
      }
    },
    {
      top: '55%',
      left: 'center',
      text: '高中',
      textStyle: {
        color: '#fff',
        fontSize:15
      }
    }
  ],
  tooltip: {
    trigger: 'axis'
  },
  xAxis: [
    {
      boundaryGap: false,
      axisLabel: {
        fontSize: 12,
        color: '#fff'
      },
      axisLine: {
        show: true
      },
      splitLine: {
        show: false
      },
      data: ['初一一班', '初一一班', '初一一班', '初一一班', '初一一班', '初一一班', '初一一班']
    },
    {
      gridIndex: 1,
      boundaryGap: false,
      axisLabel: {
        fontSize: 12,
        color: '#fff'
      },
      axisLine: {
        show: true
      },
      splitLine: {
        show: false
      },
      data: ['初一一班', '初一一班', '初一一班', '初一一班', '初一一班', '初一一班', '初一一班']
    }
  ],
  yAxis: [
    {
      type: 'value',
      boundaryGap: true,
      axisLabel: {
        fontSize: 12,
        color: '#fff'
      },
      axisLine: {
        show: true
      },
      splitLine: {
        show: false
      }
    },
    {
      gridIndex: 1,
      type: 'value',
      boundaryGap: true,
      axisLabel: {
        fontSize: 12,
        color: '#fff'
      },
      axisLine: {
        show: true
      },
      splitLine: {
        show: false
      }
    }
  ],
  grid: [
    {
      top: '10%',
      bottom: '55%',
      left: '7%',
      right: '7%'
    },
    {
      top: '60%',
      bottom: '5%',
      left: '7%',
      right: '7%'
    }
  ],
  series: [
    {
      type: 'line',
      smooth: true,
      data: [120, 132, 101, 134, 90, 230, 210],
      symbol: 'circle', //拐点样式
      symbolSize: 4, //拐点大小
      // 折线条的样式
      lineStyle: {
        color: 'rgba(0,0,0,0)'
      },
      // 折线拐点的样式
      itemStyle: {
        normal: { // 静止时:
          color: '#fff',
          borderColor: "#fff",//拐点的边框颜色
          borderWidth: 4
        },
        emphasis: { // 鼠标经过时:
          color: '#fff',
        }
      },
      areaStyle: {
        color: {
          type: 'linear',
          x: 0,
          y: .5,
          x2: 0,
          y2: 1,
          colorStops: [{
              offset: 0, color: '#00EAD1' // 0% 处的颜色
          }, {
              offset: 1, color: '#0055CB' // 100% 处的颜色
          }],
          global: false // 缺省为 false
        }
      }
    },
    {
      type: 'line',
      smooth: true,
      data: [120, 132, 101, 134, 90, 230, 210],
      symbol: 'circle', //拐点样式
      symbolSize: 4, //拐点大小
      // 折线条的样式
      lineStyle: {
        color: 'rgba(0,0,0,0)'
      },
      // 折线拐点的样式
      itemStyle: {
        normal: { // 静止时:
          color: '#fff',
          borderColor: "#fff",//拐点的边框颜色
          borderWidth: 4
        },
        emphasis: { // 鼠标经过时:
          color: '#fff',
        }
      },
      areaStyle: {
        opacity: 1,
        color: new echarts.graphic.LinearGradient(0, .5, 0, 1, [
          {
            offset: 0,
            color: '#FFAB2E'
          },
          {
            offset: 1,
            color: '#33B6FF'
          }
        ])
      },
      xAxisIndex: 1,
      yAxisIndex: 1
    }
  ]
};

在这里插入图片描述

option = {
  backgroundColor: '#131724',
  legend: {
    data: ['高中', '初中'],
    x: 'right',
    y: '0%',
    itemGap: 20,
    orient: 'vertical',
    textStyle: {
      color: '#fff',
      fontSize: 14
    }
  },
  tooltip: {
    trigger: 'item',
    formatter: '[{a}] {b}<br/>考试数量:{c}',
    position: 'top',
    backgroundColor: 'rgba(0,0,0,.3)',
    borderColor: 'rgba(255,255,255,.2)',
    color: '#fff',
    extraCssText: 'box-shadow: 0 0 0 rgba(255,255,255, .5); color: #fff;',
    zIndex: 400
  },
  xAxis: [
    {
      boundaryGap: true,
      axisLabel: {
        fontSize: 14,
        color: '#4FFFFA',
        interval: 0,
        rotate: 0,
        padding: [0, 0, 0, -30]
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: '#2F4276'
        }
      },
      axisTick: {
        show: false
      },
      splitLine: {
        show: false
      },
      data: ['高一', '高二', '高三']
    },
    {
      boundaryGap: true,
      axisLabel: {
        fontSize: 14,
        color: '#4FFFFA',
        interval: 0,
        rotate: 0,
        padding: [0, 0, 0, 40]
      },
      position: 'bottom',
      axisLine: {
        show: true,
        lineStyle: {
          color: '#2F4276'
        }
      },
      axisTick: {
        show: false
      },
      splitLine: {
        show: false
      },
      data: ['初一', '初二', '初三']
    }
  ],
  yAxis: [
    {
      type: 'value',
      max: 10,
      name: '(班/数量)',
      // 居中
      nameLocation: 'end',
      // 坐标轴名称与轴线之间的距离。
      nameGap: 13,
      nameTextStyle: {
        color: '#2CFFF9',
        fontSize: 10,
        padding: [0, 0, 0, -30]
      },
      nameRotate: 360,
      axisLabel: {
        fontSize: 14,
        color: '#4FFFFA'
      },
      axisLine: {
        show: true,
        lineStyle: {
          color: '#2F4276'
        }
      },
      splitLine: {
        show: false
      }
    }
  ],
  grid: {
    top: '10%',
    bottom: '10%',
    left: '7%',
    right: '7%'
  },
  series: [
    {
      name: '初中',
      type: 'line',
      smooth: true,
      // 折线条的样式
      lineStyle: {
        color: {
          type: 'linear',
          x: 0,
          y: 0.5,
          x2: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0,
              color: '#84A7FF' // 0% 处的颜色
            },
            {
              offset: 0.5,
              color: '#0368FF' // 50% 处的颜色
            },
            {
              offset: 1,
              color: '#5783F6' // 100% 处的颜色
            }
          ],
          global: false // 缺省为 false
        }
      },
      // 折线拐点的样式
      itemStyle: {
        normal: {
          // 静止时:
          color: 'rgba(0,0,0,0)'
        }
      },
      emphasis: {
        focus: 'series'
      },
      data: [
        { name: '初一', value: 5 },
        { name: '初二', value: 8 },
        { name: '初三', value: 3 }
      ]
    },
    {
      name: '高中',
      type: 'line',
      smooth: true,
      // 折线条的样式
      lineStyle: {
        color: {
          type: 'linear',
          x: 0,
          y: 0.5,
          x2: 0,
          y2: 1,
          colorStops: [
            {
              offset: 0,
              color: '#FF31C5' // 0% 处的颜色
            },
            {
              offset: 0.5,
              color: '#9003FF' // 50% 处的颜色
            },
            {
              offset: 1,
              color: '#FF849A' // 100% 处的颜色
            }
          ],
          global: false // 缺省为 false
        }
      },
      // 折线拐点的样式
      itemStyle: {
        normal: {
          // 静止时:
          color: 'rgba(0,0,0,0)'
        }
      },
      data: [
        { name: '高一', value: 1 },
        { name: '高二', value: 2 },
        { name: '高三', value: 9 }
      ]
    }
  ]
};

在这里插入图片描述

let yData = [20, 80, 60, 77];
let xTime = ['2023.3.28', '2023.4.28', '2023.5.28', '2023.6.15'];
option = {
  backgroundColor: '#000',
  tooltip: {
    trigger: 'axis',
    formatter: function (param) {
      let resultTooltip =
          "<div style='border:1px solid rgba(255,255,255,.2);padding:5px;border-radius:3px;'>" +
          "<div>" + param[0].name + "</div>" +
          "<div style='padding-top:5px; font-size:10px;color:#999;'>" +
          "<span style='display: inline-block; width: 10px; height:10px; border-radius: 50%;background: " + param[0].color + ";'></span>" +
          "<span style=''> " + param[0].seriesName + ":</span>" +
          "<span style='font-size:16px;color:" + param[0].color + "'>" + param[0].value + "</span></span>" +
          "</div>";
      return resultTooltip
    },
    position: 'right',
    padding: [5, 8],
    textStyle: {
      color: '#eee',
      fontSize: 13
    },
    axisPointer: {
      type: 'line',
      label: { show: true, backgroundColor: 'transparent' },
      lineStyle: {
        color: {
          type: 'linear',
          x: 0,
          y: 0,
          x2: 0,
          y2: 1,
          colorStops: [
            { offset: 0, color: 'rgba(100, 101, 171, 0)' },
            { offset: 0.5, color: 'rgba(100, 101, 171, 0.2)' },
            { offset: 0.999999, color: 'rgba(100, 101, 171, 1)' },
            { offset: 1, color: 'rgba(100, 101, 171, 1)' }
          ],
          global: false
        },
        type: 'solid',
        width: 40
      }
    },
    backgroundColor: 'rgba(13,5,30,.6)',
    extraCssText: 'z-index:1' // 层级
  },
  legend: {
    show: false,
    data: ['得分'],
    icon: 'circle',
    x: 'center',
    y: '0',
    itemGap: 20,
    // orient: 'vertical', // 纵向分布
    textStyle: {
      color: '#fff',
      fontSize: 12
    }
  },
  grid: {
    top: '15%',
    left: '3%',
    right: '6%',
    bottom: '2%',
    containLabel: true
  },
  xAxis: {
    type: 'category',
    boundaryGap: false,
    name: '时间',
    nameLocation: 'center',
    nameTextStyle: {
      color: '#8F8F8F',
      fontSize: 12,
      padding: [0, 0, 0, 1505]
    },
    data: xTime,
    axisLabel: {
      fontSize: 10,
      color: '#8F8F8F'
    },
    axisLine: {
      show: false
    },
    splitLine: {
      show: true,
      lineStyle: {
        color: 'rgba(62, 100, 151, 0.29)'
      }
    },
    axisTick: {
      show: false
    }
  },
  yAxis: {
    type: 'value',
    name: '百分制',
    nameLocation: 'end',
    nameGap: 10,
    max: 100,
    nameTextStyle: {
      color: '#8F8F8F',
      fontSize: 12,
      padding: [0, 0, 5, -45]
    },
    boundaryGap: true,
    interval: 10, //间隔
    axisLabel: {
      fontSize: 12,
      color: '#8F8F8F'
    },
    axisLine: {
      show: false
    },
    splitLine: {
      show: true,
      lineStyle: {
        color: 'rgba(62, 100, 151, 0.29)'
      }
    },
    axisTick: {
      show: false
    }
  },
  series: [
    {
      name: '得分',
      data: yData,
      type: 'line',
      symbolSize: 0.2, // 原点大小
      smooth: true,
      zlevel: 1, // 层级
      label: {
        normal: {
          position: 'right',
          show: true,
          color: '#eee',
          fontSize: 13,
          formatter: function (params) {
            return params.data + '分';
          }
        }
      },
      // 折线拐点的样式
      itemStyle: {
        normal: {
          // 静止时:
          color: '#0088FF',
          borderColor: '#0088FF', //拐点的边框颜色
          borderWidth: 2
        },
        emphasis: {
          // 鼠标经过时:
          color: '#4CF8C5'
        }
      },
      areaStyle: {
        color: new echarts.graphic.LinearGradient(0, 0.1, 0, 1, [
          {
            offset: 0,
            color: 'rgba(0, 199, 242, .9)'
          },
          {
            offset: 1,
            color: 'rgba(0, 199, 242, .2)'
          }
        ])
      },
      emphasis: {
        focus: 'series'
      }
    }
  ]
};

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1072760.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【软件测试】一份合格的软件测试简历长什么样?

你可以写一篇出众的软件测试简历并且这篇测试用例能够为你带来面试电话么&#xff1f;如果没有&#xff0c;请继续阅读。我敢肯定&#xff0c;读完这篇文章&#xff0c;你将能够写出一个完美的杀手级别的软件测试和质量保证的简历&#xff0c;这将为你带来面试电话。 你的简历是…

图片调色盘

图片预览 配置安装 Color-Thief 安装包使用文档 yarn add colorthief -S // npm install colorthief --save代码 <template><div class"img-thief"><div class"container"><div class"thief-item" v-for"(item, in…

邮件误操作删除,如何找回?这里有救援方法!

用户遇到的问题 ​“邮件不慎删除&#xff0c;要如何找回呢&#xff1f;今天我在查阅邮件的过程中&#xff0c;我注意到一封带附件的邮件&#xff0c;原本是打算将其另存到其他位置&#xff0c;却无意间点击了删除&#xff0c;这之后就再也无法找回了。现在我应该怎么办&am…

java生成带logo的二维码和下方带内容的条形码

一、导入zxing包 <!-- zxing --><dependency><groupId>com.google.zxing</groupId><artifactId>core</artifactId><version>3.5.2</version></dependency><dependency><groupId>com.google.zxing</group…

【数据结构】归并排序和计数排序(排序的总结)

目录 一&#xff0c;归并排序的递归 二&#xff0c;归并排序的非递归 三&#xff0c;计数排序 四&#xff0c;排序算法的综合分析 一&#xff0c;归并排序的递归 基本思想&#xff1a; 归并采用的是分治思想&#xff0c;是分治法的一个经典的运用。该算法先将原数据进行拆…

what?es数据偏移了8小时...

今天搞监控大屏的时候&#xff0c;测试突然提出一个问题说&#xff0c;查一段时间的数据&#xff0c;时间曲线返回的日期有时候会比查询时间多&#xff0c;翻看代码后&#xff0c;初步定位为es的时区问题&#xff0c;后来将时间曲线的直方图聚合增加时区后&#xff0c;返回数据…

android studio 、JDK环境变量配置

1、adb.exe环境变量配置&#xff1a; 打开控制面板 >系统和安全>系统>高级系统设置 在系统变量中新建ANDROID_HOME变量&#xff0c;赋值路径&#xff1a;D:\install\androidSDK 在系统变量path中添加&#xff1a;%ANDROID_HOME%\platform-tools 校验是…

14:00面试,14:06就出来了,这面试问的过于变态了。。。

前言 刚从小厂出来&#xff0c;没想到在另一家公司我又寄了。 在这家公司上班&#xff0c;每天都要加班&#xff0c;但看在钱给的比较多的份上&#xff0c;也就不太计较了。但万万没想到十月一纸通知&#xff0c;所有人不准加班了&#xff0c;不仅加班费没有了&#xff0c;薪资…

什么是事件对象(event object)?如何使用它获取事件信息?

聚沙成塔每天进步一点点 ⭐ 专栏简介 前端入门之旅&#xff1a;探索Web开发的奇妙世界 欢迎来到前端入门之旅&#xff01;感兴趣的可以订阅本专栏哦&#xff01;这个专栏是为那些对Web开发感兴趣、刚刚踏入前端领域的朋友们量身打造的。无论你是完全的新手还是有一些基础的开发…

分类预测 | MATLAB实现KOA-CNN-LSTM开普勒算法优化卷积长短期记忆神经网络数据分类预测

分类预测 | MATLAB实现KOA-CNN-LSTM开普勒算法优化卷积长短期记忆神经网络数据分类预测 目录 分类预测 | MATLAB实现KOA-CNN-LSTM开普勒算法优化卷积长短期记忆神经网络数据分类预测分类效果基本描述程序设计参考资料 分类效果 基本描述 1.MATLAB实现KOA-CNN-LSTM开普勒算法优化…

NFTScan | 10.02~10.08 NFT 市场热点汇总

欢迎来到由 NFT 基础设施 NFTScan 出品的 NFT 生态热点事件每周汇总。 周期&#xff1a;2023.10.02~ 2023.10.08 NFT Hot News 01/ 9 月 OpenSea 交易额为 7300 万美元&#xff0c;创两年新低 10 月 2 日&#xff0c;数据显示 9 月 NFT 平台 OpenSea 的交易总额为 73,141,407…

Pyside6 QPushButton

Pyside6 QPushButton QPushButton使用QPushButton继承关系QPushButton的函数(Function)和信号(Signal)QPushButton信号 QPushButton例程界面设计clicked信号测试pressed信号测试released信号测试toggled信号测试按键长按测试按键长按间隔测试完整程序界面程序主程序 按键或命令…

2023年【陕西省安全员C证】新版试题及陕西省安全员C证考试试卷

题库来源&#xff1a;安全生产模拟考试一点通公众号小程序 陕西省安全员C证新版试题是安全生产模拟考试一点通总题库中生成的一套陕西省安全员C证考试试卷&#xff0c;安全生产模拟考试一点通上陕西省安全员C证作业手机同步练习。2023年【陕西省安全员C证】新版试题及陕西省安…

Idea本地跑flink任务时,总是重复消费kafka的数据(kafka->mysql)

1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 Idea中执行任务时&#xff0c;没法看到JobManager的错误&#xff0c;以至于我以为是什么特殊的原因导致任务总是反复消费。在close方法中&#xff0c;增加日志&#xff0c;发现jdbc连接被关闭了。 重新…

通讯网关软件019——利用CommGate X2OPCUA实现OPC UA访问Oracle服务器

本文介绍利用CommGate X2OPCUA实现OPC UA访问ORACLE数据库。CommGate X2OPCUA是宁波科安网信开发的网关软件&#xff0c;软件可以登录到网信智汇(http://wangxinzhihui.com)下载。 【案例】如下图所示&#xff0c;实现上位机通过OPC UA来获取ORACLE数据库的数据。 【解决方案】…

windows docker desktop配置加速地址

目录 为什么常见加速地址在docker desktop上配置 为什么 https://hub.docker.com 是官方的镜像仓库地址&#xff0c;但是它的服务器地址是在国外&#xff0c;有时候访问和下载的速度差强人意。不过好在&#xff0c;我们可以进行远程仓库的设置&#xff0c;将仓库镜像地址设置为…

2023,全网最真实的自动化测试学习路线,看不懂来打我!

随着测试行业的发展&#xff0c;“会代码”越来越成为测试工程师的一个标签。打开各大招聘网站&#xff0c;测试工程师月薪一万以上基本都有一个必备技能&#xff0c;那就是自动化测试。那么自动化测试到底难不难呢&#xff1f;下面我将会将我的经历讲给大家听&#xff0c;希望…

1556. 千位分隔数

1556. 千位分隔数 C代码&#xff1a; char * thousandSeparator(int n){char* str (char*)malloc(sizeof(char) * 20);int len sprintf(str, "%d", n);int len2 0;if (len % 3 0) {len2 len len / 3 - 1;} else {len2 len len / 3;}char* ans (char*)malloc…

FTP服务器搭建

操作系统系列文章 VMware Workstation Player 17 免费下载安装教程 VMware Workstation 17 Pro 免费下载安装教程 windows server 2012安装教程 Ubuntu22.04.3安装教程 FTP服务器搭建 FTP服务器搭建教程 操作系统系列文章前言基本概念介绍一、安装FTP服务二、配置ftp服务三、建…

androidStudio第一次运行报错无法运行

安卓第一次运行失败 大家好&#xff0c;我使用androidStudio新建了一个测试demo第一次运行&#xff0c;结果失败了&#xff0c;显示如下图&#xff1a; 然后查了各种方法&#xff0c;都是没有用&#xff0c;最后 历经困难&#xff0c;还是找到了&#xff0c;原来是 gradle的依…