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 query argument, you can type any desired name here.

SQL field name of X axis:

Write corresponding SQL field name here. f.e. display_name, post_date

Label for Y axis:

This is just 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 field 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.


Optional parameters

Dynamic filters - See Example Settings and Example Demo

By using this section you can create dynamic variables inside SQL code. It also creates corresponding dynamic input form above each chart. Show/Hide


Width and height (with px. don't type px itself, just numbers)

Color scheme (comma separated #RGB colors. f.e. #FF0000 or #00FF00,#BBCC00 ).

Leave empty if you want random colors

Legend block
ID, 'guaven_sqlcharts_legend_position', true);?>
Legend in a chart is Y values which usually appears at the top/right part of the graph

X and Y Axis Ticks (for Line and Bar charts)

Remote MySQL Database Access Details

Leave empty if you are connecting to local DB.

ID, 'guaven_sqlcharts_dbpass', true); if(is_array($dbpass)){ $dbpass=guaven_sqlcharts_encrypt_decrypt('decrypt',$dbpass[1]); } ?>

Note: WordPress supports MySQL only Databases, to use non-MySQL databases some custom PHP code&driver would be needed. To discuss how to build that you can contact us.


ID, 'guaven_sqlcharts_graphtype', true) != '') { if (strpos(get_post_meta($post->ID, 'guaven_sqlcharts_graphtype', true), "_l") !== false) $postfix = '_2'; else $postfix = ''; ?>

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"':'').']'); }