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

Title inside gauge #33

Closed federico-rimembrana closed 7 years ago

federico-rimembrana commented 7 years ago

I would like to propose a new little feature. The possibility of having a text/title also in the upper part inside the gauge. I'm new to github so don't hesitate to contact me in case you need details or clarifications.

angularjs-gauge.zip

ashish-chopra commented 7 years ago

Well, Thanks for the feature you proposed. I initially thought of adding title into the Gauge, then i removed it from the feature list because of following reasons:

  1. It already has a label inside the gauge below the value text. So adding a title makes it redundant.

  2. As per the current code design of the Gauge, user cannot modify any CSS related to any text displayed inside gauge, so by adding title, it becomes fixed with a style that will be shipped within code. For eg, the style that added in this code:

snapshot

Now user can only change text. I did not want my users to be bound to use one style of title only.

  1. Also, there are many use cases where you place Gauge inside a panel and the title of the gauge goes to the Panel header etc also you want to remove title at any responsive breakpoints when the browser window is resized or opened in small screens.

So keeping these things in mind i removed title from gauge feature list.

Since you are new to GitHub, then i must tell you, you followed the right process and convention of code for Gauge, but somehow you added the code in the wrong branch gh-pages. This branch is standard documentation branch of GitHub projects, not used to host actual project code.

And, you're most welcome to send in more pull requests, but make sure, you discuss the feature you would like to work on (in the issues section), so that it does not clash with any under-development or rejected feature so far. Also checkout the project board at https://github.com/ashish-chopra/angular-gauge/projects/1

Keep Contributing! Ashish