Vue Echarts 绘制多Y轴折线图

<template>
  <v-app>
    <v-main>
      <v-row>
        <v-col cols="12">
          <v-card height="600" class="ml-3 mt-3" flat>
            <div id="manyYAxisChart" style="height: 100%;width: 100%" class="mychart"></div>
          </v-card>
        </v-col>
      </v-row>
    </v-main>
  </v-app>
</template>

<script>
  export default {
    name: "EchartsManyYAxis",
    mounted() {
      this.drawManyYAxisChart();
    },
    methods: {
      drawManyYAxisChart(){
        //随机数生成
        // const a = Math.floor(Math.random() * (max - min + 1)) + min;
        //随机生成多个Y轴的数据
        let allData = [];
        //i为多少个Y轴的数据
        for (let i=0; i<9; i++){
          allData[i]=[];
          // j是有多少条数据
          for (let j=0; j<15; j++){
            let randomNum
            if (j === 0){
              randomNum = Math.floor(Math.random() * (300 - 1 + 1)) + 1;
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值