Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Lets create new plot.

...

  1. Add new gadget to the dashbparddashboard. Choose Smart QL Advanced Gadget. Select newly created EXAMPLE_VIEW as a data feed.

  2. In configuration place following JSON snippet.

    Code Block
    languagejson
    {
      "type": "line",
      "x": "X",
      "y": "Y",
      "color":"C",
      "plugins": [
        {
          "name": "tooltip"
        },
        {
          "name": "legend"
        },
        {
          "name": "export-to"
        }
      ]
    }
  3. In data transformation place following javascript lambda transformation.

    Code Block
    languagejs
    data => data.reduce((acc, curr)=>[
      ...acc,
      {X: curr.creationday, Y: curr.maxcommentlength, C: 'max'},
      {X: curr.creationday, Y: curr.mincommentlength, C: 'min'},
      {X: curr.creationday, Y: curr.avgcommentlength, C: 'avg'}
    	], [])

...