Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numberFormat was called on null #136

Closed
leidig54 opened this issue Jun 9, 2020 · 1 comment
Closed

numberFormat was called on null #136

leidig54 opened this issue Jun 9, 2020 · 1 comment

Comments

@leidig54
Copy link

leidig54 commented Jun 9, 2020

Hello,

I'm getting this error

Restarted application in 1,659ms.
flutter: ══╡ EXCEPTION CAUGHT BY RENDERING LIBRARY ╞═════════════════════════════════════════════════════════
flutter: The following NoSuchMethodError was thrown during paint():
flutter: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Receiver: Instance of 'CategoryAxis'
flutter: Tried calling: numberFormat
flutter:
flutter: The relevant error-causing widget was:
flutter: CustomPaint
�[38;5;248mflutter:�[39;49m
flutter:
flutter: When the exception was thrown, this was the stack:
�[38;5;244mflutter: #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)�[39;49m
�[38;5;248mflutter: #1 _getLabelText�[39;49m
�[38;5;248mflutter: #2 _calculateDataLabelPosition�[39;49m
�[38;5;248mflutter: #3 DataLabelSettings.renderDataLabel�[39;49m
�[38;5;248mflutter: #4 _DataLabelPainter.paint�[39;49m
�[38;5;244mflutter: #5 RenderCustomPaint._paintWithPainter�[39;49m
�[38;5;244mflutter: #6 RenderCustomPaint.paint�[39;49m
�[38;5;244mflutter: #7 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #8 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #9 RenderBoxContainerDefaultsMixin.defaultPaint�[39;49m
�[38;5;244mflutter: #10 RenderStack.paintStack�[39;49m
�[38;5;244mflutter: #11 RenderStack.paint�[39;49m
�[38;5;244mflutter: #12 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #13 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #14 RenderProxyBoxMixin.paint�[39;49m
�[38;5;244mflutter: #15 RenderDecoratedBox.paint�[39;49m
�[38;5;244mflutter: #16 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #17 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #18 RenderProxyBoxMixin.paint�[39;49m
�[38;5;244mflutter: #19 RenderDecoratedBox.paint�[39;49m
�[38;5;244mflutter: #20 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #21 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #22 _RenderLayoutBuilder.paint�[39;49m
�[38;5;244mflutter: #23 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #24 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #25 RenderProxyBoxMixin.paint�[39;49m
�[38;5;244mflutter: #26 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #27 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #28 _RenderLayoutBuilder.paint�[39;49m
�[38;5;244mflutter: #29 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #30 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #31 RenderBoxContainerDefaultsMixin.defaultPaint�[39;49m
�[38;5;244mflutter: #32 RenderFlex.paint�[39;49m
�[38;5;244mflutter: #33 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #34 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #35 RenderShiftedBox.paint�[39;49m
�[38;5;244mflutter: #36 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #37 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #38 RenderShiftedBox.paint�[39;49m
�[38;5;244mflutter: #39 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #40 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #41 RenderProxyBoxMixin.paint�[39;49m
�[38;5;244mflutter: #42 RenderDecoratedBox.paint�[39;49m
�[38;5;244mflutter: #43 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #44 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #45 RenderShiftedBox.paint�[39;49m
�[38;5;248mflutter: #46 _ChartContainerBox.paint�[39;49m
�[38;5;244mflutter: #47 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #48 PaintingContext.paintChild�[39;49m
�[38;5;244mflutter: #49 RenderProxyBoxMixin.paint�[39;49m
�[38;5;244mflutter: #50 RenderObject._paintWithContext�[39;49m
�[38;5;244mflutter: #51 PaintingContext._repaintCompositedChild�[39;49m
�[38;5;244mflutter: #52 PaintingContext.repaintCompositedChild�[39;49m
�[38;5;244mflutter: #53 PipelineOwner.flushPaint�[39;49m
�[38;5;244mflutter: #54 RendererBinding.drawFrame�[39;49m
�[38;5;244mflutter: #55 WidgetsBinding.drawFrame�[39;49m
�[38;5;244mflutter: #56 RendererBinding._handlePersistentFrameCallback�[39;49m
�[38;5;244mflutter: #57 SchedulerBinding._invokeFrameCallback�[39;49m
�[38;5;244mflutter: #58 SchedulerBinding.handleDrawFrame�[39;49m
�[38;5;244mflutter: #59 SchedulerBinding._handleDrawFrame�[39;49m
�[38;5;244mflutter: #63 _invoke (dart:ui/hooks.dart:261:10)�[39;49m
�[38;5;244mflutter: #64 _drawFrame (dart:ui/hooks.dart:219:3)�[39;49m
flutter: (elided 3 frames from dart:async)
flutter:
flutter: The following RenderObject was being processed when the exception was fired: RenderCustomPaint#40211 relayoutBoundary=up1:
flutter: creator: CustomPaint ← Container ← _DataLabelRenderer ← Stack ← Container ← DecoratedBox ← Container
flutter: ← DecoratedBox ← Container ← LayoutBuilder ← _ContainerArea ← ConstrainedBox ← ⋯
flutter: parentData: not positioned; offset=Offset(0.0, 0.0) (can use size)
flutter: constraints: BoxConstraints(0.0<=w<=307.0, 0.0<=h<=172.0)
flutter: size: Size(0.0, 0.0)
flutter: This RenderObject has no descendants.
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.
flutter: Another exception was thrown: NoSuchMethodError: Class 'CategoryAxis' has no instance getter 'numberFormat'.

am I doing something wrong?

Many thanks,

G

@SriramKiranSenthilkumar
Copy link
Contributor

Hi @leidig54 ,

Greetings from Syncfusion. We have analyzed your scenario from the provided exception texts and we found that you are trying to use number format in the category axis. As the category axis does not support number formats, the NoSuchMethodError exception is thrown as there is no getter provided in the category axis class for the number format. The number format can be used only in the numeric axis. For further reference on the axis types and their properties, please refer the user guide below,
https://help.syncfusion.com/flutter/cartesian-charts/axis-types
If you have further concerns, please revert us.

Regards,
Sriram Kiran.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants