Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get text inside the round progress bar circle? #23

Closed
alexanderjareno opened this issue Jun 2, 2015 · 2 comments
Closed

How to get text inside the round progress bar circle? #23

alexanderjareno opened this issue Jun 2, 2015 · 2 comments

Comments

@alexanderjareno
Copy link

Hi,

I'm quite new to angular, and I'm using your round progress bar in a school project. I'm wondering how to get a label inside the progress circle? I have looked at the source code for your demo, but I still can't seem to get the progress numbers to show up inside the circle, the numbers only show up above the circle. Everything else works, except the placement of the numbers.

<div class="progress-wrapper"  ng-style="{'font-size': getFontSize()}">

        <div class="progress">
            {{ sp.current }} / {{ sp.max }}
        </div>

        <div
        round-progress
        max="sp.max"
        current="sp.current"
        color="#45ccce"
        bgcolor="#eaeaea"
        radius="65"
        stroke="15"
        semi="false"
        rounded="false"
        clockwise="true"
        iterations="75"
        animation="easeInOutQuart">
    </div>
</div>
@alexanderjareno alexanderjareno changed the title How to get text inside the round progress bar circle How to get text inside the round progress bar circle? Jun 2, 2015
@crisbeto
Copy link
Owner

crisbeto commented Jun 2, 2015

You're correct, the directive doesn't support having text inside the element itself. The way I use it is to overlay the numbers above the circle.

@alexanderjareno
Copy link
Author

Hi,

Thanks for the info! Found that the demo uses css code that makes the text appear inside the circle. This css code is not included in the readme though.

Regards,
Alex

.progress-wrapper{
    position: relative;
    margin:20px auto;
    font-size: 21px;
}
.progress{
    position: absolute;
    width: 100%;
    height: 100%;
    line-height: 6em;
    font-size:1em;
    text-align: center;
    color: #886aea;
    font-weight: 100;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants