Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-chart-js

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-chart-js

Chart.js for VueJs.

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
321
increased by4.22%
Maintainers
1
Weekly downloads
 
Created
Source

vue-chart-js

npm npm npm npm

Chart.js for Vue.

Installation

$ npm install vue-chart-js --save

Install as Component

import Vue from 'vue'
import VueChart from 'vue-chart-js'

export default {
  name: 'App',

  components: {
    VueChart
  }
}

Install as Plugin

import Vue from 'vue'
import VueChart from 'vue-chart-js'

Vue.use(VueChart)

Install via CDN

<script src="https://unpkg.com/vue"></script>
<script src="https://unpkg.com/vue-chart-js"></script>

<script>
  Vue.use(Vuechart.default)
</script>

Usage

<template>
  <vue-chart type="bar" :data="chartData"></vue-chart>
</template>

<script>
import VueChart from 'vue-chart-js'

export default {
  name: 'App',

  components: {
    VueChart
  },

  data: () => ({
    chartData: {
        labels: ['Item 1', 'Item 2', 'Item 3'],
        datasets: [
            {
                label: 'Component 1',
                data: [10, 20, 30]
            },
            {
                label: 'Component 2',
                data: [20, 30, 40]
            }
        ]
    }
  }),
}
</script>

Props

PropsDescriptionTypeRequired
typeChart.js typeStringtrue
dataChart.js datasetsObjecttrue
optionsChart.js optionsObjectfalse
widthChart widthNumberfalse
heightChart heightNumberfalse

License

Vue-Chart-Js is open-sourced software licensed under the MIT license

Keywords

FAQs

Package last updated on 06 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc