Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
V

vue-chartkick

> 编程语言
Open source

Create beautiful JavaScript charts with one line of Vue

750 stars0 likes0 views
WebsiteGitHub

About

Create beautiful JavaScript charts with one line of Vue

Vue Chartkick

Create beautiful JavaScript charts with one line of Vue

See it in action

Supports Chart.js, Google Charts, and Highcharts

Quick Start

Run

bash
npm install vue-chartkick chart.js

The latest version works with Vue 3. For Vue 2, use version 0.6.1 and this readme.

And add it to your app

javascript
import VueChartkick from 'vue-chartkick'
import 'chartkick/chart.js'

app.use(VueChartkick)

This sets up Chartkick with Chart.js. For other charting libraries, see detailed instructions.

Charts

Line chart

xml

Pie chart

xml

Column chart

xml

Bar chart

xml

Area chart

xml

Scatter chart

xml

Geo chart - Google Charts

xml

Timeline - Google Charts

xml

Multiple series

javascript
data = [
  {name: 'Workout', data: {'2026-01-01': 3, '2026-01-02': 4}},
  {name: 'Call parents', data: {'2026-01-01': 5, '2026-01-02': 3}}
];

and

xml

Data

Data can be an array, object, callback, or URL.

Array

xml

Object

xml

Callback

javascript
function fetchData(success, fail) {
  success({"2026-01-01": 2, "2026-01-02": 3})
  // or fail("Data not available")
}

and

xml

URL

Make your pages load super fast and stop worrying about timeouts. Give each chart its own endpoint.

xml

Options

Id, width, and height

xml

Min and max values

xml

min defaults to 0 for charts with non-negative values. Use null to let the charting library decide.

Min and max for x-axis - Chart.js

xml

Colors

xml

Stacked columns or bars

xml

Discrete axis

xml

Label (for single series)

xml

Axis titles

xml

Straight lines between points instead of a curve

xml

Show or hide legend

xml

Specify legend position

xml

Donut chart

xml

Prefix, useful for currency - Chart.js, Highcharts

xml

Suffix, useful for percentages - Chart.js, Highcharts

xml

Set a thousands separator - Chart.js, Highcharts

xml

Set a decimal separator - Chart.js, Highcharts

xml

Set significant digits - Chart.js, Highcharts

xml

Set rounding - Chart.js, Highcharts

xml

Show insignificant zeros, useful for currency - Chart.js, Highcharts

xml

Friendly byte sizes - Chart.js 2.8+

xml

Specify the message when the chart is loading

xml

Specify the message when data is empty

xml

Refresh data from a remote source every n seconds

xml

You can pass options directly to the charting library with:

xml

See the documentation for Google Charts, Highcharts, and Chart.js for more info.

To customize datasets in Chart.js, use:

xml

You can pass this option to individual series as well.

Use dynamic components to make the chart type dynamic:

xml

Reactivity

While some of the examples use object or array literals in props for demonstration, this can lead to unnecessary re-renders.

xml

Instead, use a data property:

xml

See this discussion for more details.

Global Options

To set options for all of your charts, use:

javascript
Chartkick.options = {
  colors: ["#b00", "#666"]
}

Multiple Series

You can pass a few options with a series:

  • name
  • data
  • color
  • dataset - Chart.js only
  • points - Chart.js only
  • curve - Chart.js only

Download Charts

Chart.js only

Give users the ability to download charts. It all happens in the browser - no server-side code needed.

xml

Set the filename

xml

Note: Safari will open the image in a new window instead of downloading.

Set the background color

xml

Installation

Chart.js

Run

bash
npm install vue-chartkick chart.js

And add

javascript
import VueChartkick from 'vue-chartkick'
import 'chartkick/chart.js'

app.use(VueChartkick)

Google Charts

Run

bash
npm install vue-chartkick

And add

javascript
import VueChartkick from 'vue-chartkick'

app.use(VueChartkick)

And include on the page

xml

To specify a language or Google Maps API key, use:

javascript
Chartkick.configure({language: "de", mapsApiKey: "..."})

Highcharts

Run

bash
npm install vue-chartkick highcharts

And add

javascript
import VueChartkick from 'vue-chartkick'
import 'chartkick/highcharts'

app.use(VueChartkick)

No Package Manager

Include the charting library and the Chartkick library

xml

And add

javascript
app.use(VueChartkick)

Multiple Libraries

If more than one charting library is loaded, choose between them with:

xml

Options are google, highcharts, and chartjs

Example

xml

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

  • Report bugs
  • Fix bugs and submit pull requests
  • Write, clarify, or fix documentation
  • Suggest or add new features

To get started with development, run:

bash
git clone https://github.com/ankane/vue-chartkick.git
cd vue-chartkick
npm install
npm run build

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言