Support » Plugin: M Chart » Bubble chart throws “error 17”

  • Resolved Patrick

    (@pjohanneson)


    When I try to set the chart type to Bubble, the Publish / Update button becomes greyed out and the following error appears in the JS console:

    highcharts.js?ver=1.6.2:10 Uncaught Error: Highcharts error #17: www.highcharts.com/errors/17
        at Object.a.error (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:10:49)
        at a.Chart.initSeries (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:240:283)
        at http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:264:42
        at Array.forEach (native)
        at a.each (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:26:471)
        at a.Chart.firstRender (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:264:13)
        at a.Chart.init (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:240:174)
        at a.Chart.getArgs (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:239:189)
        at a.Chart (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:238:501)
        at a.fn.init.G.jQuery.G.jQuery.fn.highcharts (http://new-look.mancini.brandonu.ca/economic-impact/wp-content/plugins/m-chart/components/external/highcharts/highcharts.js?ver=1.6.2:31:67)

    According to the supplied URL (https://www.highcharts.com/errors/17), “error 17” means:

    The requested series type does not exist
    This error happens when you are setting chart.type or series.type to a series type that isn’t defined in Highcharts. A typical reason may be that your are missing the extension file where the series type is defined, for example in order to run an arearange series you need to load the highcharts-more.js file.

    Any assistance would be appreciated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I found a work-around.

    In m-chart/components/class-m-chart-highcharts.php, I changed this:

    
    if ( 'bubble' == $this->post_meta['type'] ) {
        wp_enqueue_script( 'highcharts-more' );
    }
    

    to this:

    
    // if ( 'bubble' == $this->post_meta['type'] ) {
        wp_enqueue_script( 'highcharts-more' );
    // }
    

    ie, I forced the highcharts-more script to always load. That made it work.

    (I think the issue is probably more to do with the highcharts-more script not being enqueued in the admin screens when the chart type is changed to Bubble. I’m guessing it’s an AJAX thing.)

    Plugin Author methnen

    (@methnen)

    Nice find Patrick. I need to adjust that. The not loading it all the time was meant for the front end.

    So this would be preserve that:

    
    if ( 'bubble' == $this->post_meta['type'] || is_admin() ) {
        wp_enqueue_script( 'highcharts-more' );
    }
    

    I’ll make sure this gets patched in the next version.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bubble chart throws “error 17”’ is closed to new replies.