Home > database >  Highchart tooltip formatter function not able to get x value (this.x)?
Highchart tooltip formatter function not able to get x value (this.x)?

Time:09-29

I was try to using formatter function with new angular 12 i was getting error Property 'value' does not exist on type 'ChartService'.ts(2339) how to fix that ? enter image description here

CodePudding user response:

can you please explain more the scope of value

if value set from service or api response you can try this['value'] and test in runtime

CodePudding user response:

You have missing types for formatter callback function, for test I set type at any and value is show without problems.

In our wrapper documentation you will find an example that explained how to add missing type (property XXX does not exist on type YYY to add missing types).

Demo:

https://stackblitz.com/edit/highcharts-angular-basic-line-4sokbv

Documentation:

https://github.com/highcharts/highcharts-angular#online-examples

  • Related