Search code examples
angularhighchartsangular2-highcharts

Error replicating Highcharts Dashboard demo on Angular 16


I'm trying to replicate this demo using Angular 16, and get this error:

Error: node_modules/@highcharts/dashboards/es-modules/Dashboards/Plugins/HighchartsPlugin.d.ts:9:9

  • error TS2717: Subsequent property declarations must have the same type. Property 'KPI' must be of type 'typeof KPIComponent', but here has type 'typeof KPIComponent'.

9 KPI: typeof KPIComponent; ~~~

node_modules/@highcharts/dashboards/es-modules/Dashboards/Components/KPIComponent.d.ts:264:9 264 KPI: typeof KPIComponent; ~~~ 'KPI' was also declared here.

Any ideas how to fix this? I installed the latest highcharts dashboard version 1.2.0

UPDATE

This is how I see the dashboard now:

enter image description here


Solution

  • This error has already been fixed, has been merged and is on the master: https://github.com/highcharts/highcharts/pull/20323

    As a workaround you can import this version directly:

    import Dashboards from '@highcharts/dashboards/es-modules/masters/dashboards.src'