(onDataSelect) with p-chart not working

UI Components for Angular
Post Reply
FDLJ33
Posts: 6
Joined: 08 Apr 2020, 09:48
Location: FRANCE

08 Oct 2020, 23:14

I'am trying to implement (onDataSelect) for p-chart like showing in the documentation (https://www.primefaces.org/primeng/showcase/#/chart)
The graph is working perfect, but nothing append when I click in my chart :shock:

HTML:
<p-chart #chart type="line" [data]="data" [options]="chartOptions" (onDataSelect)="selectData($event)"></p-chart>

TS:
selectData(event) {
console.log('display',event)
}

Thanks for your help, maybe with a complete example
Kind Regards
François

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

12 Oct 2020, 21:40

What is your chart.js version?

FDLJ33
Posts: 6
Joined: 08 Apr 2020, 09:48
Location: FRANCE

13 Oct 2020, 14:13

Hi

"chart.js": {
"version": "2.9.3",
Kind Regards
François

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

13 Oct 2020, 23:15

Please try with 2.7.x while we check out the 2.9.x compatibility.

FDLJ33
Posts: 6
Joined: 08 Apr 2020, 09:48
Location: FRANCE

19 Oct 2020, 10:11

hi,


It works perfectly with 2.7. and also with 2.9 .....
Sorry, it was a misunderstanding on the triggering of the event. My graph is with areas. It is necessary to click on the upper line of the area.

The point is therefore closed. Thank you
Kind Regards
François

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests