Open evshvarov opened 7 months ago
Looks like this is done
@evshvarov no, its not.
Here is the examples again
ZEN widget have one line axis, DSW have two.
I tweaked it a bit so the third row is converted to a column again. But this is a hack. And a little broken. You need to set the axis to the line, save it, set it back to the bar and save it again. After this, the setting is successfully received by DSW.
I took this task to work
reopened
The problem is in how zen send data related to graph
Immediately after creation graph with type ComboChart with 4 series send this json
{ "_class":"%DeepSee.Dashboard.Widget", "name":"Widget2", "key":1396616283, "type":"pivot", "subtype":"comboChart", "subtypeClass":"comboChart", "title":"", "dataSource":"Bug\/Combo Chart.pivot", "localDataSource":"", "resetDataSource":false, "dataLink":"", "drillDownDataSource":"", "top":"", "left":"", "width":200, "height":200, "sidebarContent":"", "showSidebar":false, "sidebarWidth":"", "controls":[], "dataProperties":[], "properties": {}, "dataSeries":[], "filterState": {}, "overrides": {}, "maximized":false, "homeRowL":5, "homeColL":0, "colSpanL":4, "rowSpanL":4, "homeRowP":"", "homeColP":"", "colSpanP":"", "rowSpanP":"", "showToolbar":true, "showToolbarBottomBorder":true, "showToolbarOnlyWhenMaximized":false, "colorToolbar":"#F0F0F0", "opacityToolbar":1, "backgroundColor":"#F0F0F0", "opacity":1, "theme":"", "themeOverrides": {}, "dataColorList":"" }
As we can see, there is no data here on how to build a graph. By default it is drawn as a bar. But when we manually set the type of one of the series, ZEN will send its type.
"overrides": {"comboChart":"{legendVisible:'false',xAxis:{_type:'axis'},yAxisList:[{_type:'axis'}],seriesTypes:',line',_type:'comboChart'}"},
Note the schema of seriesTypes:',line'
parameter.
There is 4 series and one comma before line. Therefore 1 series = bar, 2 = line, 3 = bar, 4 = bar
DSW return this parameters
With this logic seriesTypes initially should be bars. But when overrides setted up seriesType should be changed accordingly
Reproduced here
In DeepSee Zen 3 colcharts and one line chart:
In DSW 3 line charts and one colchart: