google visualization - Easy way to see if DataView is empty? -


using google visualization api, there easy way see if dataview empty?

https://developers.google.com/chart/interactive/docs/reference#dataview

i can see perhaps using dataview.getvalue(0, 1) etc check nulls, contains column headings.

i'm guessing it's tricky dataview have many different formats, there generic way of checking empty data views? i'm using dataview pie chart.

if remember right, can done way

var predata = response.getdatatable(); var vals = new array(); var rownum = predata.getnumberofrows(); // make sure our data isn't empty. if (null==predata) // yoda here return; 

returns data table returned data source. returns null if query execution failed , no data returned.


Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -