intersystems-community / DeepSeeWeb

Renderer for DeepSee Dashboards in Browser with MDX2JSON as a Serverside and JS web-client
MIT License
18 stars 13 forks source link

A bug with combo chart #419

Open evshvarov opened 7 months ago

evshvarov commented 7 months ago

Reproduced here

In DeepSee Zen 3 colcharts and one line chart:

Screenshot 2024-03-27 at 8 22 43 AM

In DSW 3 line charts and one colchart:

Screenshot 2024-03-27 at 8 23 47 AM
evshvarov commented 5 months ago

Looks like this is done

Frisle commented 5 months ago

@evshvarov no, its not.

Here is the examples again

ZEN widget have one line axis, DSW have two. chrome_FlDLJfm6zb chrome_9lTWEaNQ66

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

evshvarov commented 5 months ago

reopened

Frisle commented 5 months ago

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

chrome_fuCh8DbPVw

With this logic seriesTypes initially should be bars. But when overrides setted up seriesType should be changed accordingly