-
Notifications
You must be signed in to change notification settings - Fork 121
Solidgauge chart #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The |
How do you do that in Angular using your library? |
import * as Highcharts from 'highcharts'; |
The code you posted loads only Highcharts. For solid gauge highcharts-more is required. You could load it before the solid-gauge module like:
|
Thanks - will try that out. |
Hi there
I have heat maps and scatter charts working fine using highcharts-angular but i can't get a solidgauge example working.
Error:
RiskWidgetComponent.html:10 ERROR TypeError: c.init is not a function at a.Chart.initSeries (highcharts.js:237) at highcharts.js:261 at Array.forEach (<anonymous>) at a.each (highcharts.js:27) at a.Chart.firstRender (highcharts.js:261) at a.Chart.init (highcharts.js:237) at a.Chart.getArgs (highcharts.js:236) at new a.Chart (highcharts.js:235) at Object.a.chart (highcharts.js:235) at HighchartsChartComponent.updateOrCreateChart (highcharts-chart.component.ts:33)
I have include HighchartsChartComponent directly in my source code to avoid other issues.
I have a custom helper class with this code:
`import * as Highcharts from 'highcharts';
import * as HC_exporting from 'highcharts/modules/exporting';
HC_exporting(Highcharts);
import * as HC_solidgauge from 'highcharts/modules/solid-gauge';
HC_solidgauge(Highcharts);
...
export class HighchartsGaugeComponent {
theChart : any;
Highcharts = Highcharts;
chartConstructor = 'chart';
chartOptions = {
};
// Callback function after the chart is create
chartCallback = (chart) => {
if (this.theChart == null) {
this.theChart = chart;
console.log('Set chart: '+this.theChart);
}
};
// Used to indicate when the chart UI should be updated
updateFlag = false;
...
`
Could you please point out what is incorrect with my code?
Thanks very much.
The text was updated successfully, but these errors were encountered: