Required parameters

Step 1: Choose a chart type



Step 2: Enter Your SQL Query


Separate sql queries with ";" if you would like to use multiple queries to build comparison graphs. See example
Some supported dynamic tags can be used in your query: {current_user_id},{current_user_login},{current_user_email},{current_user_display_name}.


Step 3: Set Arguments and Values for a Chart - See Example 1 and Example 2

Label for X axis:

This is just label text for a query argument, you can type any desired name here.
Label for Y axis:

This is just a label text for query's main value, you can type any desired name here.
Use ";" separated label names if you have more than one query inside SQL CODE field.
SQL column name of X axis:

Write corresponding SQL field/column name here. f.e. display_name, post_date
SQL column name of Y axis:

Write corresponding SQL field name here. f.e. post_count) - Use one single output name even if you have multiple queries in SQL CODE field.

Advanced parameters

Show/Hide Advanced Parameters


Text shortcode: [gvn_schart id="ID; ?>"ID,'guaven_sqlcharts_tablepart',true)!=''?' table="1"':''; ?>]

PHP shorcode: <?php echo do_shortcode(' [gvn_schart id="ID; ?>"ID,'guaven_sqlcharts_tablepart',true)!=''?' table="1"':''; ?>]'); ?>

Note: Shortcodes supports width and height attributes. F.e. [gvn_schart id="1" width="500" height="400"]. If no attributes, default width, height (which you enter in this page above) will be used.


Save Changes and See Live Demo

ID . '" '.(get_post_meta($post->ID,'guaven_sqlcharts_tablepart',true)!=''?' table="1"':'').']'); } ?>