angular4+百分比进度显示插件

效果展示:



一、在npm社区中搜索 :

    ng-circle-progress

二、在项目目录下安装下载

    npm install ng-circle-progress --save

三、在app.module.ts文件中导入NgCircleProgressModule模块,

    并在@NgModule装饰器中使用NgCircleProgressModule.forRoot()的方法,里面的参数

    是个对象字面量

NgCircleProgressModule. forRoot({
radius: 100,
outerStrokeWidth: 16,
innerStrokeWidth: 8,
outerStrokeColor: "#78C000",
innerStrokeColor: "#C7E596",
animationDuration: 300
})

四、在app.component.html中导入标签

<circle-progress
  [percent]="85"
  [radius]="100"
  [outerStrokeWidth]="16"
  [innerStrokeWidth]="8"
  [outerStrokeColor]="'#78C000'"
  [innerStrokeColor]="'#C7E596'"
  [animation]="true"
  [animationDuration]="300"
></circle-progress>


其中参数有:

选项 类型 默认 描述
percent number 0 您想要显示的百分比数
maxPercent number 1000 您想要显示的最大百分比数
radius number 90 圆的半径
clockwise boolean true 是否顺时针或逆时针旋转
showTitle boolean true 是否显示标题
showSubtitle</
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值