Line chart with tooltip
Also called: area chart
An SVG area chart with a dotted line for the previous period. A crosshair follows the mouse or finger and shows values in a tooltip; switching between 7 days, 30 days and 12 months morphs the curve into the new one.

When to use it
Revenue, visits, bookings or any time series. Each period is an object in data-dados with rotulos, valores and, for the dotted comparison line, anterior with the same number of items. The chart fills whatever height the element has (15em minimum) and redraws on resize.
How to add it to your site
- 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.
- Paste it into your AI: Lovable, Claude, Cursor, Bolt or v0.
- 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-grafico-linha" data-titulo="Receita" data-dados='{"7 dias":{"rotulos":["seg","ter","qua"],"valores":[1200,1900,1600],"anterior":[1000,1500,1400]}}'></div>
More dashboard effects
- Progress ringsactivity rings
- KPI cards with sparklinestat cards
- Stacked columns, toggle series from legendColunas empilhadas com legenda ligável
- Live activity feedFeed de atividade ao vivo
- Animated sales funnelconversion funnel
- Waterfall chart, from revenue to profitGráfico de cascata
- Live scrolling chart, real-time chartGráfico em tempo real
- Responsive dashboard layoutadmin shell