Based on the techniques used at http://fromanegg.com/post/41302147556/100-pure-css-radial-progress-bar and https://medium.com/@andsens/radial-progress-indicator-using-css-a917b80c43f9
For cool auto-scaling UI's that require circular progression
Also have a look at this fiddle
"orbicular": "~3.0.0"
to your dependency listbower install
<script src="https://github.com/cotag/orbicular/raw/master/bower_components/orbicular/orbicular.js"></script>
@import
directive i.e.
@import "../../bower_components/orbicular/orbicular.scss"
@include orbicular(options: opt-value, ..)
To play with the demo included in the repo:
npm install
bower install
./demo/index.html
in your browsergulp build
to update the scss<orbicular progression="downloaded" total="size" resize counterclockwise>Text / HTML in the circle</orbicular>
Where $scope.downloaded
(download progress) and $scope.size
(total size of download) are the variables used in the example to track the progress of a download. resize
is optional and the circle will resize on window resize / rotate etc. counterclockwise
attribute is optional, it changes the direction of the rotation.
Configure your circle using the mixin options
// All the defaults except shadow which isn't set by default
@include orbicular(
$barColor: #50a6d3, // The completed progress color
$barBg: #EEE, // The remaining progress color
$barWidth: 8, // The bar width is defined as a percentage of the width of the circle
$contentBg: #2b383f, // The circle center
$fontSize: 8, // Content font-size as a percentage of the circle size
$fontColor: #FFF, // Content text color
$transTime: 0.3s, // Time to animate the movement
$transFunc: linear, // transition timing
$shadow: 6px 6px 10px rgba(0,0,0,0.2) // optional shadow (not default)
);
// for further customizations to the circle content use:
// You can add your own id's and classes to the element too
orbicular, [orbicular] {
div.co-content > div > div > div {
font-weight: bold;
// and any other divs' etc.
}
}
The circles size is based on the width of the parent element. This size is static and is set at the following times:
'orb width'
to the elements scopeif you set the optional resize
attribute on the element then it'll also resize on
Broadcasting or emitting should be used to programmatically resize circles
resize
attribute if it should resize automaticallyThere is a single breaking change: (resolving a conflict with bootstrap UI)
progress="downloaded"
changes to progression="downloaded"