1. vue-analytics-charts

vue-analytics-charts

vue-analytics-charts

Charts field component to display a analytics data based on Vue.

Works with Vue 2.*

Installation

Install via NPM

 $ npm install vue-analytics-charts --save
$ yarn add vue-analytics-charts

Register as Component

 import Vue from 'vue'
import VueAnalyticsCharts from 'vue-analytics-charts'

export default {
  name: 'App',

  components: {
    VueAnalyticsCharts
  }
}

Register as Plugin

 import Vue from 'vue'
import VueAnalyticsCharts from 'vue-analytics-charts'

Vue.use(VueAnalyticsCharts)

Usage

example

Use controller from koa-analytics-service to an easy use

Quick example

<template>
    <vue-analytics-charts
        title="Page views"
        api-url="http://127.0.0.1:3009/api/analytics"
    ></vue-analytics-charts>
</template>

<script>
import VueAnalyticsCharts from 'vue-analytics-charts'

export default {
  name: 'App',

  components: {
    VueAnalyticsCharts
  },
}
</script>

Props

Props Description Required Type Default
options apexcharts options false object { chart: { type: 'area' } }
analyticsOptions analytics options to build analytics report v4 (see Analytics options) false object {}

Analytics options (See batchGet reference)

Value Description Default
filters Filters value []
dimensions Dimensions value [{ name: "ga:date"}]
metrics metrics value [{ expression: 'ga:pageviews' }]

Changelog

Detailed changes for each release are documented in the release notes.

License

vue-analytics-charts is open-sourced software licensed under the MIT license

Support

Hello, I'm Thomas the maintainer of this project in my free time , if this project does help you in any way please consider to support me. Thanks :smiley: