• OC2PS

    (@sooskriszta)


    Is there a good Google Chart (https://code.google.com/apis/chart/) plugin available?

    So far all I’ve found are plugins that are discontinued, not working or severely limited.

    Ideally, such a plugin would:
    1. Like Contact Form 7, creates multiple tabs by way of different charts.
    2. Also like Contact Form 7, each individual tab (chart) shall have a unique shortcode (eg. [google-chart-1]) that allows embedding into any page/post.
    3. Allow data-entry into a table within admin options (somewhat like Google Docs)
    4. Allow all of Google’s different chart types: Pie, Scatter, Guage, Geo, Table, Tree map, Combo, Line, Bar, Column, Area, Candlestick, Annotated timeline, Intensity map, Motion chart,
    5. Allow selection of colors (use default if unselected)
    6. Allow labeling of plot points

Viewing 7 replies - 46 through 52 (of 52 total)
  • Thread Starter OC2PS

    (@sooskriszta)

    https://test.manuilov.org/wp-admin
    Username: testuser
    Password: testusertestuser

    I had a quick look. First impressions: V. Good!

    We need the ability to colorify specific data points (not only data series). Hence can’t use at the moment.

    But generally, seems like a solid starting point.

    I’m receiving good feedbacks for my ChartBoot plugin (e.g., completeness, usability).
    At the plugin page you have some screenshots and a tutorial video.
    I just released the free 2.0 version yesterday.
    I’m looking forward to hearing from you. Any questions, comments or suggestions are welcome.

    lpagg, this is spectacular! It provides all of the key features I need.

    I’d love to have a way for the labels to be links, so I could link to more detailed data. Can I somehow embed those or can it even be done?

    Other things I see that I’d like is a way to center the title and label the y axis.

    “ChartName” doesn’t seem to display on my WP page. Is that intentional?

    Thanks.

    Hi tangobango, thanks for your comments.

    The feature to keep active the labels to enable drilling down is not included at now by the native Google Chart editor, when they will make it avaliable I will update my plugin.
    At the moment, if you go to https://www.chartboot.com yuo can obtain the code of your chart and complement it manually with the custom code you can write reading the Google Charts tools documentation (i.e., here you have the events available for the pie charts https://developers.google.com/chart/interactive/docs/gallery/piechart#Events

    Center the title is not possible at now.
    You can label the y axis by selecting the verticalaxis (under Customize->Axis) and by setting a title.

    Use Chart Title instead of ChartName (it’s not transferred to the chart).

    Regards,
    lpagg

    Sev

    (@severindauvergne)

    Hello Ipagg,

    I tested your plugin and it is very nice (I am currently using the “old” chart API, so I would like to transform all my graph to the new API).
    I used the “old” API to have dynamic data in the graphs : I am sending queries to my wordpress database (I’m using Participant database) to be able to display percentage of men/women, etc.. which are real data and not a number entered as data.
    Before digging in your plugin code, I would like to know if you expect to do such development on your plugin or not ?

    Thanks
    Bleu

    Hi Sev,
    Extending Charboot for WordPress to manage dynamic data from WP DB is for sure and interesting enhancement path for the plugin. In the next days I will enter more into the details of the technical implications of interfacing the Google Chart API with the WP DB.
    In the meanwhile any suggestions or comments are welcome.
    Rgds, lpagg.

    Sev

    (@severindauvergne)

    Only suggestion/comment I have is my current way of working with “old” google chart :

    function graph_women( $atts, $content = null ) {
       global $wpdb;
       $mens = $wpdb->get_var($wpdb->prepare( "SELECT COUNT(*) FROM wp_participants_database WHERE sexe = 'Man';" ));
       $womens = $wpdb->get_var($wpdb->prepare( "SELECT COUNT(*) FROM wp_participants_database WHERE sexe = 'Woman';" ));
       $per_mens = number_format(100 * $mens / ($mens + $womens),0);
       $per_womens = number_format(100 - $per_mens,0);
    
       /* https://code.google.com/intl/fr-FR/apis/chart/image/ */
       $data = '&chd=t:'.$per_mens.','.$per_womens.'';
       $colors = '&chco=6633FF,FF00FF'; /* if something, use &chco= */
       $size = '&chs=500x200';
       $bg = '&chf=ffffff';
       $title = 'Repartion Mens / Womens';
       $labels = '&chl=Mens '.$per_mens.'%|Womens '.$per_womens.'%';
       $advanced = '&chm=N*p0*,000000,0,-1,11'; /* don't work on pie */
    
       /*
       $charttype = 'lc';  /* line
       $charttype = 'lxy'; /* xyline
       $charttype = 'ls';  /* sparkline
       $charttype = 'gom'; /* meter
       $charttype = 's';   /* scatter
       $charttype = 'v';   /* venn
       $charttype = 'p';   /* pie2d */
    
       $charttype = 'p3';  /* pie */
    
       return '<img title="'.$title.'" src="https://chart.apis.google.com/chart?chtt='.$title.'&cht='.$charttype.''.$data.''.$colors.''.$size.''.$bg.''.$labels.''.$advanced.''.$title.'" alt="'.$title.'" />';
    }

    The concept is simple : use wpdb to set variables values then use the Google API.
    But with your plugin, you write directly in the post the value of the variables, so that’s not so easy. Unless you know a method to send variables to a shortcode (that I don’t know).

Viewing 7 replies - 46 through 52 (of 52 total)
  • The topic ‘Google Chart plugin’ is closed to new replies.