Home Forums Chart Support Simple chart and XMLHttpRequest query

Simple chart and XMLHttpRequest query

Viewing 2 posts - 1 through 2 (of 2 total)
  • #34022

    Hello

    I am struggling to compile code to essentially report data from an esp8266 to local web interface. Can someone please help validate my code or show me what I am doing wrong?

    https://jsfiddle.net/richo/1vzo3g24/7/#&togetherjs=fytPROKrSz
    if that doesn’t work try:
    JS Fiddle code

    The current error is: Uncaught TypeError: Cannot use ‘in’ operator to search for ‘name’ in {
    at H.V.setOptions (canvasjs.min.js:100)
    at H.V (canvasjs.min.js:32)
    at new H (canvasjs.min.js:138)
    at m._initialize (canvasjs.min.js:171)
    at m.render (canvasjs.min.js:202)
    at canvasjs.min.js:131

    thanks
    Richo

    #34071

    Richo,

    The issue might be with the format of the data being passed to the chart. Parsing it in the format accepted by CanvasJS Chart should work fine in your case. Please refer to this documentation page for step-to-step tutorial on fetching data from external source (JSON) & parsing it to the format accepted by CanvasJS before rendering chart.
    Rendering Chart with Data from JSON

    Please refer to this article for more information on adding CanvasJS charts in Arduino. Also take a look at this Github-repository for complete code.

    Considering this as duplicate of Simple chart and XMLHttpRequest query. Hence closing the same.


    Vishwas R
    Team CanvasJS

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.