Dashboard HTML
v0.3.0Self-contained HTML dashboards on a 12-column grid: KPI valueboxes, statistical infoboxes, sortable tables and interactive charts — built manually or generated automatically from a DataFrame.
Quick Start
dashboard.py
python
import viewx as vx
df = vx.load_dataset("iris.csv")
# Automatic dashboard: ViewX analyzes the DataFrame and picks
# KPIs, charts and tables for you.
vx.Dashboard.auto(df, theme="dark_enterprise").save("dash.html")Every dashboard is a single self-contained HTML file (Plotly loaded via CDN) — open it locally, email it or host it anywhere. No server needed.
Manual Building
For full control, build the grid yourself with typed components:
manual.py
python
import viewx as vx
df = vx.load_dataset("penguins.csv")
dash = vx.Dashboard(title="Penguins Report", theme="glass_ocean")
dash.add_valuebox("Species", df["species"].nunique(), icon="chart")
dash.add_valuebox("Mean mass (g)", round(df["body_mass_g"].mean(), 1))
dash.add_chart(vx.plot(df, kind="scatter",
x="bill_length_mm", y="body_mass_g"),
width=6)
dash.add_chart(vx.plot(df, kind="box", x="species", y="flipper_length_mm"),
width=6)
dash.add_table(df.head(20), title="Preview")
dash.add_text("Data: Palmer Station Antarctica LTER")
dash.save("dash.html")API Reference
Dashboard
Dashboard(title='Dashboard', theme='corporate_blue', layout='default')
Dashboard.auto
Dashboard.auto(df, title=None, theme=None, layout='default', include_figures=True) -> Dashboard
Dashboard
add_valuebox
add_valuebox(label, value, icon=None, width=3)
add_infobox
add_infobox(label, value, delta=None, width=3)
add_chart
add_chart(fig=None, chart=None, width=12)
add_table
add_table(data, title=None, width=12)
save / show
save(path) / show()
Legacy Alias
vx.HTML is a deprecated alias of Dashboard kept for compatibility with pre-v0.3.0 code.
legacy.py
python
dash = vx.HTML(title="Old API") # works, DeprecationWarning
dash = vx.Dashboard(title="New API")