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' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -