在用uniapp开发小程序的时候,用ucharts引入图表

本文讲述了在uniapp开发小程序过程中,如何使用ucharts插件来实现图表的切换功能。详细介绍了ucharts的下载途径和使用示例代码。
摘要由CSDN通过智能技术生成

用ucharts引入图表,在用uniapp开发小程序的时候,实现点击三个部分切换不同的图表。


前言

提示:本文是通过ucharts添加图表的

在插件市场下载ucharts: ucharts下载网址

ucharts官方网站

提示:进入官方网站可以在演示中查看示范例子查看代码


使用案例

代码如下(示例):

<template>
	<view class="">
		<u-navbar back-text="返回" title="用ucharts引入图表" :background="background" 
			:back-text-style="{ color: '#ffffff' }	"
			title-color="#ffffff" back-icon-color="#ffffff">
		</u-navbar>
		<u-tabs :list="list" :is-scroll="false" :current="current" @change="change"></u-tabs>
		<u-gap height="40"></u-gap>
		<view v-if="current == 0" class="container">
			<view class="charts-box" style="width: 100%; height: 600rpx;">
				<qiun-data-charts type="mix" :opts="opts" :chartData="chartData" />
			</view>
		</view>
		<view v-if="current == 1" class="container">
			<view class="charts-box" style="width: 100%; height: 600rpx;">
				<qiun-data-charts type="line" :opts="opts2" :chartData="chartData2" />
			</view>
		</view>
		<view v-if="current == 2" class="container">
			<view 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值