rendro / easy-pie-chart

easy pie chart is a lightweight plugin to draw simple, animated pie charts for single values

Home Page:http://rendro.github.io/easy-pie-chart

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

zero percent still renders as dot (jQuery)

rueggerc opened this issue · comments

When I try to use easy-pie-chart with 0%, I'm still seeing a small dot being rendered at top:
See screen shot.
Any idea what I'm doing wrong?

easypiechart0

I'm using jQuery 1.12.4

HTML:
piechart-html

JS:
// PieChart
$('.chart').easyPieChart({
scaleColor: false,
barColor: 'green',
trackColor: '#e5e5e5',
size: 110,
onStep: function(from, to, percent) {
$(this.el).find('.percent').text(Math.round(percent));
}
});

CSS
.chart {
position: relative;
display: inline-block;
width: 110px;
height: 110px;
margin-top: 50px;
margin-bottom: 50px;
text-align: center;
}

.chart canvas {
position: absolute;
top: 0;
left: 0;
}

.percent {
display: inline-block;
line-height: 110px;
z-index: 2;
}
.percent:after {
content: '%';
margin-left: 0.1em;
font-size: .8em;
}

try set lineCap to butt