All Projects → shiyiya → chart.xkcd-vue

shiyiya / chart.xkcd-vue

Licence: MIT License
A xkcd styled chart component for Vue.js based on chart.xkcd.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to chart.xkcd-vue

Anychart Android
AnyChart Android Chart is an amazing data visualization library for easily creating interactive charts in Android apps. It runs on API 19+ (Android 4.4) and features dozens of built-in chart types.
Stars: ✭ 1,762 (+5082.35%)
Mutual labels:  chart, chart-component
Plottable
📊 A library of modular chart components built on D3
Stars: ✭ 2,834 (+8235.29%)
Mutual labels:  chart, chart-component
React D3 Components
D3 Components for React
Stars: ✭ 1,599 (+4602.94%)
Mutual labels:  chart, chart-component
Chart.xkcd
Chart.xkcd is a chart library that plots “sketchy”, “cartoony” or “hand-drawn” styled charts.
Stars: ✭ 6,982 (+20435.29%)
Mutual labels:  chart, xkcd
Smoothie
Smoothie Charts: smooooooth JavaScript charts for realtime streaming data
Stars: ✭ 2,145 (+6208.82%)
Mutual labels:  chart, chart-component
survey-analytics
SurveyJS Analytics Pack
Stars: ✭ 56 (+64.71%)
Mutual labels:  chart
xkcd-gtk
Comic Sticks (xkcd-gtk) is a simple xkcd comic viewer written in Go using GTK+3
Stars: ✭ 14 (-58.82%)
Mutual labels:  xkcd
LMGraphView
LMGraphView is a simple and customizable graph view for iOS.
Stars: ✭ 61 (+79.41%)
Mutual labels:  chart
BarChart
SwiftUI Bar Chart
Stars: ✭ 156 (+358.82%)
Mutual labels:  chart
GJLineChartView
支持伸缩,长按显示数据的折线图、柱状图、饼状图。
Stars: ✭ 24 (-29.41%)
Mutual labels:  chart
chart-type-icon
An icon library that covers the vast majority of chart types
Stars: ✭ 33 (-2.94%)
Mutual labels:  chart
charts
HAProxy Ingress helm charts
Stars: ✭ 24 (-29.41%)
Mutual labels:  chart
CryptoBuddy
Android app which displays cryptocurrency prices, charts and news!
Stars: ✭ 93 (+173.53%)
Mutual labels:  chart
Deep-Viz-Website
The Deep-Viz Components' display website ( Base on React + Dva + Ant-Design) 组件库Deep-Viz的展示网站
Stars: ✭ 12 (-64.71%)
Mutual labels:  chart-component
better-access-charts
Better charts for Access with chart.js
Stars: ✭ 19 (-44.12%)
Mutual labels:  chart
react-d3-axis
React-based Axis component for D3
Stars: ✭ 26 (-23.53%)
Mutual labels:  chart
plotters-iced
📈 Iced backend for Plotters
Stars: ✭ 30 (-11.76%)
Mutual labels:  chart
general-reports
Bunch of general reports for Money Manager Ex
Stars: ✭ 63 (+85.29%)
Mutual labels:  chart
helm-charts
Helm Charts
Stars: ✭ 24 (-29.41%)
Mutual labels:  chart
asciichart-sharp
C# port of asciichart
Stars: ✭ 27 (-20.59%)
Mutual labels:  chart

chart.xkcd-vue

chart.xkcd component for Vue.

stars npm

Read the documentation for more information.

Github | documentation

what's chart.xkcd?

Chart.xkcd is a chart library plots “sketchy”, “cartoony” or “hand-drawn” styled charts. Check out the Check out the documentation for more instructions and links.

Requirements

  • Vue >= 2.0.0
  • chart.xkcd >= 1.0.8

Installation

You must install chart.xkcd at first.

 npm i -S chart.xkcd

① Install from NPM

 npm i -S chart.xkcd-vue

② Install from <script>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/chart.xkcd-vue.min.js"></script>

When chart.xkcd-vue is included by <script>, it will be installed automatically if window.Vue and window.chartXkcd exists, ohterwise you should to install it manually by calling Vue.use(window.chartXkcdVue["default");

Use

Before you use it, you need to register components. There are two ways to register components

① Register all components

Register components at the main entry. All must be prefixed with chartxkcd-

import Vue from 'vue'
import chartXkcdVue from 'chart.xkcd-vue'

// ↓↓↓ will auto register all chart.xkcd component.
Vue.use(chartXkcdVue)

② Register a single component

Register components at the main entry.

import Vue from 'vue'
import chartXkcd from 'chart.xkcd'
import { chartXKCDLine } from 'chart.xkcd-vue'
Vue.component('chartxkcd-line', chartXKCDLine)

Using components in templates

If you register a component at the entrance, you can use it as follows

<template>
  <chartxkcd-line :config="config"></chartxkcd-line>
</template>

<script>
  import { chartXKCDLine } from 'chart.xkcd-vue'

  export default {
    name: 'app',
    data() {
      return {
        config: {
          title: 'Monthly income of an indie developer',
          xLabel: 'Month',
          yLabel: '$ Dollors',
          data: {
            labels: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10'],
            datasets: [
              {
                label: 'Plan',
                data: [30, 70, 200, 300, 500, 800, 1500, 2900, 5000, 8000]
              },
              {
                label: 'Reality',
                data: [0, 1, 30, 70, 80, 100, 50, 80, 40, 150]
              }
            ]
          }
        }
      }
    },
    components: {
      'chartxkcd-line': chartXKCDLine
    }
  }
</script>
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].