Giter VIP home page Giter VIP logo

Comments (12)

Mictronics avatar Mictronics commented on May 30, 2024

I still maintain this repo and have a look at your problem. Can you provide me a simple code example? I'm not familiar with Vue.

from gaugemeter.

janswist avatar janswist commented on May 30, 2024

Thank you! Your gauge is one of the best looking out there, if not the best.

from gaugemeter.

Mictronics avatar Mictronics commented on May 30, 2024

Well, it's actually not mine and a shame that the original developer has given up on this.

from gaugemeter.

Mictronics avatar Mictronics commented on May 30, 2024

@janswist Can you provide more details please. Simple demo implementation?

from gaugemeter.

janswist avatar janswist commented on May 30, 2024

Sure, here's the fiddle: https://jsfiddle.net/4saoyxt6/

from gaugemeter.

Mictronics avatar Mictronics commented on May 30, 2024

@janswist
There is a typo in your CSS.

.GaugeMeter SPAN,
.GaugeMeter B{
    	Margin:          0 23%;
    	Width:           54%; <--- Width is set to 5% in you Fiddle example
    	Position:        Absolute;
    	Text-align:      Center;
    	Display:         Inline-Block;
    	Color:           RGBa(0,0,0,.8);
    	Font-Weight:     100;
    	Font-Family:     "Open Sans", Arial;
    	Overflow:        Hidden;
    	White-Space:     NoWrap;
    	Text-Overflow:   Ellipsis;
}

from gaugemeter.

janswist avatar janswist commented on May 30, 2024

So is in readme.me :)
zrzut ekranu 2018-07-17 o 21 22 24

Okay, so we found basic problem. Now an example from production using default css: https://jsfiddle.net/4saoyxt6/11/

and how I managed to overcome this: https://jsfiddle.net/4saoyxt6/15/ but my implementation is not responsive. If I change data-size then I have to search by hand for optimal width in css.

from gaugemeter.

Mictronics avatar Mictronics commented on May 30, 2024

When you look in doc.html it says:

data-size | Any positive integer. | Width & height of the gauge meter in pixels.

Instead of using data-size="150px" just use data-size=150 and it will scale nicely.

from gaugemeter.

Mictronics avatar Mictronics commented on May 30, 2024

And thanks for catching that typo.

from gaugemeter.

janswist avatar janswist commented on May 30, 2024

No problems. Thanks for maintaining it :) One more question: how to make font bigger? Font-size doesn't seem to react

from gaugemeter.

Mictronics avatar Mictronics commented on May 30, 2024

Unfortunately scaling of label font size is actually hard coded. Change the .22 factor in code:

                $("<span></span>").appendTo(t).html(r).css({
                    "line-height": option.size + "px",
                    "font-size": .22 * option.size + "px",
                    color: fgcolor
                });

Something that could be an option too. Will think about it.

from gaugemeter.

janswist avatar janswist commented on May 30, 2024

Yeah, that would be a great addition to give even more control over the gauge look and feel like with weight already. Please update this issue when you will decide to implement it :)

from gaugemeter.

Related Issues (14)

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.