vibran

Interactive donut chart

Portuguese name: Rosca com legenda interativa

An SVG donut chart whose slices open one after another. Hovering a slice or its legend entry highlights it and shows the value in the center; clicking a legend entry hides the slice and the donut recalculates.

Preview of Interactive donut chart running live
Copy the promptAdjust colors and speed

When to use it

Splitting a total across a few parts: sales channels, payment methods, service types. Works best with 3 to 6 slices; beyond that, group the rest as "Other". Swap data-cores for brand colors and use data-prefixo="" when the value is not money.

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-rosca" data-titulo="Vendas por canal" data-dados='[{"rotulo":"Balcão","valor":18400},{"rotulo":"WhatsApp","valor":9350}]'></div>

More dashboard effects

All 18 dashboard effects →