
<template>
  <div
    id="linechar_n"
    style="width: 1900px; height: 350px; margin-right: 30px; margin: auto"
  ></div>
</template>
<script>
import * as echarts from "echarts";
export default {
  data() {
    return {
      getChartData: [],
    };
  },
  methods: {
    drawLine_n(lineDate,fj) {
      var chartDom1 = document.getElementById("linechar_n");
      var myChart1 = echarts.init(chartDom1);
      var option1;

      option1 = {
        title: {
          text: "月功率曲线",
        },
        tooltip: {
          trigger: "axis",
        },
        legend: {
          data: fj,
        },
        grid: {
          left: "3%",
          right: "4%",
          bottom: "3%",
          containLabel: true,
        },
        toolbox: {
          feature: {
            saveAsImage: {},
          },
        },
        xAxis: {
          type: "category",
          boundaryGap: false,

          data: lineDate.speed,
        },
        yAxis: {
          type: "value",
        },
        series: [
          {
            name:fj[0],
            type: "line",
            stack: "总量",
            smooth: true,
            data: lineDate.value1,
          },
          {
            name:fj[1],
            type: "line",
            stack: "总量",
            smooth: true,
            data: lineDate.value2,
          },
          {
            name:fj[2],
            type: "line",
            stack: "总量",
            smooth: true,
            data: lineDate.value3,
          },
          {
            name:fj[3],
            type: "line",
            stack: "总量",
            smooth: true,
            data: lineDate.value4,
          },
          {
            name:fj[4],
            type: "line",
            stack: "总量",
            smooth: true,
            data: lineDate.value5,
          },
        ],
      };

      option1 && myChart1.setOption(option1);
    },
  },
};
</script>
  

