• circleProgress.js圆环进度条插件


    1. <script src="jquery.min.js"></script>
    2. <script src="jquery-circle-progress/dist/circle-progress.js"></script>
    3. <div id="circle"></div>
    4. <script>
    5. $('#circle').circleProgress({
    6. value: 0.75,
    7. size: 80,
    8. fill: {
    9. gradient: ["red", "orange"]
    10. }
    11. });
    12. </script>

    选项:

    OptionDescription
    value必须值,圆环的百分比从0到1. 默认值: 0
    size圆环大小 Default: 100
    startAngle初始角度 Default: -Math.PI
    reverse是否逆时针 Default: false
    thickness圆环的宽度,默认为1/4的大小 Default: "auto"
    lineCapArc line cap: "butt""round" or "square" - read more Default: "butt"
    fill圆环的填充颜色 - { color: "#ff1e41" } - { color: 'rgba(255, 255, 255, .3)' } - { gradient: ["red", "green", "blue"] } - { gradient: [["red", .2], ["green", .3], ["blue", .8]] } - { gradient: [ ... ], gradientAngle: Math.PI / 4 } - { gradient: [ ... ], gradientDirection: [x0, y0, x1, y1] } - { image: "http://i.imgur.com/pT0i89v.png" } - { image: imageInstance } - { color: "lime", image: "http://i.imgur.com/pT0i89v.png" } Default: { gradient: ["#3aeabb", "#fdd250"] }
    emptyFill空白的圆环 Default: "rgba(0, 0, 0, .1)"
    animation动画设置 See jQuery animations. You may also set it to false Default: { duration: 1200, easing: "circleProgressEase" } "circleProgressEase" is just a ease-in-out-cubic easing
    animationStartValue动画默认开始从那个值开始运动。 Default: 0.0

    事件

    EventHandler
    circle-animation-startfunction(event): - event - jQuery event
    circle-animation-progressfunction(event, animationProgress, stepValue): - event - jQuery event - animationProgress - from 0.0 to 1.0 - stepValue - current step value: from 0.0 to value
    circle-animation-endfunction(event): - event - jQuery event

    其他:

    You can get the  (but only if the widget is already inited):

    $('#circle').circleProgress({ value: 0.5 });
    var canvas = $('#circle').circleProgress('widget');

    You can get the CircleProgress instance:

    var instance = $('#circle').data('circle-progress');

    You can redraw existing circle (but only if the widget is already inited):

    $('#circle').circleProgress({ value: 0.5, fill: { color: 'orange' }});
    $('#circle').circleProgress('redraw'); // use current configuration and redraw
    $('#circle').circleProgress(); // alias for 'redraw'
    $('#circle').circleProgress({ size: 150 }); // set new size and redraw

  • 相关阅读:
    学习笔记-XXE
    php安装kafka 和在linux下php-rdkafka扩展安装
    redis复习
    八大排序算法(含时间复杂度、空间复杂度、算法稳定性)
    【支付宝生态质量验收与检测技术】
    离线量化(后量化)算法研究-----脉络梳理
    MyBatisPlus(二十一)乐观锁
    SSM(Spring+SpringMVC+MyBatis)框架集成
    CANOE功能介绍
    多御浏览器安卓版有哪些地方值得下载使用?
  • 原文地址:https://blog.csdn.net/qq_39161501/article/details/133815288