0.1.9 • Published 3 years ago

vue-slim-stackedbar v0.1.9

Weekly downloads
3
License
MIT
Repository
gitlab
Last release
3 years ago

vue-slim-stackedbar

A Simple horizontal stacked bar chart Component for Vue.

npm.io npm.io npm.io npm.io

Browser Support

ChromeFirefoxSafariEdgeIE
35+31+6+Legacy+NOT TESTED
----------

Installing

Installing via npm

$ npm install vue-slim-stackedbar

Usage

import StackedBar from 'vue-slim-stackedbar'
  • To create a stacked bar chart with minimal configuration, write as follows:
<template>
  <StackedBar :data="data" />
</template>
export default {
  components: {
    StackedBar,
  },
  data() {
    return {
      data: [
        {
          title: 'First',
          value: 19,
          percent: 19,
          color: '#007bff'
        },
        {
          title: 'Second',
          value: 36,
          percent: 36,
          color: '#20c997'
        },
        {
          title: 'Third',
          value: 45,
          percent: 45,
          color: '#f28b8c'
        }
      ]
    };
  },
};
  • This will render the following chart:

npm.io

Props

NameTypeDefaultExampleDescription
titleStringX'String Sample'Title of Data Stack.Only String can be used.
valueNumberX15Value of data.Only Number can be used.
percentNumberX27Value of percent.Only Number can be used. The sum of the data must not exceed 100.
colorStringX'#f28b8c'Title of Data Stack.Only use a color hash code with #.

Contact

npm.io npm.io npm.io

License

vue-slim-stackedbar is released under MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact.

0.1.9

3 years ago

0.1.8

3 years ago

0.1.7

4 years ago

0.1.6

4 years ago

0.1.5

4 years ago

0.1.4

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago