dhtmlx is apparently entirely unable to render invisible graphs
(hidden via display:none on itself or a parent, visibility: hidden
does not trouble it), it apparently uses the actual size of the graph
container in its rendering and display:none elements have no
dimensions.
A graph in an o2m in a secondary tab gets rendered in display:none
environment yielding a completely broken and unusable graph.
Worked around this by deferring the graph's rendering until
visibility: the actual graph rendering is stored in a function which
is periodically deferred (via setTimeout) until we know the graph view
is visible (meaning its root element isn't invisible
anymore). Ideally, we'd use a library which is not broken instead...
The check periodicity is currently set to 100ms, seems sufficiently
reactive for our purposes.
lp bug: https://launchpad.net/bugs/880789 fixed
bzr revid: xmo@openerp.com-20111028122608-6hyi7lqpr3jh9rw3
In DHTMLX, stacked bars require a very different topology than
clustered, essentially it requires taking clustered data and "rotating
it".
This implement the transformation of the series descriptors
('group_list' sequence which sets up the key, label and color for each
series) and of the series itself (sets up a key for each possible
value of the aggregation field, with each key prefixed by the name of
the ordinate column).
To handle grouped *and clustered* graphs, which dhtmlx does not
natively support, might be able to reimplement this Excel/Numbers
hack:
http://peltiertech.com/WordPress/clustered-stacked-column-bar-charts/
by iterating over all this.columns (rather than just the ordinate)
and... not sure actually, creating a record for each of these columns
for each abscissa value, with all other fields set to 0? Maybe?
bzr revid: xmo@openerp.com-20110928135219-edp80g7k6x60s3l8