Skip to content

It is a Vue port of the jQuery-based PivotTable.js

License

Notifications You must be signed in to change notification settings

lmbak/vue-pivottable

This branch is 4 commits ahead of, 19 commits behind Seungwoo321/vue-pivottable:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

81d9442 Β· Aug 18, 2023
Feb 16, 2023
Feb 16, 2023
Feb 16, 2023
Feb 16, 2023
Feb 16, 2023
Oct 22, 2022
Aug 22, 2019
Dec 16, 2021
Nov 4, 2022
Nov 7, 2022
Dec 16, 2021
Aug 22, 2019
Nov 7, 2022
Aug 22, 2019
Aug 18, 2023
Aug 22, 2019
Aug 22, 2019
Nov 4, 2022

Repository files navigation

Vue Pivottable

It is a Vue port of the jQuery-based PivotTable.js

npm npm npm jsdelivr

All Contributors

Documentation

You can view the documentation at https://seungwoo321.github.io/vue-pivottable. It's also lighter by removing vue-plotly from the dependencies.

Live Demo

link

Example Code

# Clone the project
git clone https://github.com/Seungwoo321/vue-pivottable.git

# Go into the cloned directory
cd vue-pivottable/example/

# npm install
npm install

# npm run serve
npm run serve

Open browser to http://localhost:8080

vue-pivottable-demo.gif

Installation

npm i vue-pivottable

Usage

  • Vue Pivottable
<template>
  <vue-pivottable
    :data="[{color: 'blue', shape: 'circle'},{color: 'red', shape: 'triangle'}]"
    :rows="['color']"
    :cols="['shape']"
  >
  </vue-pivottable>
</template>

<script>
import { VuePivottable } from 'vue-pivottable'
import 'vue-pivottable/dist/vue-pivottable.css'
export default {
  components: {
    VuePivottable
  }
}
</script>
  • Vue Pivottable Ui
<template>
  <vue-pivottable-ui
    :data="[{color: 'blue', shape: 'circle'},{color: 'red', shape: 'triangle'}]"
    :rows="['color']"
    :cols="['shape']"
  >
  </vue-pivottable-ui>
</template>

<script>
import { VuePivottableUi } from 'vue-pivottable'
import 'vue-pivottable/dist/vue-pivottable.css'
export default {
  components: {
    VuePivottableUi
  }
}
</script>
<template>
  <vue-pivottable-ui
    :data="[{color: 'blue', shape: 'circle'},{color: 'red', shape: 'triangle'}]"
    renderer-name="Area Chart"
    :rows="['color']"
    :cols="['shape']"
    :renderers="renderers"
  >
  </vue-pivottable-ui>
</template>

<script>
import { VuePivottableUi } from 'vue-pivottable'
import PlotlyRenderer from '@vue-pivottable/plotly-renderer'
import 'vue-pivottable/dist/vue-pivottable.css'
export default {
  components: {
    VuePivottableUi
  },
  computed: {
    renderers () {
      return (() => ({
        'Grouped Column Chart': PlotlyRenderer['Grouped Column Chart'],
        'Stacked Column Chart': PlotlyRenderer['Stacked Column Chart'],
        'Grouped Bar Chart': PlotlyRenderer['Grouped Bar Chart'],
        'Stacked Bar Chart': PlotlyRenderer['Stacked Bar Chart'],
        'Line Chart': PlotlyRenderer['Line Chart'],
        'Dot Chart': PlotlyRenderer['Dot Chart'],
        'Area Chart': PlotlyRenderer['Area Chart'],
        'Scatter Chart': PlotlyRenderer['Scatter Chart'],
        'Multiple Pie Chart': PlotlyRenderer['Multiple Pie Chart']
      }))()
    }
  }
}
</script>

Contributors

Seungwoo321
Seungwoo321

πŸ’»
rkota
rkota

🚧
Jayraj Rathwa
Jayraj Rathwa

πŸ›
cbbdev
cbbdev

🚧

Inspired

License

MIT

About

It is a Vue port of the jQuery-based PivotTable.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 78.8%
  • CSS 11.7%
  • Vue 7.8%
  • HTML 1.5%
  • Shell 0.2%