[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?

No update. I’ve just requested an update on when this will be fixed.

Here’s an update I received today…

I tracked down the bug ticket related to your previous ticket and it is still within our development team’s pipeline. It is not ready for release and we can’t provide an estimate for when it would be released.

I will make a note for this bug ticket that we have many customers and community members in the forums that are hoping for a resolution to this bug to come quickly.
Myself or another support representative will reach out to you once we are aware of an official bug fix.

“XY Chart renders as an error that states “Component Error” when building its series data”

This issue has been marked as closed and is slated for release in Ignition Version 8.1.13.

2 Likes

thank goodness

I am on 8.1.0

Just started to get this error on a time series chart.

I changed the name of a column just before I started to get the error.
I think I changed the column name, query name, applied asc and desc to the order by section, changed my order by clause
I will try remaking it.

Did you just update or did you find a solution?
edit
I reset my query, restarted designer, “fixed it”
edit
broke it again, I think my error is tied to my order by clause
I also have to restart my designer. So now my time series charts have one query, while my tables I display use another query.

Although this post mentions XY Charts, I would add that I see the same issue with Time Series Chart.

This helped a bit:

"Pushing" data that way doesn't give a component error but it still doesn't work.

I'm using version 8.1.15

Just came across this issue myself as we are still working in 8.1.7, embedding it and passing the parameters that way seemed to do the trick for me, obviously the easier workaround is updating but if you’re stuck in a specific version like me this will hopefully help.