0.1.5 • Published 6 years ago

patd-vue-chart v0.1.5

Weekly downloads
-
License
-
Repository
github
Last release
6 years ago
  • 统一的数据格式: 使用对前后端都友好的数据格式,方便生成和修改。
  • 简化的配置项: 通过简化的配置项,可以轻松实现复杂需求。
  • 定制简单: 提供多种自定义 Echarts 方式,可以方便的设置图表配置项。

安装

npm i patd-vue-chart echarts -S

快速上手

<template>
  <div>
    <pae-line 
       name="折线图"
       width="500px"
       height="320px"
       :data="lineDataset"
    />      
  </div>
</template>

<script>
import Vue from 'vue'
import paeChart from 'patd-vue-chart';
Vue.use(paeChart);

export default {
  data () {
    return {
     lineDataset: {
        dimensions: [
          "product",
          { name: 2015, displayName: "2015-55" },
          "2016",
          "2017"
        ],
        source: [
          { product: "Matcha", "2015": 43.3, "2016": 85.8, "2017": 93.7 },
          { product: "Milk", "2015": 83.1, "2016": 73.4, "2017": 55.1 },
          { product: "Cheese", "2015": 86.4, "2016": 65.2, "2017": 82.5 },
          {
            product: "Walnut",
            "2015": 72.4,
            "2016": 53.9,
            "2017": 39.1
          }
        ]
      }
    }
  }
}
</script>
0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago