Stacked Bar Chart

Bar chart with segments stacked to show part-to-whole by category.

Loading demo…

import

 

{

 

StackedBarChart

 

}

 

from

 

'@platform-blocks/charts'

;

 

import

 

{

 

SERIES

 

}

 

from

 

'./data'

;

 

export

 

function

 

Demo

(

)

 

{

  

return

 

(

    

<StackedBarChart

      

title

=

"Quarterly ARR by motion"

      

height

=

{

320

}

      

series

=

{

SERIES

}

      

barSpacing

=

{

0.25

}

      

xAxis

=

{

{

show

:

 

true

,

title

:

 

'Quarter'

 

}

}

      

yAxis

=

{

{

        show

:

 

true

,

        title

:

 

'ARR (USD thousands)'

,

        labelFormatter

:

 

(

value

)

 

=>

 

`$${value}`

,

      

}

}

      

grid

=

{

{

show

:

 

true

 

}

}

      

legend

=

{

{

show

:

 

true

,

position

:

 

'bottom'

 

}

}

      

animation

=

{

{

duration

:

 

500

 

}

}

    

/>

  

)

;

}

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

</>

react-ui-library

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

A Platform Blocks product.