I have to plot grpah in Mendix using plotly js . Please let us know how to do this

0
I have to plot grpah in Mendix using plotly js . Please let us know how to do this var trace1 = { x: [0, 1, 2, 3, 4, 5], y: [1.5, 1, 1.3, 0.7, 0.8, 0.9], type: 'scatter' }; var trace2 = { x: [0, 1, 2, 3, 4, 5], y: [1, 0.5, 0.7, -1.2, 0.3, 0.4], type: 'bar' }; var data = [trace1, trace2]; Plotly.newPlot('myDiv', data);   Please find above mentioned data using this i have to plot  
asked
1 answers
0

Hi Ather,

Mendix does not have a mixed chart capability (with their chart package). You can use AnyChart (also supported by Mendix). In this case you would use a helper entity with 2 unlimited string attributes: 1 that contains the data string and 1 that contains the layout string.

You would then add the data in a JSON structure as follow (for the data string): [{“x”: [0, 1, 2, 3, 4, 5], “y”: [1.5, 1, 1.3, 0.7, 0.8, 0.9], “type”: “scatter”}, {“x”: [0, 1, 2, 3, 4, 5], “y”: [1, 0.5, 0.7, -1.2, 0.3, 0.4], “type”: “bar”}]

You can read more here: Any Chart Widgets | Mendix Documentation

Hope it helps!

 

answered