All Projects → chryb → Vue C3

chryb / Vue C3

Licence: mit
vue-c3 is a reusable vue component for c3 charts

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vue C3

vue-sfc-cli
🔨A powerful tool for developing vue single-file component
Stars: ✭ 137 (+80.26%)
Mutual labels:  npm-package, vue-components
Pd Select
vue components ,like ios 3D picker style,vue 3d 选择器组件,3D滚轮
Stars: ✭ 101 (+32.89%)
Mutual labels:  npm-package, vue-components
V Chart Plugin
Easily bind a chart to the data stored in your Vue.js components.
Stars: ✭ 188 (+147.37%)
Mutual labels:  vue-components, d3js
Vue Drag Tree
🌴🌳a Vue's drag and drop tree component || 🌾Demo
Stars: ✭ 337 (+343.42%)
Mutual labels:  npm-package, vue-components
Github Files Fetcher
Download a specific folder or file from a GitHub repo through command line
Stars: ✭ 73 (-3.95%)
Mutual labels:  npm-package
Cordovue
A sample Apache Cordova application using VueJS.
Stars: ✭ 66 (-13.16%)
Mutual labels:  vue-components
Emittery
Simple and modern async event emitter
Stars: ✭ 1,146 (+1407.89%)
Mutual labels:  npm-package
Reaviz
📊 Data visualization library for React based on D3
Stars: ✭ 1,141 (+1401.32%)
Mutual labels:  d3js
Cloudinary Vue
Cloudinary components library for Vue.js application, for image and video optimization.
Stars: ✭ 76 (+0%)
Mutual labels:  vue-components
Nivo
nivo provides a rich set of dataviz components, built on top of the awesome d3 and React libraries
Stars: ✭ 9,550 (+12465.79%)
Mutual labels:  d3js
Grunt Myth
Myth - Postprocessor that polyfills CSS
Stars: ✭ 70 (-7.89%)
Mutual labels:  npm-package
Kibana Milestones Vis
Kibana Milestones Visualization
Stars: ✭ 69 (-9.21%)
Mutual labels:  d3js
Vue Mobiledoc Editor
A lightweight and customizable editor that allows you to embed rich content using Vuejs components.
Stars: ✭ 73 (-3.95%)
Mutual labels:  vue-components
Package.json
文件 package.json 的说明文档。
Stars: ✭ 67 (-11.84%)
Mutual labels:  npm-package
Cdk
🎁 Vue Component Development Kit
Stars: ✭ 75 (-1.32%)
Mutual labels:  vue-components
Mnemonic Words
List of words for making random mnemonic sentences
Stars: ✭ 66 (-13.16%)
Mutual labels:  npm-package
Term Img Cli
Display images in iTerm
Stars: ✭ 70 (-7.89%)
Mutual labels:  npm-package
Parse Ms
Parse milliseconds into an object
Stars: ✭ 74 (-2.63%)
Mutual labels:  npm-package
Vue Fabric Wrapper
Vue Fabric.js Wrapper
Stars: ✭ 70 (-7.89%)
Mutual labels:  vue-components
Whom I Know
Looks for common users of vk.com [DEPRECATED]
Stars: ✭ 69 (-9.21%)
Mutual labels:  d3js

vue-c3

vue-c3 is a reusable vue component for c3 charts

forthebadge forthebadge forthebadge

Install

npm install --save vue-c3

# and if it's not already installed:
npm install --save c3

Usage

In your vue-component:

<template>
  <div>
    <vue-c3 :handler="handler"></vue-c3>
  </div>
</template>

<script>
  import Vue from 'vue'
  import VueC3 from 'vue-c3'

  export default {
    name: ...,
    components: {
      VueC3
    },

    data () {
      return {
        handler: new Vue()
      }
    }
  }
</script>

You can use the handler to send events to the vue-c3 component:

To initialize the c3 chart call:

<script>
  ...
  export default {
    name: ...,

    mounted () {
      // to init the graph call:
      const options = {
        data: {
          columns: [
            ['data1', 2, 4, 1, 5, 2, 1],
            ['data2', 7, 2, 4, 6, 10, 1]
          ],
          ...
        },
        ...
      }
      this.handler.$emit('init', options)
    }
  }
</script>

Events

An overview of all events which can be submitted to the .$emit(name, ..) method:

Name Parameters Description
init options Use this method before anything else to generate the chart
destroy - Used to destroy the chart
dispatch api Access the c3 chart object directly to use the api

For example you can use this.handler.$emit('dispatch', (chart) => chart.resize()) to resize the chart.

For more information about c3 see the documentation http://c3js.org/reference.html.

License

Copyright (c) 2017 - 2018 Christoph Biering, Licensed under the MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].