Hi John,
I've found a solution for the correct syntax for time series :)
{title:{text:'Test FBA'},
legend:{data:['02 Verwaltung Astadt','01 Test']},
xAxis:[{type:'time'}],yAxis:{type:'value'},
series:[
{type:'bar',name:'02 Verwaltung Astadt',data:[['2010-12-01',1090],['2012-12-01',1150],['2013-02-01',1150],['2015-12-01',1275]]},
{type:'scatter',name:'01 Test',data:[['2010-10-01',985],['2011-03-01',560],['2012-12-01',1350],['2014-03-01',875]]}
]}
So the only question left is if there is a possibility to create that syntax comfortably with the n_webbrowser user object delivered as echart demo with PB2019R3 - with data source SQL, datastore or datawindow (my favorite for my current use case)
For instance the following code doesn't work:
ls_SQL = "select DATEFORMAT(PKC_Datum_Monatsanfang,'yyyy-mm-dd') || 'T00:00:00.000Z' Monatsanfang, sf_cc_get_objectname_from_pk(pkc_Referenzobjekt_datenerfassung) Referenzobjekt, round(sum(Wert_Monatsaggregation),1) Wert from dbo.CC_Betriebsdaten_Werte_MONATSAGGREGATION group by PKC_Datum_Monatsanfang, Referenzobjekt order by Referenzobjekt, PKC_Datum_Monatsanfang"
ls_Option = wb_1.of_CreateOption_Series(ls_SQL, 'line','Monatsanfang', 'Wert' , 'Referenzobjekt')
results in:
{title:{text:'Test FBA'},legend:{data:['02 Verwaltung Astadt','10 Asphaltmischwerk Astadt','11 Steinbruch Astadt']},grid:{left:'3%',right:'4%',bottom:'3%',containLabel:true},tooltip:{trigger:'axis'},toolbox:{feature:{dataZoom:{},saveAsImage:{},dataView:{}}},xAxis:[{type:'category',data:['2012-06-01T00:00:00.000Z','2014-06-01T00:00:00.000Z','2012-07-01T00:00:00.000Z','2014-07-01T00:00:00.000Z','2014-08-01T00:00:00.000Z','2014-01-01T00:00:00.000Z','2013-10-01T00:00:00.000Z','2014-12-01T00:00:00.000Z','2013-07-01T00:00:00.000Z','2014-02-01T00:00:00.000Z','2013-11-01T00:00:00.000Z','2013-08-01T00:00:00.000Z','2013-01-01T00:00:00.000Z','2012-10-01T00:00:00.000Z','2014-03-01T00:00:00.000Z','2013-12-01T00:00:00.000Z','2013-09-01T00:00:00.000Z','2013-02-01T00:00:00.000Z','2012-11-01T00:00:00.000Z','2014-04-01T00:00:00.000Z','2012-08-01T00:00:00.000Z','2012-01-01T00:00:00.000Z','2013-03-01T00:00:00.000Z','2012-12-01T00:00:00.000Z','2014-05-01T00:00:00.000Z','2012-09-01T00:00:00.000Z','2012-02-01T00:00:00.000Z','2013-04-01T00:00:00.000Z','2012-03-01T00:00:00.000Z','2011-12-01T00:00:00.000Z','2013-05-01T00:00:00.000Z','2012-04-01T00:00:00.000Z','2013-06-01T00:00:00.000Z','2012-05-01T00:00:00.000Z']}],yAxis:{type:'value'},series:[{type:'line',name:'02 Verwaltung Astadt',data:[1275,1150,1150,1090]},{type:'line',name:'10 Asphaltmischwerk Astadt',data:[613.9,730.7,1732.8,463.9,519.7]},{type:'line',name:'11 Steinbruch Astadt',data:[304622.2,210216.4,293021.1,173279.9,91081.5,320789.6,325483.5,278791.5,252299.3,243089.4,54999.3,263307.3,232377.9,182883.3,299711.7,221860.9,184752.8,247440.9,358267.9,86208.5,209576.6,120475.3,224732.2,221761.5,50883,292657.9,287823.1,249197.8,298534.7,259320.9,217093.3]}]}
to change:
- category -> time
- date values has to deliver with the values and not with the x axis (like in my correct example above)
Is there a solution with n_webbrowse functionality (or have I to write the code for myself) ?
Best regards,
Frank