Stacked Area Chart

Area chart with multiple series stacked to show cumulative contributions.

Loading demo…

import

 

{

 

StackedAreaChart

 

}

 

from

 

'@platform-blocks/charts'

;

 

import

 

{

 

SERIES

 

}

 

from

 

'./data'

;

 

export

 

function

 

Demo

(

)

 

{

  

return

 

(

    

<StackedAreaChart

      

title

=

"Active users by surface"

      

subtitle

=

"Monthly totals"

      

height

=

{

340

}

      

series

=

{

SERIES

}

      

stackOrder

=

"normal"

      

opacity

=

{

0.65

}

      

xAxis

=

{

{

show

:

 

true

,

title

:

 

'Month'

,

labelFormatter

:

 

(

value

)

 

=>

 

`M${value}`

 

}

}

      

yAxis

=

{

{

        show

:

 

true

,

        title

:

 

'Active users (thousands)'

,

        labelFormatter

:

 

(

value

)

 

=>

 

`${value}`

,

      

}

}

      

grid

=

{

{

show

:

 

true

 

}

}

      

legend

=

{

{

show

:

 

true

,

position

:

 

'bottom'

 

}

}

      enableCrosshair

      multiTooltip

      liveTooltip

    

/>

  

)

;

}

Scan to open this page on your phonereact-ui-library.com/components/StackedAreaChart

</>

react-ui-library

100+ accessible, themeable components that work seamlessly across iOS, Android, and Web.

A Platform Blocks product.