how to display a gauge
See original GitHub issueHi all,
I’m trying to display a highcharts solidgauge and I’m getting error #17.
My typescript looks like this
import {CHART_DIRECTIVES} from "angular2-highcharts/index";
…
constructor() {
this.options = {
chart: { type: 'solidgauge' },
series: [ { name: 'test', data: [1] } ]
};
}
and my html look like that
<chart [options]="options"></chart>
so nothing fancy.
BTW running these options in a JSFiddle from the Highcharts website works.
Any idea what I’m missing or doing wrong? Thanks for the help!
Issue Analytics
- State:
- Created 7 years ago
- Comments:18 (3 by maintainers)
Top Results From Across the Web
Visualization: Gauge | Charts - Google Developers
Overview. A gauge with a dial, rendered within the browser using SVG or VML. ... In the example above, simple HTML is used...
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 >How to Create a SPEEDOMETER Chart [Gauge] in Excel
Steps to Create a SPEEDOMETER in Excel · First of all, go to Insert Tab ➜ Charts ➜ Doughnut Chart (with this you'll...
Read more >Working with gauges | Data Visualizations | Documentation
To set up states for a gauge on a dashboard or other view, select the gauge on the canvas, go to the toolbar,...
Read more >Advanced Excel - Gauge Chart - Tutorialspoint
A Gauge Chart shows the minimum, the maximum and the current value depicting how far from the maximum you are. Alternatively, you can...
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
so after a long fight I found a way to get it working. here is how (for those that would be in the same situation):
in the vendor.ts file you need to add those 2 lines
right after the line where you import highchart (or highstock in my case)
import 'highcharts/highstock';
then in my main.ts file (angular2) I needed to require those 2:
in the component ts you want to run the gauge import the CHART_DIRECTIVES as explained in the readme in the component html use it as follow (no type):
<chart [options]="options"></chart>
I’m having some position issues (I think due to the fact I’m using css flex and hightchart is in relative position) but at least it is displayed with no errors!
hope this helps someone!
@dndam thanks for pointing me into the right direction the above didn’t work with webpack.
I had to use the below:
Hope that help someone else.