Title: Chart not rendering
Last modified: January 20, 2021

---

# Chart not rendering

 *  Resolved [ldeschenes](https://wordpress.org/support/users/ldeschenes/)
 * (@ldeschenes)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/)
 * Hi,
 * I created my first Chart but it does not show on front-end when I put the shortcode[
   wpdatachart id=1] on page.
    The chart is rendered perfectly in backend at design
   time.
 * See page [https://lelaurier.net/test-wpdatachart/](https://lelaurier.net/test-wpdatachart/)
   to see for yourself.
 * Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fchart-not-rendering%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/#post-13931695)
 * Hi ldeschenes,
 * Sorry for the inconvenience,
 * After debugging, we found out that on your website there is some conflict with
   our charts and some script(we are not sure which one form which plugin or theme)
   that some global variables when creating charts are filled with some string ‘
   arrayIndex’ after which break the number of columns used in charts. (creating
   fake empty column)
 * You can try to find out which plugin or theme causing the issue by deactivating
   it or if you need all of them to try to add some code in our plugin and check
   is it working.
 * If you decide to change code in our plugin then first what you need to do is 
   to turn off option _“Use minified wpDataTables Javascript”_ on CUSTOM JS AND 
   CSS tab in Settings of plugin.
    Then in file wp-content/plugins/wpdatatables/
   assets/js/wpdatatables/wdt.googleCharts.js around line 118
 * you will find this
 *     ```
        for (var i in this.columns) {
             this.googleDataTable.addColumn(this.columns[i]);
         }
       ```
   
 * and you have to replace it with this
 *     ```
       for (var i in this.columns) {
            if (i == parseInt(i))
            this.googleDataTable.addColumn(this.columns[i]);
        }
       ```
   
 * Best regards.
    -  This reply was modified 5 years, 4 months ago by [wpDataTables](https://wordpress.org/support/users/wpdatatables/).
    -  This reply was modified 5 years, 4 months ago by [wpDataTables](https://wordpress.org/support/users/wpdatatables/).
    -  This reply was modified 5 years, 4 months ago by [wpDataTables](https://wordpress.org/support/users/wpdatatables/).
 *  Thread Starter [ldeschenes](https://wordpress.org/support/users/ldeschenes/)
 * (@ldeschenes)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/#post-13932732)
 * Hi,
 * Thanks for the quick answer.
 * I have 90 plugins installed, so its going to take some time to go thru them…
 * I went the short way and I tried your fix (changing the code) but with no success.
   
   Could you have a look again at page [https://lelaurier.net/test-wpdatachart/](https://lelaurier.net/test-wpdatachart/)
   and see what that have change (and maybe what other code I could modified).
 * Thanks in advance.
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/#post-13932895)
 * Hi ldeschenes,
 * Yes apparently this script has some logic global adding string in loop variables,
   so you need to add same logic in this file wp-content/plugins/wpdatatables-lite/
   assets/js/wpdatatables/wdt.chartsRender.js around line 28
 * you will find this
 *     ```
        for (var i in wdtGoogleCharts) {
           wdtGoogleCharts[i].render();
        }
       ```
   
 * and have to replace with this
 *     ```
        for (var i in wdtGoogleCharts) {
           if (i == parseInt(i))
           wdtGoogleCharts[i].render();
        }
       ```
   
 *  Thread Starter [ldeschenes](https://wordpress.org/support/users/ldeschenes/)
 * (@ldeschenes)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/#post-13933514)
 * Hi,
 * That made it! You are so good!
 * Is it possible to applied these code modifications to a future version (without
   impacting others users) ?
    I woud not want to applied them every time I update
   the plugin…
 * Thanks again! Great and fast support !!!
 *  Plugin Author [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * (@wpdatatables)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/#post-13933737)
 * Hi ldeschenes,
 * You are welcome.
 * We need to test it more to check out if there are conflicts with all available
   charts, and if everything is ok we will be included it in the core to avoid conflicts
   in the future. You can check out our changelog after the update.
 * I’d like to ask you a favor. Would you mind taking a few minutes to write a review
   for us, please on this [link](https://wordpress.org/support/plugin/wpdatatables/reviews/)?
 * Your comments are beneficial for others to know what to expect when they’re looking
   for our plugin. They give us motivation and strength to continue with development
   and to create a more powerful plugin.
 * Thank you in advance. It means a lot to us.
 * Have a nice day.

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

The topic ‘Chart not rendering’ is closed to new replies.

 * ![](https://ps.w.org/wpdatatables/assets/icon-128x128.gif?rev=3010404)
 * [wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin](https://wordpress.org/plugins/wpdatatables/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpdatatables/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpdatatables/)
 * [Active Topics](https://wordpress.org/support/plugin/wpdatatables/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpdatatables/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpdatatables/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [wpDataTables](https://wordpress.org/support/users/wpdatatables/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/chart-not-rendering/#post-13933737)
 * Status: resolved