[BUG-2363] XY Chart - Component Error since 8.1.4

Anybody else have issue with XY chart since 8.1.4

I don’t know what the issue is exactly, but when I have an XY chart with a binding with a script for the moment, the chart sometimes display “Component Error” with the detail “Cannot read property ‘dataFields’ of undefined”. Most of the time, F5 fix the issue, but it’s annoying
image

I get this error also.
didn’t find the reason yet.

I use SQL query to get a dataset that is being updated.

if I use a different query (same data table but for an older data) it works fine

I have been having the exact same error. I have a ticket in with IA, but so far they haven’t figured out what is causing this. I’ll update this post when I find out more.

With the exact same data, sometimes it displays fine, sometimes it throws the component error

10:19:33.519 [Browser Thread: 59174] ERROR Perspective.Designer.Workspace - level: LEVEL_ERROR
message: “ui.ErrorBoundary: Component error caught in error boundary: undefined”
line_number: 12
source: “http://pctx312aigd02/res/perspective/js/PerspectiveClient.cf97d53d32860533ea6f.js

Full error is…

react-dom.production.min-16.11.0.js:112 TypeError: Cannot read property ‘dataFields’ of undefined
at f.configureSeriesXAxis (PerspectiveAmCharts.528036012bc6470a4b58.js:16)
at PerspectiveAmCharts.528036012bc6470a4b58.js:16
at Array.forEach ()
at f.updateAxis (PerspectiveAmCharts.528036012bc6470a4b58.js:16)
at f.updateChart (PerspectiveAmCharts.528036012bc6470a4b58.js:16)
at f.componentDidUpdate (PerspectiveAmCharts.528036012bc6470a4b58.js:16)
at Pj (react-dom.production.min-16.11.0.js:158)
at unstable_runWithPriority (react.production.min-16.11.0.js:25)
at pb (react-dom.production.min-16.11.0.js:59)
at Ma (react-dom.production.min-16.11.0.js:151)
Re @ react-dom.production.min-16.11.0.js:112
Ph.f.componentDidCatch.c.callback @ react-dom.production.min-16.11.0.js:124
bh @ react-dom.production.min-16.11.0.js:68
ah @ react-dom.production.min-16.11.0.js:67
Pj @ react-dom.production.min-16.11.0.js:158
unstable_runWithPriority @ react.production.min-16.11.0.js:25
pb @ react-dom.production.min-16.11.0.js:59
Ma @ react-dom.production.min-16.11.0.js:151
We @ react-dom.production.min-16.11.0.js:132
(anonymous) @ react-dom.production.min-16.11.0.js:60
unstable_runWithPriority @ react.production.min-16.11.0.js:25
pb @ react-dom.production.min-16.11.0.js:59
Rg @ react-dom.production.min-16.11.0.js:60
ca @ react-dom.production.min-16.11.0.js:60
Ja @ react-dom.production.min-16.11.0.js:226
enqueueSetState @ react-dom.production.min-16.11.0.js:216
m.setState @ react.production.min-16.11.0.js:21
onPropPropsChange @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
H.notifyListeners @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
setTimeout (async)
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
update @ PerspectiveClient.cf97d53d32860533ea6f.js:12
assignOwnUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
applyPropertyUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
applyPropertyUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
processMessage @ PerspectiveClient.cf97d53d32860533ea6f.js:12
PerspectiveClient.cf97d53d32860533ea6f.js:12 ui.ErrorBoundary: Component error caught in error boundary: undefined
p.cerror @ PerspectiveClient.cf97d53d32860533ea6f.js:12
p.sendLogItemsConsole @ PerspectiveClient.cf97d53d32860533ea6f.js:12
n.sendBatch @ PerspectiveClient.cf97d53d32860533ea6f.js:12
n.sendBatchIfComplete @ PerspectiveClient.cf97d53d32860533ea6f.js:12
n.log @ PerspectiveClient.cf97d53d32860533ea6f.js:12
e.log @ PerspectiveClient.cf97d53d32860533ea6f.js:12
e.error @ PerspectiveClient.cf97d53d32860533ea6f.js:12
componentDidCatch @ PerspectiveClient.cf97d53d32860533ea6f.js:17
Ph.f.componentDidCatch.c.callback @ react-dom.production.min-16.11.0.js:124
bh @ react-dom.production.min-16.11.0.js:68
ah @ react-dom.production.min-16.11.0.js:67
Pj @ react-dom.production.min-16.11.0.js:158
unstable_runWithPriority @ react.production.min-16.11.0.js:25
pb @ react-dom.production.min-16.11.0.js:59
Ma @ react-dom.production.min-16.11.0.js:151
We @ react-dom.production.min-16.11.0.js:132
(anonymous) @ react-dom.production.min-16.11.0.js:60
unstable_runWithPriority @ react.production.min-16.11.0.js:25
pb @ react-dom.production.min-16.11.0.js:59
Rg @ react-dom.production.min-16.11.0.js:60
ca @ react-dom.production.min-16.11.0.js:60
Ja @ react-dom.production.min-16.11.0.js:226
enqueueSetState @ react-dom.production.min-16.11.0.js:216
m.setState @ react.production.min-16.11.0.js:21
onPropPropsChange @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
H.notifyListeners @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
setTimeout (async)
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
update @ PerspectiveClient.cf97d53d32860533ea6f.js:12
assignOwnUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
dispatchUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
applyPropertyUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
(anonymous) @ PerspectiveClient.cf97d53d32860533ea6f.js:12
applyPropertyUpdates @ PerspectiveClient.cf97d53d32860533ea6f.js:12
processMessage @ PerspectiveClient.cf97d53d32860533ea6f.js:12

I narrowed down the problem and think I have a working solution. The error is being generated by something inside the series property settings. I changed my script to delete all series entries except the first one (so I don’t get a ‘No series configured’ error). I then build the rest of series json after I have updated all the datasources, and this seems to get rid of the ‘dataFields’ undefined’ error.

barChart.props.series = self.buildBarChartCountSeries() #Build the first datasource series
barChart.props.dataSources.distribution_data = popDataList
barChart.props.dataSources.count_data = barDataList		
barChart.props.dataSources.lcl_data = lcl_data	
barChart.props.dataSources.ucl_data = ucl_data
barChart.props.dataSources.mean_data = mean_data
barChart.props.dataSources.tgt_data = tgt_data
barChart.props.dataSources.sigma_1n_data = sigma_1n_data
barChart.props.dataSources.sigma_2n_data = sigma_2n_data
barChart.props.dataSources.sigma_3n_data = sigma_3n_data
barChart.props.dataSources.sigma_1p_data = sigma_1p_data
barChart.props.dataSources.sigma_2p_data = sigma_2p_data
barChart.props.dataSources.sigma_3p_data = sigma_3p_data

barChart.props.xAxes[0].value.range.max = maxRange
barChart.props.xAxes[0].value.range.min = minRange	
barChart.props.xAxes[1].value.range.max = maxRange
barChart.props.xAxes[1].value.range.min = minRange	

barChart.props.series = barChart.props.series + self.buildBarChartSeries() #Build other datasource series

It seems like a kluge, but has got rid of the dataFields error I was seeing before.

I tried to work a bit around this, but I only have 1 serie, and it is static (no binding)
I have a binding that modify the xAxes value range, and the datasource

So I created a custom value, and used a binding with a transform script that replicate @jasoncoope behavior for my case. It dit improve, but what I found is, apparently, if the initial dataset contains “null” values, even in column that are not displayed, and that dataset is later updated with a dataset that does not contains “null” value, as the chart is crashed, it won’t recover

I have an open ticket in with IA for this. Ticket # is #13162. I’ll add your findings to the ticket.

Any update on this?

I’ve found that “pushing” the data to the dataSources property of the XY Chart seems to help.

That is, instead of putting a binding on the dataSources property that “pulls” the data in, I created a custom property that has a transform script to create the data and data structure, and then as a last step of the script does something like:

self.getChild(“XYChart”).props.dataSources.myData = myData

It’s a work around for sure, but seems to help with the spurious component errors.

HTH.
-Shane

2 Likes

We just updated our dev server from 8.1.1 to 8.1.7 and are now having the same issue

2 Likes

any updates on this issue?

1 Like

IA said 4 months ago that they were working on a bug fix for this.

‘I narrowed down the problem and think I have a working solution. The error is being generated by something inside the series property settings. I changed my script to delete all series entries except the first one (so I don’t get a ‘No series configured’ error). I then build the rest of series json after I have updated all the datasources, and this seems to get rid of the ‘dataFields’ undefined’ error.’

barChart.props.series = self.buildBarChartCountSeries()
barChart.props.dataSources.distribution_data = popDataList
barChart.props.dataSources.count_data = barDataList
barChart.props.dataSources.lcl_data = lcl_data
barChart.props.dataSources.ucl_data = ucl_data
barChart.props.dataSources.mean_data = mean_data
barChart.props.dataSources.tgt_data = tgt_data
barChart.props.dataSources.sigma_1n_data = sigma_1n_data
barChart.props.dataSources.sigma_2n_data = sigma_2n_data
barChart.props.dataSources.sigma_3n_data = sigma_3n_data
barChart.props.dataSources.sigma_1p_data = sigma_1p_data
barChart.props.dataSources.sigma_2p_data = sigma_2p_data
barChart.props.dataSources.sigma_3p_data = sigma_3p_data

barChart.props.xAxes[0].value.range.max = maxRange
barChart.props.xAxes[0].value.range.min = minRange
barChart.props.xAxes[1].value.range.max = maxRange
barChart.props.xAxes[1].value.range.min = minRange

barChart.props.series = barChart.props.series + self.buildBarChartSeries()


My assumption is that something in the series that was set last time data was displayed in the chart, causes an error to be thrown as one of the datasources or other properties gets added. In this script I am getting rid of all series except the main one.

8.1.9 Same issue still: LEVEL_ERROR
message: “components.XYChart: No series configured.”
line_number: 12

Any updates on Ticket #13162?