Open danielmcquillen opened 6 years ago
Sorry, I forgot this is the same issue as the one @portno logged: https://github.com/google/chartjs.dart/issues/22 .
I'm not sure if it's the same error:
I started to upgrade to Dart 2.0.0 (official stable release), I'm using chartjs: ^0.5.0 and in the javascript I imported the Chartjs 2.6.0 (like the example), but still I have this errors:
Error: The class 'ChartAnimationOptions' is abstract and can't be instantiated.
Error: No named parameter with the name 'duration'.
Error: The class 'ChartTooltipCallback' is abstract and can't be instantiated.
Error: No named parameter with the name 'title'.
Code:
ChartConfiguration config = new ChartConfiguration( type: 'doughnut', data: data, options: new ChartOptions( animation: new ChartAnimationOptions(duration: 0), tooltips: new ChartTooltipOptions( callbacks: new ChartTooltipCallback( title: allowInterop((tooltipItems, data) { return data.labels[tooltipItems[0].index] + ": " + "${data.datasets[tooltipItems[0].datasetIndex].data[tooltipItems[0].index]}%"; }), label: allowInterop((tooltipItem, data) { return; })))));
With the previous version of dart worked.
Yup, just ran into the same issue. Seems as if the external factory constructors for some classes are missing.
Is there any update on this?
I have the same problem. When I try to inherit an abstract class, I get the error: Uncaught TypeError: Class extends value undefined is not a constructor or null
Pull requests are welcome. I built this sample out as example of Dart-JS interop. I don't have the bandwidth to maintain it actively.
On Sat, Oct 6, 2018 at 2:38 AM Денис notifications@github.com wrote:
I have the same problem. When I try to inherit an abstract class, I get the error: Uncaught TypeError: Class extends value undefined is not a constructor or null
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/chartjs.dart/issues/26#issuecomment-427560273, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCisFYGMYBZnGTwlBGnf41a9PMuWLgks5uiHodgaJpZM4Vy-GI .
Pull requests are welcome. I built this sample out as example of Dart-JS interop. I don't have the bandwidth to maintain it actively. … On Sat, Oct 6, 2018 at 2:38 AM Денис @.**> wrote: I have the same problem. When I try to inherit an abstract class, I get the error: Uncaught TypeError: Class extends value undefined is not a constructor or null* — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#26 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCisFYGMYBZnGTwlBGnf41a9PMuWLgks5uiHodgaJpZM4Vy-GI .
Thank you! I have already added the factories I need
ChartAnimationOptions
is still missing its options. I'd add it but I'm not sure how to handle the callbacks. :-/
I was using chartjs successfully in my AngularDart project up until this morning when I started upgrading to the 2.0.0 official public release (I was using the 2.0.65 dev release).
The compiler now complains about code like this
ChartXAxe xAxe = new ChartXAxe();
with an error of:
error: Abstract classes can't be created with a 'new' expression.
Am I using the library wrong when I try to instantiate things like ChartXAxe when building up my chart in the component .dart class?