• Resolved Anonymous User 13716511

    (@anonymized-13716511)


    I have the values I would like to display on the graph stored in a mysql database. Is it possible with this plugin to code in php and write a query to pull data from the database and display this data on the graph?

    https://wordpress.org/plugins/visualizer/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m exporting the database data and uploading a csv file, for this graph

    rddravic, where do you upload the CSV file?

    Hello,

    @lucytech
    You can export CSV file from your database and import it while creating “Visualizer”.

    @nur1952
    To upload CSV file go to “Media > Visualizer Library > Add New”
    Select visualizer and click next. Here you will get option to upload your CSV file. And save it. This will upload CSV file.

    Thank You

    Hi,

    I’m trying to create a chart from some data in a database.
    I toke a look to this post: https://github.com/Codeinwp/visualizer/wiki/How-can-I-populate-chart-series-and-data-dynamically%3F

    and before try it with a concrete database I have the following code:

    <?php

    add_filter( ‘mycustom_series_filter’, ‘myplugin_filter_chart_series’, 10, 3 );
    function myplugin_filter_chart_series( $series, $chart_id, $type ) {
    $series = array(
    // the first series
    array(
    ‘label’ => ‘The name’, // the label of the series
    ‘type’ => ‘string’, // the type of the series
    )
    );
    return $series;
    }

    add_filter( ‘mycustom_data_filter’, ‘myplugin_filter_chart_data’, 10, 3 );
    function myplugin_filter_chart_data( $data, $chart_id, $type ) {
    $data = array(
    // the first row of data
    array(
    ‘Something’, // the value of the first series
    165, // the value of the second series
    32, // the value of the third series
    )
    );
    return $data;
    }

    add_filter( ‘mycustom_filter_settings’, ‘myplugin_filter_chart_settings’, 10, 3 );
    function myplugin_filter_chart_settings( $data, $chart_id, $type ) {
    // do your stuff here
    return $data;
    }

    ?>

    [visualizer id=”17″ series=”mycustom_series_filter” data=”mycustom_data_filter”]

    The problem is that nothing happens. I think that I need to configure somehow the visualizer with id 17 to receive the data, but I cannot find an example showing how. Not even a complete working example to follow.

    Can you please help me?

    Thank You

    Plugin Contributor selu

    (@marius2012)

    Hey,

    Can you email us at friends@themeisle.com with more details about the issue and our support team will help you.

    Thank you !

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘import values from database to display on graph’ is closed to new replies.