We're Moving to a New Support Platform – Starting June 1st!

We’re excited to let you know that starting June 1st, we’ll be transitioning to a new support system that will be available directly on our product websites – Amelia, wpDataTables, and Report Builder. In fact, the new support platform is already live for Amelia and wpDataTables, and we encourage you to reach out to us there.

You'll always be able to reach us through a widget in the bottom right corner of each website, where you can ask questions, report issues, or simply get assistance.

While we still do not offer live support, a new advanced, AI-powered assistant, trained on our documentation, use cases, and real conversations with our team, is there to help with basic to intermediate questions in no time.

We're doing our best to make this transition smooth and hassle-free. After June 1st, this current support website will redirect you to the new "Contact Us" pages on our product sites.

Thanks for your continued support and trust – we’re excited to bring you an even better support experience!

Okay
  Public Ticket #1497220
Chart
Closed

Comments

  • web_kings started the conversation

    when I use a table from excel or create one online direct from wpDataTables I cannot give it a NULL value. It always goes back to 0. To solve this I directly edited the DATAbase with a NULL value. But the chart still recognises it a zero.


    I want the line chart to not display when a NULL value is entered.

  •  1,895
    Miloš replied

    Hi web_kings,
    Thank you for your purchase.


    You will need  to make some changes in code in file :

    /wp-content/plugins/wpdatatables/source/class.wpdatachart.php around line 1584

    case 'int': 
       $return_data_row[] = (float)$row[$columnKey];  
      break;
    case 'float':    $return_data_row[] = (float)$row[$columnKey];    break;

    and replace with this

    case 'int':
       if (is_null($row[$columnKey])){        $return_data_row[]=null;    }else{       $return_data_row[] = (float)$row[$columnKey];    }    break;
    case 'float':    if (is_null($row[$columnKey])){         $return_data_row[]=null;    }else{         $return_data_row[] = (float)$row[$columnKey];    }    break;                            

    With this changes you will get charts like on the screenshot (Selection_016.jpg).

    If you want to make charts like on screenshot (Selection_015.jpg) you have to use wpdatachart callbacks and insert that on page where is your chart.

    <script type="text/javascript">
    jQuery(window).load(function(){    
    if( typeof wpDataChartsCallbacks == 'undefined' ){ wpDataChartsCallbacks = {}; }        
    wpDataChartsCallbacks[39] = function(obj){                
    obj.options.plotOptions.series= {connectNulls: true};            
    }
    });
    </script>


    One more thing you have to change in this callback number 39 in (wpDataChartsCallbacks[39]) to id of the chart that you use on page.

    This will be overwritten on next update so you have to come back here and do it again.


    Best regards.


    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables