I'm using the <SparklineComponent /> in a dashboard alongside a <ChartComponent />. The page loads as it's supposed to. But, when I resize it, the `<SparklineComponent />` throws: 'Uncaught error: This usually means a return statement is missing. Or, to render nothing, return null.'
If I proceed to refresh the page, the error goes away and the dashboard is displayed again with both charts functioning.
Hi Benito,
Greetings from Syncfusion.
We have ensured your reported scenario with chart and sparkline component. Control is re-rendered properly while resizing or dragging the dashboard layout panel. We have attached the tested sample and video for your reference.
Video : https://www.syncfusion.com/downloads/support/directtrac/general/ze/SprkDashboard1584860334.zip
Sample : https://stackblitz.com/edit/react-as8q41
Online Demo : https://ej2.syncfusion.com/react/demos/#/bootstrap5/dashboard-layout/dynamic
Kindly revert us if you have any concerns.
Regards,
Durga Gopalakrishnan.
Durga,
Thanks for your reply. The problem I'm experiencing occurs when I resize the window, not the chart itself. Please take a look at the attached video.
BJ Suriano
Hi Benito,
We have tried to replicate the reported exception from our end with your attached video; unfortunately, we are unable to replicate an issue, so we request you to share the following information which will be helpful for further analysis and provide you the solution.
Kindly revert us if you have any concerns.
Regards,
Durga Gopalakrishnan.
Hi Durga, I got to the end of my exercise and the instructor pointed out the origin of that error. See the following video as reference. https://www.youtube.com/watch?v=jx5hdo50a2M&t=13256s.
He noted that the error goes away by following the instruc
Hi Benito,
We are not clear about your exact query, since an initially reported issue is related to sparkline component which throws console exception while resizing the browser window. But now, an attached video seems to be chart.
Please mention in which control you are facing the problem and kindly share the replication steps to reproduce an issue or sample to analyze this case further from our end.
Regards,
Durga Gopalakrishnan.
Hey,
I got the same issue just now and I don't know how this error will be solve I tried every possible way but it's still causing me some problems here is a sample video of the error
The video
Attachment: VIDEO_ERROR_4fb9701d.zip
Hi Ieari,
We have tried to replicate the reported problem; unfortunately, we are unable to reproduce an issue. We request you to share an issue reproduced sample to validate this case from our end.
Sample : https://stackblitz.com/edit/react-as8q41
Please let us know if you have any concerns.
Regards,
Durga Gopalakrishnan.
Hi Kareem,
We have prepared sample based on your requirement. Sparkline control is rendered properly with class component extends pure component. Please check with the below screenshot and sample.
Sample : https://stackblitz.com/edit/a-purecomponent-example-pu1uey
Please let us know if you have any concerns.
Regards,
Durga Gopalakrishnan.