Echartjs axis.getAxesOnZeroOf is not a function

时间:2019-12-12 19:34:01   收藏:0   阅读:1831

问题描述:

  axis.getAxesOnZeroOf is not a function

  使用echart 出现报这句错误,请求解决方案!

报错的option

option = {
    "titlePosition": "{\"x\":\"center\",\"y\":\"top\"}",
    "title": {
        "x": "center",
        "y": "top",
        "text": "ggg"
    },
    "series": [{
        "name": "ASX1",
        "no": "ASX1",
        "type": "line",
        "yAxisIndex": 0,
        "xAxisIndex": 0,
        "color": "#c23531",
        "lineStyle": {
            "width": 2
        },
        "instrumentNo": "ASX1",
        "instrumentId": "a2a2d5bd-1c48-e5e1-8ccb-39f199ad241f",
        "dataIndex": "ASX1",
        "x": 0,
        "y": 0,
        "typeShow": "线状图",
        "map": "",
        "xValue": "measureTime",
        "yValue": "",
        "showMax": false,
        "showMin": false,
        "showAvg": false,
        "showArea": false,
        "smooth": true,
        "connectNulls": true,
        "width": 2,
        "xShow": "观测时间",
        "yShow": "ggg"
    }],
    "tooltip": {
        "trigger": "axis",
        "axisPointer": {
            "type": "cross"
        }
    },
    "toolbox": {
        "feature": {
            "saveAsImage": {
                "show": true
            }
        }
    },
    "legend": {
        "type": "scroll",
        "orient": "horizontal",
        "left": "center",
        "right": "left",
        "width": "auto",
        "y": 30,
        "data": [{
            "name": "ASX1"
        }],
        "icon": "roundRect"
    },
    "xAxis": [{
        "dataIndex": "measureTime",
        "map": "measureTime",
        "name": "观测时间",
        "type": "time",
        "showSplitLine": true,
        "showSplitArea": true,
        "axisTick": {
            "alignWithLabel": true
        },
        "splitLine": {
            "show": true
        },
        "splitArea": {
            "show": true
        },
        "axisLine": {
            "onZero": false
        },
        "axisLabel": {}
    }],
    "yAxis": [{
        "showSplitLine": true,
        "name": "ggg",
        "type": "category",
        "position": "left",
        "offset": 0,
        "measure": "",
        "showSplitArea": false,
        "splitNumber": "5",
        "splitNumbers": "10",
        "splitLine": {
            "show": true
        },
        "splitArea": {
            "show": false
        },
        "axisLabel": {}
    }],
    "backgroundColor": "",
    "dataset": {
        "source": [{
            "measureTime": "2019-02-18T16:00:00.000Z",
            "ASX1no": "No49",
            "ASX1d1": 109.99,
            "ASX1d2": 131.92,
            "ASX1d3": 34.38,
            "ASX1d4": 59.82,
            "ASX1d5": 35.4,
            "ASX1d6": 161.18,
            "ASX1d7": 69.8,
            "ASX1d8": 173.72,
            "ASX1d9": 88.02,
            "ASX1d10": 88.83,
            "ASX1d11": 149.24,
            "ASX1d12": 43.22,
            "ASX1d13": 177.12,
            "ASX1d14": 167.76,
            "ASX1d15": 161.92,
            "ASX1d16": 186.19,
            "ASX1d17": 122.45,
            "ASX1d18": 117.72,
            "ASX1d19": 179.29,
            "ASX1d20": 185.6,
            "ASX1d21": 40.86,
            "ASX1d22": 251.05,
            "ASX1d23": 305.63,
            "ASX1d24": 43.42,
            "ASX1d25": 96.99,
            "ASX1d26": 225.59,
            "ASX1d27": 289.25,
            "ASX1d28": 234.97,
            "ASX1d29": 65.83,
            "ASX1d30": 172.56
        }]
    },
    "grid": {
        "y": 90
    }
}

 

解决方案:

原文:https://www.cnblogs.com/gzbit-zxx/p/12030974.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!