This is reproducible on yesterday’s daily build. I don’t have historic data on a system with historic data set up so I can’t test it against today’s build but I don’t see any patch notes addressing this issue. I can’t update the app on the machine I am experiencing this on because it’s a live demo not on my machine.
I can provide project files if needed.
First I’ll explain my setup. I made a view that displays a header bar, an XY Chart and a drop down control. The drop down control has the following selections.
I set my XY Chart to display historic data points in realtime and pointed the time range to the value of my dropdown as follows:
The expression in the box is as follows where ddDateRange is the name of my dropdown list:
The dropdown list is inside a coordinate container that lives below the XYChart.
At runtime the chart looks like this:
I can select things from the drop down and the results of the chart change accordingly. Sometimes it just blows up and the chart is replaced with an error message. That looks like this.
It does not blow up consistently but once it blows up it doesn’t recover till I reload. I suspect it’s a race condition where sometimes the right execution path wins the race and other times the wrong side wins and the code tries to do stuff before the required data is in place and it crashes out.
Sorry for the delay. You’re correct in that it is a bit of a race condition. We can likely preform more detailed checks on our end to mitigate this issue. I’m creating a ticket to look into this issue.
I’m using an SQL query to populate data for my XY table while taking in range parameters. The range parameters are coming in from DateTime Input components. The process works for expanding the range out but when contracted, the XY table throws “Cannot set property ‘segment’ of undefined”. In the designer, the dataset is being populated correctly (increasing and decreasing). I also notice that the chart will expand in size but will not retract, even when no fault is thrown.
Is this the incorrect process for what I am wanting to do or is there a parameter I’m not setting that is causing this issue. I did not find any error logs on the server either.
This is a known issue that they’re actively working on. A lot of work is currently being done on charting.
I thought this one was fixed but I just wanted to make sure you’re aware that it is still happening.
My configuration is the same as shown in this post so I thought it would be optimal to bump this post rather than try to describe it again. The bug is confirmed to be reproducible in RC1.
Is there any news for this bug ? I have the same kind of problem, giving me the error ‘cannot read property ‘getTime’ of undefined’… I use a XYChart populated with a SQL querry binding, with a parameters that can change with the user selection from a dropdown.
I am using version 8.0.12
I haven’t used the XY chart in a while. I usually use the timeseries chart because the customer I’ve been doing most of my perspective work for prefers it.
I think this bug was fixed but I think you’re experiencing another problem. I think you’re having a timing issue causing a property called “getTime” to try to render the chart before all of the properties are in place. It’s a bit of a guess.
Try setting up custom properties on your main form. Bind those to your date pickers and other property selections. Make another custom property that is bound to those properties and generates your data source. Then you can poke around with selecting stuff and seeing if it’s throwing exceptions.
Sometimes you can have a problem where a date picker returns a date in epoc time and other times as a date string. If that is your problem you can put a try/except block on it to ensure it’s coming into your function as epoc and not causing things to blow up.
I could be wrong. I have had a lot of problems that stem from this kind of issue so I’m basically telling you how I sort that out.
Thanks for the responce ! I already tried pretty much to create custom properties with my date pickers and dropdown. I also created a custom property for my data that I feed manually via scrypt to the XYChart data. Everything seems okay on my computer, as the connexion is fast enough to ensure loading properly the data before the UI is loaded. However, as my applicationis a dashboard loading on a Raspberry Pi to display certain graphs, it seems that the PI isn’t fast enough and I get the error on the first loading. Whenever I change a property after, everything is good.
Like you said, I think it is a timing issue with the rendering.
Just to make sure I’m communicating well.
I’m saying to set up a custom property on your form that stores your dataset. Bind your chart to that. Then when the dates change and populate your dataset it will trigger a change in the chart.
You can also try calling a refreshBinding at a time when you know stuff is loaded. I would recommend calling it from a button at first so you can hit it after your form is loaded. I’m just trying to help you flesh it out.