AnyChart one trace for each incoming data in source

0
So I need  a specific way to plot a chart that I'm not sure if it's possible with mendix.   I have a datasource with a startTime and a endTime. And for each element with these properties I want to do a trace with these schema:   var trace1 = { x: [START_TIME,START_TIME,END_TIME,END_TIME,START_TIME], y: [0,1,1,0,0], orientation: 'h', fill: 'toself', fillcolor: SOME_COLOR, mode: 'lines', name: '', text: SOME_TEXT, showlegend: false, type: 'scatter' };   Start_time and end_time repeats in every trace for every incoming data.   So in final I need a chart with multiples traces plotted in the same graph.
asked
1 answers
0

Hi Francisco,

 

You would most likely need to use the AnyChart widget to achieve this, see https://marketplace.mendix.com/link/component/106517?_gl=1*en55si*_gcl_au*MTM5NDAwNzg4NS4xNzI4MDQyOTE4 and https://docs.mendix.com/refguide/charts-any-cheat-sheet/

 

You can either build up your data as a string or use entities and an export mapping to achieve the same result.

You would have to "double process" to achieve your desired effect (i.e. you need to create 2 points for each data-time)

 

Hope it helps!

answered