hawkgs / ng2-gauge Goto Github PK
View Code? Open in Web Editor NEW⏲ SVG gauge component for Angular
License: MIT License
⏲ SVG gauge component for Angular
License: MIT License
I was using the component, but in my situation the maximum value could not be static.
When you updated the maximum value, the chart did not render again.
I modified the component code and got it fixed, but I'm sure I will not be the only one facing this problem. I tried to commit,
but apparently you have not left public to make modifications.
The problem is in the file: gauge.component.ts, at line 49.
was like this:
@input()
set input(val: number) {
this._input = val;
this._updateArrowPos(val);
}
modified to:
@input()
set input(val: number) {
this._input = val;
this.scaleLines = [];
this.scaleValues = [];
this._updateArrowPos(val);
this._calculateSectors();
this.scaleFactor = this.factor || this._determineScaleFactor();
this._createScale();
}
I ask you to leave the code open so that I and other people can contribute to your work.
i want set max 2 . and for sectors separate 0.4 numbers. but not show labels .
Hello,
This is not a issue, but I'm not able to change the color of guage.
I try to copy and modify the code on that page on mycomponent.component.css
and also con styles.css
What can I do?
thanks
I got this error when building in production mode
[19:43:52] typescript error ng2-gauge/ng2-gauge.ts(6,2): Error during template compile of 'GaugeModule' Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'NgModule' 'NgModule' calls 'ɵmakeDecorator'.
Unable to set sectors dynamically
The gauge prints in the console The maximal value is not set.
error on load even though max
is set.
Hi Hawkgs,
I am trying to use this component and find it very attractfull but 1 issue I am finding is display does not work properly with negative values.
Let me know if there are any other alternatives.
Can you confirm?
Thanks,
Manoj
I'm getting the following error when I run yarn build
command:
ERROR in ng2-gauge/ng2-gauge.ts(6,2): Error during template compile of 'GaugeModule'
Function calls are not supported in decorators but 'ɵmakeDecorator' was called in 'NgModule'
'NgModule' calls 'ɵmakeDecorator'.
My package configuration:
"dependencies": {
"@angular/animations": "6.0.4",
"@angular/common": "6.0.4",
"@angular/compiler": "6.0.4",
"@angular/core": "6.0.4",
"@angular/forms": "6.0.4",
"@angular/platform-browser": "6.0.4",
"@angular/platform-browser-dynamic": "6.0.4",
"@angular/router": "6.0.4",
"core-js": "2.5.7",
"font-awesome": "4.7.0",
"jquery": "3.3.1",
"moment": "2.21.0",
"moment-locales-webpack-plugin": "^1.0.7",
"ng-circle-progress": "^1.2.0",
"ng-jhipster": "0.5.3",
"ng-recaptcha": "^3.0.5",
"ng2-gauge": "^1.1.7",
"ng2-google-charts": "^3.4.0",
"ng2-semantic-ui": "0.9.7",
"ng2-webstorage": "1.8.0",
"ngx-cookie": "2.0.1",
"ngx-infinite-scroll": "0.5.1",
"ngx-pagination": "^3.1.0",
"ngx-webstorage": "2.0.1",
"reflect-metadata": "0.1.12",
"rxjs": "6.2.0",
"rxjs-compat": "6.1.0",
"sockjs-client": "1.1.4",
"swagger-ui": "2.2.10",
"tether": "1.4.0",
"tslib": "1.9.0",
"webdriver-manager": "^12.0.6",
"webstomp-client": "1.2.0",
"zone.js": "0.8.26"
},
... so that the end-user can use it, if he/she desires so. GaugeConfig
as well.
How it is possible to create a view with multiple gauges like on the demo image of the readme?
Regards
Sometimes the last scale value is not displayed.
How to reproduce?:
For instance: max
should be 25000
I have to change arrow css to:
.angular-gauge rect.arrow {
transform-origin: 50% 50%;
}
It was:
transform-origin: 50% 100%;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.