Originally shared by David Berneda


Originally shared by David Berneda

New feature in Dashboards !, templates can now include Layout definitions. These can be simple, or complex combinations by nesting layouts inside other layouts.
Dashboards can then use these custom layouts for panel positioning (grids, charts, controls, etc), for both VCL / FMX and HTML web transparently.

An example of a custom nested layout at the picture below:

"name": "Special",
"items": [
{
"name": "top",
"items": [
{ "name": "0", "align": "top", "height": "50%" },
{ "name": "1", "nested": "2x2" }
]
},
{ "name": "2", "align": "right", "width": "50%", "nested": "3 Rows" }
]

When specifying size (width, height) as percentages, resizing automatically recalculates all inner sub-panels sizes.

Displaying a dashboard using one or another layout is done by simply passing the layout name:

BIVisual1.Template.Generate( MyDashboard, 'Special' )

Comments