Skip to main content

Stat / Large

Create a stat card displaying a primary value, an auxiliary value and a caption.

import time

from faker import Faker

from synth import FakePercent
from h2o_wave import site, ui

page = site['/demo']

fake = Faker()
f = FakePercent()
val, pc =
c = page.add('example', ui.large_stat_card(
box='1 1 2 2',
value='=${{intl qux minimum_fraction_digits=2 maximum_fraction_digits=2}}',
aux_value='={{intl quux style="percent" minimum_fraction_digits=1 maximum_fraction_digits=1}}',
data=dict(qux=val, quux=pc),
caption=' '.join(fake.sentences()),

while True:
val, pc = = val = pc

Tags:  stat_card