Stat / Bar / Large

Create a large captioned card displaying a primary value, an auxiliary value and a progress bar, with captions for each value.

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_bar_stat_card(
box='1 1 2 2',
value='=${{intl foo minimum_fraction_digits=2 maximum_fraction_digits=2}}',
value_caption='This Month',
aux_value='={{intl bar style="percent" minimum_fraction_digits=2 maximum_fraction_digits=2}}',
aux_value_caption='Previous Month',
data=dict(foo=val, bar=pc),
caption=' '.join(fake.sentences(2)),
while True:
val, pc = = val = pc
c.progress = pc

Tags: โ€‚progress โ€‚stat_card