Git Product home page Git Product logo

Comments (6)

Mikhus avatar Mikhus commented on August 21, 2024

Thanks for your report! As far as I will have free time I will check this case. Most probably your solution is a correct way to solve the issue. To be honest I really wasn't check the highlights with more than 3 colors....

from canvas-gauges.

RC7502 avatar RC7502 commented on August 21, 2024

I am running into the same issue. I have 5 color areas and the image is flipped 180 degrees. The workaround doesn't work for me because I want to use more than one gauge and the other ones only have 3 color areas. Also for my gauge with the 5 color areas it didn't put the 5th area in the right location. It was placed beneath the 1st area.
Thanks

from canvas-gauges.

Mikhus avatar Mikhus commented on August 21, 2024

Thank you. Working on fix...

from canvas-gauges.

jeffjenk avatar jeffjenk commented on August 21, 2024

Just to be clear with my little hacky workaround I got the line number wrong. Should be placed after line 557:
ctx.arc( 0, 0, r2, sa - 0.2, ea + 0.2, false);

then put:

ctx.rotate( radians( -90));

This is just a little hack though and still might not work in your case. I am sure Mikhus will have a better solution soon.

from canvas-gauges.

Mikhus avatar Mikhus commented on August 21, 2024

Fixed with commit eb3f264

from canvas-gauges.

Mikhus avatar Mikhus commented on August 21, 2024

to jeffjenk: It's better after line 532 just add ctx.save();
I did it with the specified commit. I've also added example.html containing 5 highlights, so you can check easily.

Best regards,
Mike

from canvas-gauges.

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.