@v-charts2/sankey

echarts 桑葚图

Usage no npm install needed!

<script type="module">
  import vCharts2Sankey from 'https://cdn.skypack.dev/@v-charts2/sankey';
</script>

README

mark text

@v-chart2/sankey

npm version install size GitHub stars GitHub issues
jsdelivr npm NPM

:tada: 桑葚图

下载

yarn add @v-charts2/sankey
# or
npm install @v-charts2/sankey

安装

当你当前的打包工具为 webpack 时, 推荐你进行以下的安装步骤

传统的 webpack4.x 没有 Tree Shaking 的支持, 如果你想引入 @v-charts2/sankey/vue2 或者 @v-charts2/sankey/vue3 的话, 可能会报错

import Vue from "vue";
import VeSankey from "@v-charts2/sankey"; // 兼容 vue2.x 和 vue3.x 的支持, 将会自动加载支持 vue2.x 的支持包或者支持 vue3.x 的支持包
Vue.use(VeSankey);

当你当前的打包工具为 vite 或者 rollup 时, 推荐你进行以下的安装步骤

  • Vue 2.x
import Vue from "vue";
import VeSankey from "@v-charts2/sankey/vue2"; // 更好的 Tree Shaking 推荐引入 vue2.x 的专属支持包
import "@v-charts2/sankey/v-charts.css"; // 需要手动引入样式
Vue.use(VeSankey);
  • Vue 3.x
import { createApp } from "vue";
const app = createApp();
import VeSankey from "@v-charts2/sankey/vue3"; // 更好的 Tree Shaking 推荐引入 vue3.x 的专属支持包
import "@v-charts2/sankey/v-charts.css"; // 需要手动引入样式
app.use(VeSankey);