Stock chart exceptions

Hi!

When rendering a StockChart in Blazor I get a js exception. Either:
  • TypeError: sf.navigations.HScroll is not a constructor (in this case the chart seems to render perfectly)  or
  • TypeError: Cannot read property 'replace' of undefined (in this case the chart does not render at all or only the title is rendered)
However the behaviour is not consistent, usually the second case happenes after the first render and if I reload the page the behaviour usually changes to the first one. (Maybe it's a timing issue.)

My chart code:
    <SfStockChart Title="Stock Price" [email protected]>
        <StockChartChartBorder Color="transparent" />
        <StockChartSeriesCollection>
            <StockChartSeries DataSource=@Data [email protected] XName="Date" High="High" Low="Low" Open="Open" Close="Close" Volume="Volume"></StockChartSeries>
        </StockChartSeriesCollection>
        <StockChartPeriods>
            <StockChartPeriod Text="Last week" IntervalType=RangeIntervalType.Weeks Interval="1" />
            <StockChartPeriod Text="Last month" IntervalType=RangeIntervalType.Months Interval="1" />
            <StockChartPeriod Text="Last year" IntervalType=RangeIntervalType.Years Interval="1" />
            <StockChartPeriod Text="All" Selected="true"></StockChartPeriod>
        </StockChartPeriods>
    </SfStockChart>

Thanks for the help.

Attachment: Exceptions_498e02a8.zip

9 Replies 1 reply marked as answer

KR Kristof February 26, 2021 01:57 PM UTC

Seems to happen only in Server side blazor. 


DG Durga Gopalakrishnan Syncfusion Team March 1, 2021 12:38 PM UTC

Hi Kristof, 
 
Greetings from Syncfusion. 
 
We have ensured your reported scenario with attached code snippet. Unfortunately, we are unable to reproduce the reported issue from our end. We have attached the tested sample for your reference and also ensure whether you have added the maximum message in Startup.cs file. 
 
 
Screenshot :  
 
 
 
 
If you are still facing the problem, please revert us with issue reproducing sample or try to replicate an issue in above sample, so that it will be helpful for us to proceed further. 
 
Regards, 
Durga G 



KR Kristof March 5, 2021 11:14 AM UTC

Hi! 

Unfortunatly the problem still persists. (I already added the required lines to Startup and the reference to lodash in Host.)

What I managed to find out so far:
The exception happens on a line: a=a.replace("{1}",c).replace("{0}",u) where the "a" is undefined.

I attached screenshots, so you can see other variable values in the function. (I don't know if its a generated file, but I hope I could help finding the problem.


Attachment: Archívum_eb2ecef3.zip


KR Kristof March 5, 2021 02:52 PM UTC

Further info: there seems to be a problem with datetime localization: if the javascript variable value is “en-US” the chart appears without errors, it the variable is “” (empty string), the exception appears (and the chart does not render).


DG Durga Gopalakrishnan Syncfusion Team March 8, 2021 12:48 PM UTC

Hi Kristof,

We have validated your reported scenario. The Syncfusion Blazor UI components are using en-Us culture for default rendering. Please confirm whether you are specifying empty string for localization in stock chart. When localization is not specified then it considers default one. Kindly specify in which scenario you are facing this issue and locale used in your application.

Regards,
Durga G



KR Kristof March 8, 2021 02:57 PM UTC

I did not set the localization explicitly.

After some debugging I came to the conclusion that the bug is caused by SfNumericTextBox when placed on the same page as a StockChart. 
See example at: https://github.com/kristof12345/ChartsDemo

I hope with this information and demo project you are able to isolate the bug.


DG Durga Gopalakrishnan Syncfusion Team March 10, 2021 01:45 PM UTC

Hi Kristof,

We have validated your reported scenario. We have considered this as a bug and logged a defect report. This fix will be available in our upcoming weekly patch release which is expected to be rolled out on 6th April 2021. We appreciate your patience until then. You can keep track of the bug from the feedback portal below.


The provided feedback link is private, and you need to login to view this feedback.

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal. 

Regards,
Durga G



DG Durga Gopalakrishnan Syncfusion Team April 13, 2021 01:11 PM UTC

Hi Kristof, 

We are working on reported issue. We will include this fix in our upcoming weekly patch release which is scheduled to be rolled out on 20th April 2021. We appreciate your patience until then. 

Regards, 
Durga G


DG Durga Gopalakrishnan Syncfusion Team April 20, 2021 03:54 PM UTC

Hi Kristof, 

We are glad to announce that our v19.1.57 patch release is rolled out; we have added the fix for reported issue. You can use the latest Syncfusion.Blazor NuGet package version.  


Screenshot : 

 


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance. 

Regards, 
Durga G 


Marked as answer
Loader.
Up arrow icon