TypeError Charts

UI Components for Angular
Post Reply
flu
Posts: 3
Joined: 18 May 2016, 14:05

18 May 2016, 14:23

Hello,

I'm trying to include a pie/donoughtchart into my app but I am getting the following error:

Code: Select all

browser_adapter.ts:78 TypeError: (intermediate value).Pie is not a function
    at PieChart.initChart (piechart.ts:156)
    at PieChart.ngAfterViewInit (piechart.ts:122)
    at DebugAppView._View_IndexComponent0.detectChangesInternal (IndexComponent.template.js:254)
    at DebugAppView.AppView.detectChanges (view.ts:243)
    at DebugAppView.detectChanges (view.ts:345)
    at DebugAppView.AppView.detectViewChildrenChanges (view.ts:267)
    at DebugAppView._View_IndexComponent_Host0.detectChangesInternal (IndexComponent_Host.template.js:51)
    at DebugAppView.AppView.detectChanges (view.ts:243)
    at DebugAppView.detectChanges (view.ts:345)
    at DebugAppView.AppView.detectContentChildrenChanges (view.ts:261)
I installed chart.js via npm and included it in my index.html. Within my component I imported the charts like this:

Code: Select all

import {PieChart} from "primeng/primeng";
Versions:
angular 2.0.0-rc.1
primeng 1.0.0-beta.6

Any ideas?
Thanks in advance! :)

Regards

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

19 May 2016, 00:07

Which version of charts.js do you have?

flu
Posts: 3
Joined: 18 May 2016, 14:05

19 May 2016, 10:33

I'm using version 2.1.3.

flu
Posts: 3
Joined: 18 May 2016, 14:05

24 May 2016, 13:14

Going back to 1.0.2 fixes the problem :)

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

24 May 2016, 14:40

We'll update to latest charts.js in beta8 next week.

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 12 guests