1.0.3 • Published 5 years ago

@envo/stackbar v1.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

Published on webcomponents.org

ENVO-Stackbar

A simple webcomponent to show a 100% stacked bar chart.

DEMO

https://enricovogt.github.io/stackbar/index.html

Installation

npm i @envo/stackbar

DEMO

Usage

<script>
  const envoStackbarElement = document.querySelector('#envo-stackbar');

  envoStackbarElement.showLegend = true;
  envoStackbarElement.values = [
    {
      value:12,
      title:"1",
      styles: { 
        backgroundColor: 'red' 
      }
    },
    {
      value:12,
      title:"2",
      styles: {
        backgroundColor: 'indianred'
      }
    },
    {
      value:4,
      title:"3",
      styles: {
        backgroundColor: 'orange'
      }
    },
    {
      value:5,
      title:"4",
      styles: {
        backgroundColor: 'lightgreen'
      }
    },
    {
      value:24,
      title:"5",
      styles: {
        backgroundColor: 'green'
      }
    },
  ];
</script>
<envo-stackbar id="envo-stackbar"></envo-stackbar>

License

MIT

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago