Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line类型在react中使用时报错(createListFormArray.js:90 'get' of undefined) #2758

luofei2011 opened this issue Mar 8, 2016 · 2 comments


Copy link

luofei2011 commented Mar 8, 2016

问题简述 (One-line summary)

echart3.1.2 在react使用中,type:'line'时报错createListFromArray.js:90 Uncaught TypeError: Cannot read property 'get' of undefined

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version):3.1.2
  • 浏览器类型和版本 (Browser version):chrome 49
  • 操作系统类型和版本 (OS Version): windows8

重现步骤 (Steps to reproduce)

import echarts from 'echarts/lib/echarts';
import 'echarts/lib/chart/line';

期望结果 (Expected behaviour)


可能哪里有问题 (What went wrong)


ECharts配置项 (ECharts option)

option = {
 xAxis: {
        type: 'value',
        splitLine: {
            show: false
    yAxis: {
        type: 'value',
        splitLine: {
            show: false
    series: [{
        type: 'line',
        showSymbol: false,
        hoverAnimation: false,
        data: [[1,3],[2,4], [5,6],[9,100]]

其他信息 (Other comments)

Copy link

pissang commented Mar 8, 2016

还需要引入 grid 组件

import 'echarts/lib/component/grid';

@pissang pissang closed this as completed Mar 9, 2016
Copy link

luofei2011 commented Mar 22, 2016

引入echarts/lib/component/grid之后,除了Line;其它的Map、Pie、Gauge都带了网格……设置grid: {show: false}也没用。


另外,map在react中使用,hover的时候特别卡。感觉是地图精度太高,计算过于复杂 ?(已解决)

componentDidMount() {
    $.getJSON('/assets/json/heilongjiang.json', function (geoJson) {
            echarts.registerMap('HLJ', geoJson);
            // setOption

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants