Code Monkey home page Code Monkey logo

Comments (4)

setaman avatar setaman commented on August 17, 2024

Hi @nbhkph

I left a small dot there at 0 Progress because that is actually a value as well. That was the design decision I made at those times. Maybe it wasn't the best decision.
Anyway you can fix this with noData state prop like follows:

<vue-ellipse-progress :propgress="progress" :no-data="progress === 0" />

The progress line will disappear. If it helps, feel free to close the Issue, otherwise let as discuss a better solution.

from vue-ellipse-progress.

nbhkph avatar nbhkph commented on August 17, 2024

Thanks for answering!

it works, but when data is set to false it hides the whole design any solution for that?

from vue-ellipse-progress.

setaman avatar setaman commented on August 17, 2024

@nbhkph

Yes, this is the obvious downside of the proposed solution. I'm already thinking about how to make the component behavior more flexible in different states, but that's a question for future releases.

Let me explain you, why i left this small dot for 0 progress. During the development i have created many different plain circles, e.g. with transparent empty lines. And with 0 progress simply none of the lines would be displayed. I found this irritating and left this point there to indicate the presence of the circle. So, this is more the question on the philosophy, not how to fix this.

But, i have another dirty workaround for you. You could change the line type depending on the progress like this: :line="progress === 0 ? 'butt' : 'round'". This would hide the progress line and does not brake any styles, but have downsides too.

Also you could change the styles property stroke-dashoffset of the circle.ep-circle-progress element manually. You just need to add 0.5 to the current value to hide the line completely. But yeah, could be a little bit tricky.

It's anything i can suggest you for now, without touching the code base. Let me know, if you have further questions or need help!

from vue-ellipse-progress.

nbhkph avatar nbhkph commented on August 17, 2024

Okay thanks for the explanation!

from vue-ellipse-progress.

Related Issues (20)

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.