Skip to content
Advertisement

Javascript WebDataRock pivot-table configuration from a demo starter example

I can not make this demo work, with the “hierarchy” parameter, even though I specify the parameter value, it applies the condition to all hierarchy chain.

JavaScript

Starter demo: https://www.webdatarocks.com/doc/conditional-formatting/

CodePen example which is also referenced from starter demo : https://codepen.io/webdatarocks/pen/oMvYGd

You could replace CodePen JS code with the code below to get a hierarchic render directly.

JavaScript

Here is related github issue, https://github.com/WebDataRocks/web-pivot-table/issues/2

Advertisement

Answer

You are right. The "hierarchy" parameter seems to have no effect.

An alternative solution is to apply the formatting with the customizeCell hook: https://www.webdatarocks.com/doc/customizecell/.

For example:

JS:

JavaScript

CSS:

JavaScript

Here is a CodePen example for illustration: https://codepen.io/VD_A/pen/vYXgqbY.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement