All Projects β†’ open-data-plan β†’ g2plot-vue

open-data-plan / g2plot-vue

Licence: MIT license
g2plot for vue, both 2 and 3

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to g2plot-vue

G2plot
🍑 An interactive and responsive charting library
Stars: ✭ 2,072 (+1854.72%)
Mutual labels:  g2, antv, g2plot
React-G2Plot
πŸ€– Unofficial react component wrapper for @antvis/G2Plot
Stars: ✭ 21 (-80.19%)
Mutual labels:  g2, antv, g2plot
v-pip
πŸ–Ό Tiny vue wrapper for supporting native picture-in-picture mode.
Stars: ✭ 30 (-71.7%)
Mutual labels:  vue2, vue3
theme-set
πŸ’„ Customize theme for G2, G2Plot of AntVοΌˆε­΅εŒ–δΈ­οΌ‰
Stars: ✭ 35 (-66.98%)
Mutual labels:  g2, g2plot
slider
Vue 3 slider component with multihandles, tooltips merging and formatting (+Tailwind CSS support).
Stars: ✭ 162 (+52.83%)
Mutual labels:  vue2, vue3
security-code
A powerful security code input supports dynamic configuration of the number of input boxes.
Stars: ✭ 63 (-40.57%)
Mutual labels:  vue2, vue3
hoc-element-table
πŸ“¦ A Vue 3.x Table Component built on Webpack 5
Stars: ✭ 26 (-75.47%)
Mutual labels:  vue2, vue3
vue-input-autowidth
A Vue.js directive that automatically resizes an input's width to fit its contents.
Stars: ✭ 94 (-11.32%)
Mutual labels:  vue2, vue3
fluent-vue
Internationalization plugin for Vue.js
Stars: ✭ 137 (+29.25%)
Mutual labels:  vue2, vue3
toggle
Vue 3 toggle component with labels, custom slots and styling options (+Tailwind CSS support).
Stars: ✭ 75 (-29.25%)
Mutual labels:  vue2, vue3
g2-angular
Angular for Alipay G2
Stars: ✭ 27 (-74.53%)
Mutual labels:  g2, antv
vue-pattern-input
Use RegExp to limit input
Stars: ✭ 25 (-76.42%)
Mutual labels:  vue2, vue3
vue-split-carousel
a carousel component for vue, meanwhile display several carousel item
Stars: ✭ 37 (-65.09%)
Mutual labels:  vue2, vue3
vue-unstated
A tiny state management library for Vue Composition API.
Stars: ✭ 30 (-71.7%)
Mutual labels:  vue2, vue3
vue-snippets
Visual Studio Code Syntax Highlighting For Vue3 And Vue2
Stars: ✭ 25 (-76.42%)
Mutual labels:  vue2, vue3
janak
Your next vue.js package!
Stars: ✭ 26 (-75.47%)
Mutual labels:  vue2, vue3
vue-ray
Debug your Vue 2 & 3 code with Ray to fix problems faster
Stars: ✭ 48 (-54.72%)
Mutual labels:  vue2, vue3
v-drag
The simplest way to integrate dragging on Vue.js
Stars: ✭ 71 (-33.02%)
Mutual labels:  vue2, vue3
v-intl
Add i18n to your awesome Vue 3 app πŸ”‰
Stars: ✭ 13 (-87.74%)
Mutual labels:  vue2, vue3
vue-insta-stories
Vue 2 & 3 library for Instagram like stories.
Stars: ✭ 45 (-57.55%)
Mutual labels:  vue2, vue3

@opd/g2plot-vue

G2Plot for Vue, both v2 and v3, see documentation for more

build npm npm npm codecov FOSSA Status

Install

npm install @opd/g2plot-vue

g2plot-vue will auto switch export version based on your installed vue version, if not work, you can switch by follow:

node ./node_modules/@opd/g2plot-vue/scripts/postinstall.js

Usage

Edit g2plot-vue-basic-example

jsx

import { defineComponent, ref } from 'vue'
import { LineChart, LineChartProps } from '@opd/g2plot-vue'

const config: LineChartProps = {
  height: 350,
  autoFit: true,
  xField: 'year',
  yField: 'value',
  smooth: true,
  meta: {
    value: {
      max: 15,
    },
  },
  data: [
    { year: '1991', value: 3 },
    { year: '1992', value: 4 },
    { year: '1993', value: 3.5 },
    { year: '1994', value: 5 },
    { year: '1995', value: 4.9 },
    { year: '1996', value: 6 },
    { year: '1997', value: 7 },
    { year: '1998', value: 9 },
    { year: '1999', value: 11 },
  ],
}

export default defineComponent(() => {
  const chartRef = ref(null)
  return () => <LineChart {...config} chartRef={chartRef} />
})

template

<template>
  <line-chart v-bind="config" />
</template>
<script>
import Vue from 'vue'
import { LineChart } from '@opd/g2plot-vue'

Vue.use(LineChart)

export default {
  data() {
    return {
      config: {
        height: 350,
        autoFit: true,
        xField: 'year',
        yField: 'value',
        smooth: true,
        meta: {
          value: {
            max: 15,
          },
        },
        data: [
          { year: '1991', value: 3 },
          { year: '1992', value: 4 },
          { year: '1993', value: 3.5 },
          { year: '1994', value: 5 },
          { year: '1995', value: 4.9 },
          { year: '1996', value: 6 },
          { year: '1997', value: 7 },
          { year: '1998', value: 9 },
          { year: '1999', value: 11 },
        ],
      },
    }
  },
}
</script>

DEMO

API

All config defined in G2Plot document can be used as props or attrs

Notable API in g2plot-vue

  • chartRef: ref of rendered plot, available after plot mounted, NOT component mounted
  • onReady: callback after plot mounted, NOT component mounted

FYI

Develop

npm install
npm run build

License

FOSSA Status

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].