Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author methnen

    (@methnen)

    The chart images are already generated for each chart and are attached to the chart post as a featured image. So any of the functions that can retrieve a featured image URL could do the same for a chart using the Chart ID #.

    Does that make sense?

    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    No I do not mean that. Please see: https://jsfiddle.net/xpfzvdzw/ on top right side, there is download button.

    I actually see “exporting”:{“enabled”:false}” in args. So how can I change that arg?

    Plugin Author methnen

    (@methnen)

    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    What is wrong here:

    return array(
    ‘colors’ => array(
    ‘#058DC7’, ‘#50B432’, ‘#ED561B’, ‘#DDDF00’, ‘#24CBE5’, ‘#64E572’,
    ‘#FF9655’, ‘#FFF263’, ‘#6AF9C4’,
    ),
    ‘exporting’ => array(
    ‘enabled’ => true,
    )
    );

    Plugin Author methnen

    (@methnen)

    Looks fine from this end. Are you enqueing the exporting module as well?

    wp_enqueue_script( 'highcharts-exporting' );

    • This reply was modified 4 years, 10 months ago by methnen.
    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    Was not it enabled by default?

    Plugin Author methnen

    (@methnen)

    Nope. Why enqueue a script that isn’t being used?

    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    I added functions.php wp_enqueue_script( ‘highcharts-exporting’ ); is that all?

    Plugin Author methnen

    (@methnen)

    As long as it’s ensued before the chart renders. You should be good.

    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    Thank you very much. It is very very useful. Keep updating.

    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    Sorry again. But but I can not get print / export chart option enabled.
    I added functions.php

    wp_enqueue_script( 'highcharts-exporting' );
    
    does not include any exporting js files.
    
    

    function filter_m_chart_chart_options( $chart_options, $library ) {
    $chart_options[‘chart’][‘zoomType’] = ‘x’;
    $chart_options[‘exporting’][‘enabled’] = ‘true’;

    return $chart_options;
    }

    add_filter( ‘m_chart_chart_options’, ‘filter_m_chart_chart_options’, 10, 2 );

    • This reply was modified 4 years, 10 months ago by ozgurerdogan.
    Plugin Author methnen

    (@methnen)

    scripts should be enqueued on ‘init’ at the earliest any sooner and you’re breaking the rules according to WP docs.

    The scripts are registered on init as well at the regular priority so you’ll want to make sure you enqueue them after their registered or else WP won’t have the registered script yet.

    So something like this in your functions.php should work:

    
    function theme_highcharts_script_enqueue() {
    	wp_enqueue_script( 'highcharts-exporting' );
    }
    
    add_action( 'init', 'theme_highcharts_script_enqueue', 20 );
    
    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    it does not sorry. Probably something wrong with my other function. Not a big deal.

    Plugin Author methnen

    (@methnen)

    I’d be happy to take a look if this is something reachable from my direction.

    Could be any number of things going on.

    Feel free to email me at jamie AT methnen.com

    Thread Starter ozgurerdogan

    (@ozgurerdogan)

    Ok I sent you an email. Thanks

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Download and zoom options.’ is closed to new replies.