Line Chart hits "X and Y data must be the same length" error

Widgets & Design

I have a series data in API call, and wrote two custom function (one for label, Y axis) and another for data(X axis).
From the console log i see both function returns the same length, for instance 3 in my case, however chart is complaining.. Any help with this will help me a lot. Thanks..

From the console logs:
Custom Function called... 8867-4, value

dart_sdk.js:37972 Result for 8867-4, value:> [78, 99, 93]

dart_sdk.js:37972 Custom Function ChartLabels called... 8867-4, label

dart_sdk.js:37972 Result for 8867-4, label:> ["17:51:13", "17:51:02", "17:50:52"]
โ•โ•โ•ก EXCEPTION CAUGHT BY WIDGETS LIBRARY โ•žโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

dart_sdk.js:37972 The following assertion was thrown building FlutterFlowLineChart(dirty):

dart_sdk.js:37972 Assertion failed:

dart_sdk.js:37972 file:///tmp/ff_service_scratch/CVjRCvY8ysuQgorBTnpI/w_monitor/lib/flutter_flow/flutter_flow_charts.dart:414:12

dart_sdk.js:37972 x.length == y.length

dart_sdk.js:37972 "X and Y data must be the same length"

dart_sdk.js:37972

dart_sdk.js:37972 The relevant error-causing widget was:

dart_sdk.js:37972 FlutterFlowLineChart

What have you tried so far?

I had one custom function returning both label and value based on an argument

then, i tried splitting these as two function to see if any issue with sequencing of calls but both hit the same error mentioned in description

Did you check FlutterFlow's Documentation for this topic?
No
1
1 reply