Giter Club home page Giter Club logo

circular-progress-bar's People

Contributors

dependabot[bot] avatar dizzysquirrel avatar tomickigrzegorz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

circular-progress-bar's Issues

gradient start and end diffrently

i need a progress bar that start red and finish green
when doing that using the current gradient option, i get a circle that start red, transform to green and then back to black.
how can i make it go only 1 way?

also how can the end of the gradient be relative to the cut prop?

Global configuration

Instead of adding json-html to each element, we only give a percentage, the rest can be set at once for all elements globally.

<div class="global" data-pie='{ "percent": 75 }'></div>
const globalConfig = {
  "strokeBottom": 5,
  "colorSlice": "#FF6D00",
  "colorCircle": "#f1f1f1",
  "round": true
}

const global = new CircularProgressBar('global', globalConfig);
global.initial();

No animation when interval is too low

This doesn't work,

var circle = new CircularProgressBar('someclass');

      setTimeout(() => {
        circle.animationTo({
          index: 0,
          percent: Math.floor(75)
        });
      }, 10);

while this works:

   var circle = new CircularProgressBar('someclass');

        setTimeout(() => {
          circle.animationTo({
            index: 0,
            percent: Math.floor(75)
          });
        }, 30);

There is some issue with the timing

stroke-width undefined

There is a problem if there is no "stroke" set in the html, no default stroke is set.

Problem with class renaming

Changing the class name of individual elements results in an error. e.g.
<div class="pie" data-pie=... we will change for example to <div class="element" data-pie=...

colorSlice not changing dynamically

I'm not sure if it's intended or not but using for example:

setTimeout(() => {
            const options = {
                // item number you want to update
                "index": 1,
                // set a new percentage
                "percent": 30,
                // set a new color
                "colorSlice": "#000"
            };
            circle.animationTo(options);
}, 3000); // after 3s update

And the stroke isn't changing color to black.
This can be useful if for example for percentage < 30 then set font color and stroke color to green, if percentage < 60 then set colors to orange, etc..

Wrong file name

Wrong filename when generating libraries in dist folder - CircularProgressBar.min.js should be circularProgressBar.min.js

Without number

If "number": false is set then 0% progress bar is displayed incorrectly

issue

Percentage of circle no longer changing after reaching 0%.

Hello,

We use your Circle in our application and we often change the percent options with the animationTo function.

The problem we encounter is that when we make a change with a percentage of 0%, then the circle changes for a percentage of 0% but it then stays at 0% no matter what changes we make afterwards.

For example, if we decide to change the circle to 40%, it will change to 40%.

If we ask it to change to 0%, it changes to 0%,

But if we ask it again to change to 95%, it stays at 0%.

There must be a condition in the code, such as

if (percent) { ...

and it does not enters the condition since if(0) does not enter the condition in Javascript

image

Qn: updating percent value programmatically?

Great work on this progress bar!

I've been incorporating it into a wizard for a mobile app (SPA), and the initial value looks great. Is there a way to update the percentage value and have the progress bar pick up on the change / update the SVG? Right now I have:

// html
<div class="pie" data-pie='{ "colorSlice": "#ffffff", "strokeWidth": 5, "size": 50, "fontColor": "#ffffff", "percent": 17 }'></div>

// JS / initialize  
this.progress = new CircularProgressBar('pie');
...

ShowStep: function (number) {
    var totalSteps = 6;
    var progressPct = ((number * 1.0 / totalSteps) * 100).toFixed(1);
    // set the progress bar
    this.progress.percent = progressPct;
}

...but setting the percent value doesn't appear to work.

Circle goes round and round in the new version and never stops.

Video :

New_Circle_bug.mov

What happens :

So I installed the new version in my application to fix the circle error, which remains at 0.

But now, from time to time, the circle goes round and round in circles, even if I give it a percentage of 95%.

What could be causing this?

Version :

Latest (v1.2.0)

inverse option is not working in ios

We are trying to use the library in one of our plugin, but inverse option is not working in ios. Another is sometimes the circle goes on and on, but sometimes is works fine.

Version [1.2.1] doesn't seem to work when percent is "0", the circle goes round and round without stopping

Version : 1.2.1

What happens :

We were using version 1.1.9 for our application and everything was going great.

We wanted to upgrade our version to 1.2.1 but the circle keeps going round and round when the percent is "0"

Is there a new option we need to add? 

Video example :

CircleBroken.mov

Here is a codepen example to reproduce the problem :

https://codepen.io/Philippe-Vincent-the-selector/pen/YzggmmB

If 0% is set

If set to 0%, the circle with color is filled as if the circle was set to 100%

issue

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.