Fork me on GitHub

Circliful



Description

Show circle statistics with animation.


The project is hosted on Github and is available for use under the MIT software license. You can report bugs and discuss features on the GitHub issues page, or send tweets to Follow us on twitter..

Fork on Github »

Requirements


jQuery 1.11.0/2.1.0 <


Optional Dependencies


Bootstrap


Browser Support


The Plugin uses SVG for drawing the circle please visit this site to see the browser support of SVG http://caniuse.com/#feat=svg


Getting Started


How to use

Include

Include circliful & jquery to your Site.

        
			
<link href="css/jquery.circliful.css" rel="stylesheet" type="text/css">

<script src="http://code.jquery.com/jquery-1.10.2.min.js"<</script>
<script src="js/jquery.circliful.min.js"></script>
			
          

HTML

Add an element to your Site with a unique id and an "container" arround it that controls the size of your circle statistic, here a example with bootstrap:

		  	
<div class="row">
    <div class="col-lg-2">
        <div id="yourcircle"></div>
    </div>
</div>

		  
          

JavaScript

Add this code at the end of your site

          
		  
<script>
$( document ).ready(function( {
        $("#your-circle").circliful({
        animationStep: 5,
        foregroundBorderWidth: 5,
        backgroundBorderWidth: 15,
        percent: 75
    });
});
</script>
		  
          

Options

Available options

Options

Name Description Type Default
foregroundColor color of the foreground circle (no color add value 'none') RGB or string #3498DB
backgroundColor color of the background circle (no color add value 'none') RGB or string #eee
fillColor fill color of circle RGB or string none
foregroundBorderWidth width of foreground circle border integer 15
backgroundBorderWidth width of background circle border integer 15
percent can be 1 to 100 integer 75
animation if the circle should be animated initialy integer 1
animationStep can be 1 to 100, how fast or slow the animation should be integer 5
fontColor color of the percentage RGB #aaa
icon font awesome icon, details bellow string none
iconSize font size of the icon integer 30
iconColor color of the icon RGB #ccc
iconPosition position of the icon (top, bottom, left, right or middle) string top
textSize font size of the percentage text integer 22
textAdditionalCss additonal css for the percentage text string ''

Font Awesome Usage

Go to https://github.com/FortAwesome/Font-Awesome/blob/master/css/font-awesome.css and copy/paste the string after the slash for Example hdd icon, copy/paste f0a0 into the parameter field { icon: 'f0a0' }

          
      
.fa-hdd-o:before {
    content: "\f0a0";
}
      
          

Contributing

After you have verified your code, send a pull request to the Circliful master branch. After you send a pull request, you will hear back from me shortly after I review your code.


Extending

If you find that you need a feature that Circliful does not currently support, either let me know via the Github issue tracker, or write a message on Twitter


Copyright

Copyright © 2016 Patric Gutersohn

Donation

If you find this plugin usefull or/and use it commercially please donate as much as you like.