📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP

@canvasjs/vue-charts

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@canvasjs/vue-charts

CanvasJS Vue Charts - Official

1.0.4
latest
Version published
Weekly downloads
815
15.28%
Maintainers
1
Weekly downloads
 
Created

CanvasJS Vue Charts Plugin - Official

CanvasJS Vue Chart Plugin for creating interactive charts and graphs for your Vue.js applications. Library supports a wide range of chart types including bar, line, area, pie, doughnut, candlestick & more. It's also bundled with features like interactivity, animation, zooming / panning, exporting as image, etc.


CanvasJS Vue.js Charts

Installing CanvasJS Vue Charts

Install CanvasJS Vue Charts package to your Vue application via NPM.

Install Vue Charts via NPM
npm install @canvasjs/vue-charts

See npm documentation to know more about npm usage.

Import Vue Chart plugin & install it

Import the Vue Charts plugin to your Vue.js application & install it.

import { createApp } from 'vue'
import App from './App.vue'

import CanvasJSChart from '@canvasjs/vue-charts';

const app = createApp(App);
app.use(CanvasJSChart); // install the CanvasJS Vuejs Chart Plugin
app.mount('#app');
Set the chart-options & create chart

Set the chart-options in app.vue & use 'CanvasJSChart' selector to create chart inside template tag.

<!-- App.vue -->
<script>
export default {
  data() {
    return {
      chart: null,
      options: {
        animationEnabled: true,
        title:{
          text: "Vue.js Basic Column Chart"
        },
        data: [{
          type: "column",
          dataPoints: [
            { label: "apple",  y: 10 },
            { label: "orange", y: 15 },
            { label: "banana", y: 25 },
            { label: "mango",  y: 30 },
            { label: "grape",  y: 28 }
          ]
        }]
      }
    }
  }
}
</script>
<template>
    <CanvasJSChart :options="options"/>
</template>

Vue.js Column Chart

Vue Chart with Animation

Animated Vue.js Charts


Vue Chart with Multiple Y-axes

Vue.js Chart with Multiple Y-axes


Interactive Vue Chart

Vue.js Interactive Charts


Vue Chart with Zooming / Panning

Vue.js Chart with Zooming / Panning


FAQs

Package last updated on 29 Feb 2024

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