Giter Site home page Giter Site logo

Comments (2)

HanSolo avatar HanSolo commented on August 21, 2024

It would have been helpful to get a little code snippet that shows the problem because it seems that the issue is dependent on the skin that you use. So it looks like for the Gauge skin it has problems. Will look into that. Thanks for the heads up.

from medusa.

HanSolo avatar HanSolo commented on August 21, 2024

The problem is related to the tickmarks and the major- and minor tickspace. You can imagine that if you create tickmarks and labels for every 10th number from 0 - 21055406 the library has to draw a lot of tickmarks and ticklabels which is the reason for the problem. There are different ways to face this problem, first thing I would do with such large numbers, I would ask myself if I need to have them in all detail or if it won't be enough to for example divide the values by 10000 before I pass them to the gauge. If the gauge has a size of 400x400px you won't be able to visual determine the difference between values in the range of 1000. The other approach would be to adjust the major- and minor tickspace according to your values. The following code works with the large number you mentioned:

        gauge = GaugeBuilder.create()
                            .skinType(SkinType.GAUGE)
                            .prefSize(400, 400)
                            .decimals(0)
                            .maxValue(21055406)
                            .majorTickSpace(100000)
                            .minorTickSpace(10000)
                            .tickLabelsVisible(false)
                            .minorTickMarksVisible(false)
                            .mediumTickMarksVisible(false)
                            .autoScale(false)
                            .animated(true)
                            .build();

from medusa.

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.