ashish-chopra / angular-gauge

A reusable gauge directive for Angular 1.x apps and dashboards
https://ashish-chopra.github.io/angular-gauge/
MIT License
95 stars 36 forks source link

Text display inside gauge with firefox #28

Closed atefBB closed 7 years ago

atefBB commented 7 years ago

I'm using ng-gauge on firefox (v53.0 (32 bits) Win7), the text inside the gauge is displayed correctly on chrome but with firefox the text is displayed outside the gauge. my HTML code is: <ng-gauge size="150" type="full" thick="5" value="some_data" cap="round" label="text here" foreground-color="#0095c8" background-color="#c8c7cc" duration="1000" append="%"></ng-gauge> the displayed gauge here: ddd

ashish-chopra commented 7 years ago

Hi Atef,

Before getting into the internals of your problem, i tried opening the official website of angular-gauge (https://ashish-chopra.github.io/angular-gauge) in firefox (53.0) win7 and the gauges are rendered perfectly fine. Checkout the screenshot below:

screenshot-53 0-firefox

However, i will try to reproduce the problem that you have arrived at, meanwhile just open this site in firefox at your end and confirm the results. If everything seems okay, i suspect some internal CSS of your app is overriding the default CSS of the angular-gauge.

Regards Ashish

atefBB commented 7 years ago

thanks @ashish-chopra! the gauges are rendered perfectly in the official website! but in my 'testing' website they aren't!

ashish-chopra commented 7 years ago

Hi @atefBB ,

Which version of angular-gauge library are you using in your project? If possible can you share some code like HTML showing ng-gauge wrapped in some parent divs and related CSS?

You can email me the code if it is private/protected - sendtoashishchopra@gmail.com

Regards Ashish

ashish-chopra commented 7 years ago

Hi @atefBB,

I am able to reproduce your problem on angularjs-gauge v1.1.1. It seems that it is broken in Firefox. But all the latest versions, 1.2.0 or 1.3.0 is working fine in firefox. Can you please upgrade your installation to new version.

Change the version in package.json to 1.3.0 and run npm install. To make sure you get the latest, check the package.json file in node_modules/angularjs-gauge folder.

Let me know if the problem still persists.

Thanks Ashish

ashish-chopra commented 7 years ago

In your source code of angularjs-gauge.js (or minified), whatever you are using. Change the highlighed code to as mentioned below and then let me know if you experience the same issue again?

snapshot

display:inline-block;

Make sure you reload the browser window so that fresh file is downloaded to test.

Cheers Ashish

atefBB commented 7 years ago

Thanks M. Ashish. I'm not at work now, and I'll try your recommendation and see the result soooooon !

atefBB commented 7 years ago

Peeeeeeeeeeeerfect! after adding display:inline-block; in the angularjs-gauge.js file it rendered perfectly now (in firefox & chrome also). Thanks! ddd-gauge

ashish-chopra commented 7 years ago

Great, @atefBB

I found that this bug exists in latest version also. I will release 1.3.1 with bug fix shortly.

Thanks Ashish

ashish-chopra commented 7 years ago

Hey @atefBB ,

I have just released the latest version 1.3.1 including the fix. You can update your package.json.

Cheers Ashish

atefBB commented 7 years ago

Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanks M. @ashish-chopra ! I'll do (In shaa Allah) !

ashish-chopra commented 7 years ago

Shukriya :+1: