vibran

Stacked columns, toggle series from legend

Portuguese name: Colunas empilhadas com legenda ligável

A column chart where each column is the sum of several stacked series. Columns grow in sequence when the card appears. Clicking a series in the legend turns it on or off: the columns reshape smoothly and the axis scale adjusts. Each period's breakdown opens on hover or on focus with Tab.

Preview of Stacked columns, toggle series from legend running live
Copy the promptAdjust colors and speed

When to use it

To show where a total comes from over time: sales by channel, costs by category, tickets by type. The toggleable legend lets people isolate one series without switching charts. Use 2 to 4 series; with more, the slices get too thin to read.

How to add it to your site

  1. Copy the prompt in the gallery. It comes with the effect's name and the full code. The prompt text is written in Portuguese, and AI builders handle that fine.
  2. Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
  3. Done: the AI adds the effect to your project, just like you saw it here.

Use it in HTML

The effect is plain JavaScript, no library. Just put the data-efeito attribute on the element:

<div data-efeito="painel-colunas-empilhadas" data-titulo="Café vendido por canal" data-sufixo=" kg"
  data-dados='{"categorias":["Mar","Abr","Mai"],"series":[
    {"nome":"Atacado","valores":[620,590,640]},
    {"nome":"Cafeteria","valores":[410,425,440]},
    {"nome":"Assinatura","valores":[180,205,232],"cor":"#6c7fc0"}
  ]}'></div>

More dashboard effects

All 18 dashboard effects →