Skip to content

Uncaught TypeError: Cannot read property axisData' of undefined #8274

@Scovin

Description

@Scovin

One-line summary [问题简述]

畫boxplot時,
出現 Uncaught TypeError: Cannot read property axisData' of undefined, boxData' of undefined and outliers of undefined

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

ECharts version [ECharts 版本]: 3.0
Browser version [浏览器类型和版本]:火狐,10.0.5版本
OS Version [操作系统类型和版本]:Linux version 2.6.32-279.el6.x86_64 (mockbuild@x86-008.build.bos.redhat.com) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Wed Jun 13 18:24:36 EDT 2012

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
         title: [
             {
             },
             {
                 text: 'upper: Q3 + 1.5 * IRQ \nlower: Q1 - 1.5 * IRQ',
                 borderColor: '#999',
                 borderWidth: 1,
                 textStyle: {
                     fontSize: 14
                 },
                 left: '10%',
                 top: '90%'
             }
         ],
         tooltip: {
             trigger: 'item',
             axisPointer: {
                 type: 'shadow'
             }
         },
         grid: {
             left: '10%',
             right: '10%',
             bottom: '15%'
         },
         xAxis: {
             type: 'category',
             boundaryGap: true,
             data: dataz.axisData,
             nameGap: 30,
             splitArea: {
                 show: false
             },
             axisLabel: {
                 formatter: 'expr {value}'
             },
             splitLine: {
                 show: false
             }
         },
         yAxis: {
             type: 'value',
             name: '不良品數',
             splitArea: {
                 show: true
             }
         },
         series: [
             {
                 name: 'boxplot',
                 type: 'boxplot',
                 data: dataz.boxData,
                 tooltip: {
                     formatter: function (param) {
                         return [
                             'Experiment ' + param.name + ': ',
                             'upper: ' + param.data[5],
                             'Q3: ' + param.data[4],
                             'median: ' + param.data[3],
                             'Q1: ' + param.data[2],
                             'lower: ' + param.data[1]
                         ].join('<br/>')
                     }
                 }
             },
             {
                 name: 'outlier',
                 type: 'scatter',
                 data: data.outliers
             }] 
            
       };

Other comments [其他信息]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions