• vcharts bug All In One


    v-charts bug All In One

    one point data, no symbol bug

        chartExtend () {
            const type = this.options.settings.type;
            return {
                ...UtilChart.chartExtend(type),
                grid: {
                    bottom: 0,
                },
                legend: {
                    show: this.options.settings.type !== 'pie',
                },
                series (v) {
                    return v.map((i) => ({
                        ...i,
                        barMaxWidth: 12,
                        symbol: 'none',
                    }));
                },
            };
        },
    

    solution

        chartExtend () {
            const type = this.options.settings.type;
            return {
                ...UtilChart.chartExtend(type),
                grid: {
                    bottom: 0,
                },
                legend: {
                    show: this.options.settings.type !== 'pie',
                },
                series (v) {
                    return v.map((i) => ({
                        ...i,
                        barMaxWidth: 12,
                        // symbol: 'none',
                        //  为什么要隐藏 symbol 呀!
                    }));
                },
            };
        },
    

    demo

    echarts

    https://echarts.apache.org/examples/zh/editor.html?c=line-stack

    
    option = {
      title: {
        text: 'Stacked Line'
      },
      tooltip: {
        trigger: 'axis'
      },
      legend: {
        data: ['Email', 'Union Ads', 'Video Ads']
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      toolbox: {
        feature: {
          saveAsImage: {}
        }
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['Mon']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          name: 'Email',
          type: 'line',
          stack: 'Total',
          data: [1,]
        },
        {
          name: 'Union Ads',
          type: 'line',
          stack: 'Total',
          data: [220]
        },
        {
          name: 'Video Ads',
          type: 'line',
          stack: 'Total',
          data: ['']
        },
      ]
    };
    
    

    refs

    https://www.cnblogs.com/xgqfrms/p/15701229.html

    https://v-charts.xgqfrms.xyz/#/props-demo2



    ©xgqfrms 2012-2020

    www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

    原创文章,版权所有©️xgqfrms, 禁止转载 ️,侵权必究⚠️!


    xgqfrms
  • 相关阅读:
    Ubantu Mark
    异或
    C语言读书笔记
    Mark
    Python文件操作
    (转)Hadoop系列-IPC模型
    Java动态代理
    (转)适配器模式--Adapter Pattern
    关于abstract class 和 interface
    单例模式
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/15745493.html
Copyright © 2020-2023  润新知