Closed sante85 closed 5 years ago
@sante85 do you have a link to your codepen? Seems like the chart type is not being registered, make sure the file
https://pandameister.github.io/chartjs-chart-radial-gauge/docs/js/Chart.RadialGauge.umd.js
is loaded
yes, but in typescript you need specify require, and not import (es6 style)
I'll expect that i write:
import as Chart from 'chart.js' import as RadialGauge from 'chartjs-chart-radial-gauge'
instead
const Chart = require('chart.js'); require('chartjs-chart-radial-gauge')
this is old style...
It's clear?
Best regards
@sante85 Since you're probably not using RadialGauge
that import is probably getting stripped away. Try
import 'chartjs-chart-radial-gauge';
See here for a demo: https://stackblitz.com/edit/typescript-pysu6v?file=index.ts
Cheers,
i'll try
i can define max value??
The default domain for the gauge data is [0, 100]
but you can specify a different domain in the config, eg:
options: { domain: [0, 1000] }
closing as it works as expected in typescript
i have copied code pen in angular component and js in angular.json script: []
but this is the error:
Error: "radialGauge" is not a chart type.