Okay
  Public Ticket #1541258
Auto-Refreshing Charts?
Closed

Comments

  • Ken started the conversation

    I've connected to a Mysql table and enabled auto-refresh every 30 seconds. I can see the table refreshing in that time. But the google line chart that is connected to that table doesn't refresh. Is there something I need to do to make charts refresh? Or is it a bug? Thanks.

  •   Bogdan replied privately
  • Ken replied

    Thanks. I see the table needs to be on the same page as the chart for that to work too. I also notice that the table needs to be set to "all rows" to see the whole graph line on the  chart. Is that the case? It makes the page very long.

  •  407
    Bogdan replied

    HI Ken,

    You are right.

    When using follow table filtering only the displayed number of rows will be applied to chart. My suggestion is that if you do not need the table on the page, use some JavaScript to hide that table. In that case the chart will be filtered and the table will not be visible.

    Best regards.

    Check out our newest product - Amelia - Enterprise-Level WordPress Appointment Booking Plugin - promo price for launch period!

    Kind Regards,
    Bogdan Radusinovic
    bogdan@touchmesoft.net

  • Ken replied

    Ah. Good idea. Do I put that javascript into the "Custom JS" section of the Settings?

  •  407
    Bogdan replied

    HI Ken,

    If you put the code in the custom Js section then the code will be applied to all wpdatatables.

    If you want to apply just for one table/page is to put the code on the page directly. Just put the code in the <script></script> tags.

    Best regards.

    Check out our newest product - Amelia - Enterprise-Level WordPress Appointment Booking Plugin - promo price for launch period!

    Kind Regards,
    Bogdan Radusinovic
    bogdan@touchmesoft.net

  • Ken replied

    Thanks Bogdan. Could you tell me what the 39 refers to in wpDataChartsCallbacks[39]? Is it the chart shortcode number? I can't find a reference for this wpdatatables special code.

    <script type="text/javascript">
    jQuery(window).load(function(){
        if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }
        wpDataChartsCallbacks[39] = function(obj){
            obj.options.animation.duration = 10;
            obj.options.hover.animationDuration = 10;
            obj.options.responsiveAnimationDuration = 10;
        }
    });
    </script>


  •  407
    Bogdan replied

    HI Ken,

    The number 39 refers to the chart ID.

    The chart ID can be seen in the all chart display . ( attachment) 

    Best regards.

    Attached files:  Screen Shot 2018-04-17 at 11.17.38 AM.png

    Check out our newest product - Amelia - Enterprise-Level WordPress Appointment Booking Plugin - promo price for launch period!

    Kind Regards,
    Bogdan Radusinovic
    bogdan@touchmesoft.net

  • Ken replied

    Great thanks.

  •  407
    Bogdan replied

    HI Ken,

    You are welcome.

    Best regards.

    Check out our newest product - Amelia - Enterprise-Level WordPress Appointment Booking Plugin - promo price for launch period!

    Kind Regards,
    Bogdan Radusinovic
    bogdan@touchmesoft.net