小程序统计进度条及环形图
wxml
<view>
<view class="stater">
<view class="sta_title">
直播观看数据汇总
</view>
<view class="content-box">
<block wx:for="{
{resList}}" wx:key="index">
<view class="progress-box">
<view style="color:{
{
item.color}}" class="top-area"><text>{
{item.name}}</text></view>
<view class="bottom-area">
<view class="progress-item">
<view style="background:{
{
item.color}};width:{
{
(item.has/item.total)*100}}%;" class="progress-line">
<view style="color:{
{
item.color}}" class="progress-val {
{(item.has/item.total)*100>92?'text-over':''}}">{
{item.hasLabel}}{
{item.unit}}</view>
</view>
</view>
<view style="color:{
{
item.color}}" class="total-box"><text>{
{item.totalLabel}}{
{item.unit}}</text></view>
</view>
</view>
</block>
</view>
<view class="sta_title">
区域数据分析
</view>
<view class="content-box">
<scroll-view wx:if="{
{classifyList.length}}" scroll-x="true" class="classify-box">
<block wx:for="{
{classifyList}}" wx:key="index" >
<view bindtap="changeFilter" data-index="{
{index}}" class="classify-item {
{selectIndex==index?'active-item':''}}">
<view style="background:{
{
item.bgColor}}" class="classify-inner">
<text>{
{item.name}}