Closed panickerr closed 8 years ago
getStyle
method from the demo, I used it in order to make it look better, no matter what options are selected. Here's the bare minimum of what you can do to center the text:
<div class="progress-wrapper">
<div class="progress">Text goes here</div>
<div round-progress></div>
</div>
.progress-wrapper{
position: relative;
}
.progress{
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%); /* add any relevant browser prefixes if necessary */
z-index: 1;
}
@panickerr Did you manage to solve this?
Closing this, but feel free to comment if there's still an issue.
The Svg fails to align with the text( not the text inside the circle ) . I have divided the card into two halfs and put 3 containers in both halfs one the legend and the other being the SVG. but they are never centered.
The css ` .progress-wrapper{ position: relative; /margin:20px auto;/
font-size: 18px; }
the html: `
Trail index
The output of the code : Similar output in a smaller Div : The expected output or the ideal one where the legend is aligned with the circle text:
The get style : ` $scope.getStyle = function(){ var transform = ($scope.isSemi ? '' : "translateY(-50%) ") + "translateX(-50%)";