...
Lets create new plot.
...
Add new gadget to the dashbparddashboard. Choose Smart QL Advanced Gadget. Select newly created EXAMPLE_VIEW as a data feed.
In configuration place following JSON snippet.
Code Block language json { "type": "line", "x": "X", "y": "Y", "color":"C", "plugins": [ { "name": "tooltip" }, { "name": "legend" }, { "name": "export-to" } ] }
In data transformation place following javascript lambda transformation.
Code Block language js 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'} ], [])
...