You must be logged in to post your query.
Home › Forums › Chart Support › Live updating chart from JSON
Tagged: JSON, live update
Hello guys, Here my current script to get updating value from JSON: jsFiddle
So after 20s, the page will reload 1 time to get the value from JSON. It was working fine if the JSON was generated within 20s but with >20s the chart can not be generated. I tried to use jQuery.isEmptyObject to verify if JSON empty and reload chart but no working. Am I missing or doing wrong somewhere. Thanks
@jonasbui1476
jQuery.isEmptyObject is used to check if the object is empty and doesn’t contain any properties. The JSON that you provided is actually an array of objects. So, you can check the length of an array to check if the JSON file that you obtained is empty or not. Here is an updated jsFiddle for same.
—— Bivek Singh
You must be logged in to reply to this topic. Login/Register