runkit-plotly example

node v8.17.0
version: 1.0.0
endpointsharetweet
const wrapPlotly = require('runkit-plotly'); var makeChart = wrapPlotly((data, elem, Plotly) => { var trace = { x: data.x, y: data.y, mode: 'lines', type: 'scatter' }; var data = [trace]; Plotly.newPlot(elem, data); }); makeChart( { x: [2, 3, 4, 5], y: [16, 5, 11, 9] }, { width: 700, height: 500 } );
Loading…

no comments

    sign in to comment