Area Chart 3D

Areas pushed back into ribbons, one per series.

2006200820102012201420162018202020222024200620082010201220142016201820202022202420062008201020122014201620182020202220242006200820102012201420162018202020222024$0$10$20$30$40$50$60Share price$0$10$20$30$40$50$60Share price$0$10$20$30$40$50$60Share price$0$10$20$30$40$50$60Share priceACME Corp.CompetitorACME Corp.CompetitorACME Corp.CompetitorACME Corp.Competitor
ACME Corp.
Competitor

Every series is the area under its line, from the floor of the box, pushed back into a ribbon: the entries run along x, one ribbon per series along z. Pointing at a face highlights that face alone; a face of the top tells the values at its two ends.

The area is the measure, so the chart is for values of 0 and up. A value below 0 drops the floor of the box to it, and every area then reads from there, not from 0; a bar chart grows from 0 either way.

A ribbon runs from one entry to the next, so it needs at least two: a single entry draws the box and no ribbon.

Installation

npx shadcn@latest add niekes/chart3dcn/area-chart-3d#v1.2.0

Update

Press Update: the ribbons morph into new prices over the animationDuration of their container, and the y axis scales along. The chart glides the prices, not the faces, so every frame is projected, culled and ordered anew.

20062008201020122014201620182020202220242006200820102012201420162018202020222024200620082010201220142016201820202022202420062008201020122014201620182020202220240102030405060Share price0102030405060Share price0102030405060Share price0102030405060Share priceACME Corp.CompetitorACME Corp.CompetitorACME Corp.CompetitorACME Corp.Competitor

Enter and leave

New data may also bring, drop and reorder whole entries - a point follows the name of its entry, in the index field. An added year unfolds from the year before it, so the ribbons grow out of their ends while the x axis makes room, its line growing to the new tick, its label fading in; a removed one folds back into the year before it, the mirror of its entering, while the axis closes the gap (see Enter in the glossary).

20062007200820092010201120122013200620072008200920102011201220132006200720082009201020112012201320062007200820092010201120122013051015202530Share price051015202530Share price051015202530Share price051015202530Share priceACME Corp.CompetitorACME Corp.CompetitorACME Corp.CompetitorACME Corp.Competitor

Renderers

The same chart on every renderer, side by side. The marks are data the chart hands to the container, and "svg" and "canvas" draw them all - where the browser has no canvas, as SVG.

20062008201020122014201620182020202220242006200820102012201420162018202020222024200620082010201220142016201820202022202420062008201020122014201620182020202220240102030405060Share price0102030405060Share price0102030405060Share price0102030405060Share priceACME Corp.CompetitorACME Corp.CompetitorACME Corp.CompetitorACME Corp.Competitor
SVG
20062008201020122014201620182020202220242006200820102012201420162018202020222024200620082010201220142016201820202022202420062008201020122014201620182020202220240102030405060Share price0102030405060Share price0102030405060Share price0102030405060Share priceACME Corp.CompetitorACME Corp.CompetitorACME Corp.CompetitorACME Corp.Competitor
Canvas

Many marks

Twelve sensors over two hundred days - about 2,400 faces on the tops of their ribbons - and the chart stays interactive. The scene is one list of marks, so the demo starts on "canvas", the renderer for many marks, and the select shows the same scene on SVG.

020406080100120140160180Day020406080100120140160180Day020406080100120140160180Day020406080100120140160180Day020406080100120020406080100120020406080100120020406080100120Sensor ASensor BSensor CSensor DSensor ESensor FSensor GSensor HSensor ISensor JSensor KSensor LSensor ASensor BSensor CSensor DSensor ESensor FSensor GSensor HSensor ISensor JSensor KSensor LSensor ASensor BSensor CSensor DSensor ESensor FSensor GSensor HSensor ISensor JSensor KSensor LSensor ASensor BSensor CSensor DSensor ESensor FSensor GSensor HSensor ISensor JSensor KSensor L

API Reference

Prop

Type

Edit on GitHub

On this page