tvision-charts-vue-next
使用 **安装依赖**
11,311
| Install | |
|---|---|
npm install tvision-charts-vue-next |
|
| Latest Version: | 3.3.28 |
| Vue: | 3 |
| Last Updated: | Jul 6, 2026 |
| Links: | npm |
Maintainer: tvision-bot-organization
TCharts 图表的 Vue3 封装
使用
安装依赖
npm install @tencent/tcharts-vue-next
注册组件
import { createApp } from 'vue';
import TvisionCharts from '@tencent/tcharts-vue-next';
import App from './app.vue';
const app = createApp(App);
app.use(TvisionCharts);
代码中使用
<script setup lang="ts">
import { ref } from 'vue';
const options = ref({
title: {
text: '即时通讯社会族群分布',
show: true,
},
xAxis: {
boundaryGap: true,
data: ['学生', '体制内', '白领', '蓝领', '农民', '个体户', '无业者', '其他'],
title: {
text: '职业',
show: true,
}
},
yAxis: {
type: 'value',
title: {
text: '分布',
show: true,
}
},
series: [
{
name: '产品A',
type: 'bar',
data: [320, 332, 301, 334, 390, 320, 332, 301],
stack: 'a',
},
{
name: '产品B',
type: 'bar',
data: [220, 182, 191, 234, 290, 220, 182, 191],
stack: 'a',
},
{
name: '产品C',
type: 'bar',
data: [150, 232, 201, 154, 190, 150, 232, 201],
stack: 'a',
},
],
})
const theme = ref();
const chartType = ref('line');
const updated = (...args: any[]) => {
console.log('updated', ...args);
}
</script>
<template>
<div>
<p>TVision T1 Vue 示例</p>
<tvision-charts class="chart" :chartType="chartType" :options="options" :theme="theme" :onChartUpdated="updated" />
</div>
</template>
<style scoped>
.chart {
width: 800px;
height: 500px;
}
</style>
Version History
| Version | Released | License |
|---|---|---|
| 3.3.28 | ||
| 3.3.27 | ||
| 3.3.26 | ||
| 3.3.25 | ||
| 3.3.24 | ||
| 3.3.13 | ||
| 3.3.12 | ||
| 3.3.11 | ||
| 3.3.9 | ||
| 3.3.8 | ||
| 3.2.15 | ||
| 3.2.14 | ||
| 3.2.12 | ||
| 3.2.11 | ||
| 3.2.10 | ||
| 3.2.9 | ||
| 3.2.8 | ||
| 3.2.6 | ||
| 3.2.5 | ||
| 3.2.4 | ||
| 3.2.3 | ||
| 3.2.2 | ||
| 3.2.1 | ||
| 3.2.0 | ||
| 3.1.0 | ||
| 3.0.8 | ||
| 3.0.6 |