Concepts 🚀 Project 🧮 Labs
🧮 Labs / CSS / Chart container — figure + caption for plots

Chart container — figure + caption for plots

A styled wrapper for matplotlib/plotly charts. White card, title, the chart, and a caption.

style.css v3.1
style.css — the CSS rules
index.html — the HTML structure (what the CSS targets)
Live preview updates as you type
🧠 How it works

This is the wrapper pattern for EVERY chart in a data-science dashboard. chart-header — title + subtitle on the left, action buttons (download, fullscreen) on the right. chart-body — fixed height (300px) so all charts in a grid are the same size. The actual chart (an <img> from matplotlib, or a <div> for plotly) goes inside. chart-caption — italic grey text below, like a figure caption in a paper. box-shadow: 0 1px 3px rgba(0,0,0,0.06) — very subtle shadow. Don't overdo shadows on cards. The action buttons are grey by default, turn green on hover — branded micro-interaction.

✏️ Try these changes
  • Change chart-body height from 300px to 500px
    → taller chart area
  • Change the button hover color from #a0c000 to #58a6ff
    → buttons turn blue on hover
  • Change border-radius: 10px to 0
    → sharp corners — more 'academic paper' look
  • Add a max-width: 800px to .chart-card
    → chart doesn't stretch too wide on big screens