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

Selection 当图表未加载数据时 报错 #128

Closed
lwp001 opened this issue Jul 13, 2022 · 1 comment
Closed

Selection 当图表未加载数据时 报错 #128

lwp001 opened this issue Jul 13, 2022 · 1 comment

Comments

@lwp001
Copy link

lwp001 commented Jul 13, 2022

在图表设置 hover 显示 tooltip时 当图表数据为空时 报错:

[ERROR:flutter/shell/common/shell.cc(93)] Dart Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: -1, stack trace: #0 List.[] (dart:core-patch/growable_array.dart:264:36)
#1 PointSelector.select (package:graphic/src/interaction/selection/point.dart:135:27)
#2 SelectOp.evaluate (package:graphic/src/interaction/selection/selection.dart:336:40)
#3 Operator.run (package:graphic/src/dataflow/operator.dart:95:29)
#4 Dataflow.evaluate (package:graphic/src/dataflow/dataflow.dart:94:27)
#5 View.evaluate (package:graphic/src/chart/view.dart:78:17)
#6 Dataflow.run (package:graphic/src/dataflow/dataflow.dart:122:16)
#7 Dataflow.bindChannel. (package:graphic/src/dataflow/dataflow.dart:154:7)
#8 _rootRunUnary (dart:async/zone.dart:1442:13)
#9 _RootZone.runUnaryGuarded (dart:async/zone.dart:1621:7)
#10 _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#11 _DelayedData.perform (dart:async/stream_impl.dart:591:14)
#12 _StreamImplEvents.handleNext (dart:async/stream_impl.dart:706:11)
#13 _PendingEvents.schedule. (dart:async/stream_impl.dart:663:7)
#14 _rootRun (dart:async/zone.dart:1418:47)
#15 _CustomZone.run (dart:async/zone.dart:1328:19)
#16 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
#17 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
#18 _rootRun (dart:async/zone.dart:1426:13)
#19 _CustomZone.run (dart:async/zone.dart:1328:19)
#20 _CustomZone.runGuarded (dart:async/zone.dart:1236:7)
#21 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:1276:23)
#22 _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#23 _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)

是否可以在数据为空时 不触发 selections 动作

@entronad entronad added enhancement New feature or request and removed enhancement New feature or request labels Apr 10, 2023
@entronad
Copy link
Owner

不要让图表的数据为空,会发生很多未知问题

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

2 participants