Use of Gauge
See original GitHub issueI have a problem when instantiating a repeated instances of the gauge, using something like that in the ID field is not working:
<canvas canvas-gauge id="gauge-{{$index}}" .......></canvas>
Issue Analytics
- State:
- Created 7 years ago
- Comments:16 (9 by maintainers)
Top Results From Across the Web
gauge | instrument - Britannica
gauge, also spelled gage, in manufacturing and engineering, a device used to determine, either directly or indirectly, whether a dimension is larger or ......
Read more >What is the use of gauges? - Quora
Gauges are used for measuring magnitude or amount, such as the thickness of wire, the dimensions of a machined part, the amount of...
Read more >What is A Gauge Chart? Definition, Best Practices & Examples
A gauge chart, also known as dial or speedometer chart, is a data visualization type used to display a single value of data...
Read more >Pressure Gauge: What Is It? How Is It Used? Types Of
It can measure pressure as high as 40 bar to -1 bar of gas, steam, and fluids. The main use of a diaphragm...
Read more >Gauge Definition & Meaning - Merriam-Webster
The verb gauge, which refers to measuring or estimating, also has a variant gage. This variant appears to show up primarily in informal...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
With the latest release, after investigations I can tell that you no longer need to use specific wrapper to integrate gauges into angular 1 or 2 applications, as far as gauges themselves are fully-functional web components since version 2. There was several problems which causes them crash in some circumstances (for example, when calling on angular’s digest cycles). But with version 2.0.4 all that problems are fixed.
So you may simply refer gauges code from your html or by bundling their code into your script bundle within your build system.
Than you may simply use it in html.
Use with angular 1.x
For example, this worked for me in angular1.5 app well:
where view1.html is something like:
and gauges are simply included in the main html page, like:
You may refer gauges code locally, of course or bundle them together with your code as I said before. Async loading is also allowed as well.
Use with Angular 2
Just install gauges via npm:
And typings.
typings install --save --source=dt --global canvas-gauges
npm install @types/canvas-gauges
Than imagine, for example, such a simple
app.component.ts
Hope, this helps.
Good to know that @Mikhus! I have some problems when try to integrate the 2.0 version of the Gauge library into Angular 1.x, just as I do before with the 1.x branch of the Gauge library. But probably you have reason and we no need to add any wrapper above the Gauge library to be used into Angular. I want to try it too when possible. Thanks for your efforts @Mikhus!