3d-stack 中文文档教程

发布于 7年前 浏览 32 更新于 3年前

3d-stack

Install

// npm
npm install 3d-stack

// yarn
yarn add 3d-stack

Options

Props

NameTypeDescription
initDataParams: obj[Array]init data

Events

NameTypeDescription
changeParams: value[Object]values change when the callback function

How to Use

<template>
  <div>
    <h1>3D Stack Chart</h1>
    <stack :init-data="browsers" v-if="browsers && browsers.length" @change="change"></stack>
  </div>
</template>

<script>
const initData = [
  { name: 'chrome', count: 300, color: '#3866d1' },
  { name: 'ie', count: 180, color: '#299529' },
  { name: 'edge', count: 120, color: '#257e25' },
  { name: 'firefox', count: 80, color: '#9d2424' },
  { name: 'safari', count: 50, color: '#252525' },
  { name: 'opera', count: 30, color: '#995924' },
  { name: 'others', count: 40, color: '#484848' }
]

export default {
  data() {
    return {
      browsers: initData
    };
  },
  methods: {
    change(e) {
      console.log('value:', e);
    }
  }
}
</script>

3d-stack

Install

// npm
npm install 3d-stack

// yarn
yarn add 3d-stack

Options

Props

NameTypeDescription
initDataParams: obj[Array]init data

Events

NameTypeDescription
changeParams: value[Object]values change when the callback function

How to Use

<template>
  <div>
    <h1>3D Stack Chart</h1>
    <stack :init-data="browsers" v-if="browsers && browsers.length" @change="change"></stack>
  </div>
</template>

<script>
const initData = [
  { name: 'chrome', count: 300, color: '#3866d1' },
  { name: 'ie', count: 180, color: '#299529' },
  { name: 'edge', count: 120, color: '#257e25' },
  { name: 'firefox', count: 80, color: '#9d2424' },
  { name: 'safari', count: 50, color: '#252525' },
  { name: 'opera', count: 30, color: '#995924' },
  { name: 'others', count: 40, color: '#484848' }
]

export default {
  data() {
    return {
      browsers: initData
    };
  },
  methods: {
    change(e) {
      console.log('value:', e);
    }
  }
}
</script>
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文