Spotfire JavaScript Visualization Framework JSViz

We went through the JSViz example using the google Area chart and everything is setup exactly the same. But we are getting the following error message.

 

Operation failed

Read callback 'data' failed.

Type: TypeError

Message: Cannot read property 'trim' of undefined

Stacktrace: TypeError: Cannot read property 'trim' of undefined

    at renderCore (http://localhost:8001/CustomView/cH90iYOMSEKL_l1YBYu-N/NoDocumentViewId/...)

    at http://localhost:8001/CustomView/cH90iYOMSEKL_l1YBYu-N/NoDocumentViewId/...

    at invokeCallback (http://localhost:8001/?package=js:12087:105)

    at Object.success (http://localhost:8001/?package=js:12089:75)

    at fire (http://localhost:8001/?package=js:299:110)

    at Object.fireWith [as resolveWith] (http://localhost:8001/?package=js:308:74)

    at done (http://localhost:8001/?package=js:893:120)

    at XMLHttpRequest.callback (http://localhost:8001/?package=js:934:54)

1 Comment

It looks like your data setup or the data being passed in is incorrect.  There is no error checking in the samples so the error is being thrown as the datasets for the area chart are created.

Here are the first 30 lines of the JSON being passed into my chart.  You can get this by clicking the "Formatted" button on the "Data" page of the property pages.

{
  "columns": [
    "Period",
    "Type",
    "Measure",
    "Flag",
    "Color"
  ],
  "pageDataRows": false,
  "pageRowSize": 10000,
  "baseTableHints": {
    "rows": 68,
    "visible": 68,
    "marked": 0,
    "tableName": "ManufacturingData",
    "settingName": "ManufacturingData"
  },
  "data": [
    {
      "items": [
        "2013-09-15T22:12:00Z",
        "run",
        1400,
        "area chart",
        "green"
      ],
      "hints": {
        "index": 0
      }
    },

Take a look at your configuration and JSON data and see if you can figure out what is wrong.

If you can't figure it out, post the contents of your JSON data to this page.

Dave Leigh - Jan 09, 2018 - 4:50pm ::
+ Add a Comment

(1) Answer

Login