Customized "No Data Warning"

Right now when no data is available for a visual Arcadia will display “No results found.”

image

You can customize the text using custom style (JS) to get a result similar to this:

image

Custom Style – JS

return function() {

var f = function() {};

f.version = "1";

f.afterDraw = function() {
    var d = arcapi.dataResult();
    var allRows = d.rows();

    // Check for results, if there's zero or NULL result update warning text
    if (allRows.length === 0 || (allRows.length == 1 && allRows[0][0] == "NULL")) {
        console.log("changing no data");
        $("#"+arcapi.chartId()).parent('.dash-viz-wrapper').children('.viz-message-wrapper').text('No data available for time selected');
        
    }
}

return f;
}();
1 Like