Chat not rendering on any platform

Ive implemented the example chart and it gives me an error and does not renders
Code
@using Syncfusion.Blazor.Charts

    <SfChart>
        <ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Category"></ChartPrimaryXAxis>
        <ChartSeriesCollection>
            <ChartSeries DataSource="@Sales" XName="Month" YName="SalesValue" Type="ChartSeriesType.Column">
            </ChartSeries>
        </ChartSeriesCollection>
    </SfChart>

@code {
    public class SalesInfo
    {
        public string Month { get; set;}
        public double SalesValue { get; set;}
    }
    public List<SalesInfo> Sales = new List<SalesInfo>
    {
        new SalesInfo { Month = "Jan", SalesValue = 35 },
        new SalesInfo { Month = "Feb", SalesValue = 28 },
        new SalesInfo { Month = "Mar", SalesValue = 34 },
        new SalesInfo { Month = "Apr", SalesValue = 32 },
        new SalesInfo { Month = "May", SalesValue = 40 },
        new SalesInfo { Month = "Jun", SalesValue = 32 },
        new SalesInfo { Month = "Jul", SalesValue = 35 }
    };
}
Error
This exception was originally thrown at this call stack:
    Syncfusion.Blazor.Charts.SfChart.Calculatebounds()
    Syncfusion.Blazor.Charts.SfChart.RefreshBound()
    Syncfusion.Blazor.Charts.SfChart.ResizeChart()
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()

DotNet SDK
.Net 5.0.102


9 Replies 1 reply marked as answer

SM Srihari Muthukaruppan Syncfusion Team February 4, 2021 05:29 AM UTC

Hi Raul, 
 
We have analyzed your query. From that, we suggest you add the below code snippet in the startup.cs page to overcome the reported scenario in the latest version 18.4.41. We have also attached the sample used for testing. Please find the sample below. 
 
 
Code Snippet: 
public void ConfigureServices(IServiceCollection services) 
        { 
            services.AddSignalR(e => { 
                e.MaximumReceiveMessageSize = 102400000; 
            }); 
            services.AddRazorPages(); 
            services.AddServerSideBlazor(); 
            services.AddSyncfusionBlazor(); 
            services.AddSingleton<WeatherForecastService>(); 
        }  
Screenshot: 
 
 
If you still face this issue. kindly revert us with the following information which will be more helpful for further analysis and provide you the solution sooner.  
 
  1. Try to reproduce the reported scenario in the provided sample 
  2. Share the details if you have done any other customization
 
Regards, 
Srihari M  


Marked as answer

RA Raul February 4, 2021 07:09 AM UTC

It renders with the example now, but with a custom chart it throws this error:
This exception was originally thrown at this call stack:
    Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.ProcessJsonData()
    Syncfusion.Blazor.Charts.Chart.Internal.ChartSeriesRenderer.DataManagerSuccess(bool)
    Syncfusion.Blazor.Charts.SfChart.InitializeDataModule(Syncfusion.Blazor.Charts.ChartSeries)
    Syncfusion.Blazor.Charts.SfChart.ProcessData(bool, bool)
    Syncfusion.Blazor.Charts.SfChart.RenderChart()
    System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
-----------------------------------Code----------------------------------------------------
            <SfChart Title="Consumo">
                <ChartPrimaryXAxis ValueType="Syncfusion.Blazor.Charts.ValueType.DateTime"></ChartPrimaryXAxis>
                <ChartPrimaryYAxis ValueType="Syncfusion.Blazor.Charts.ValueType.Double"></ChartPrimaryYAxis>
                <ChartSeriesCollection>
                    <ChartSeries DataSource="@FuelDatas" XName="DeviceTime" YName="Fuel" Type="ChartSeriesType.Spline"></ChartSeries>
                </ChartSeriesCollection>
            </SfChart>
@code {
     public List<FuelData> FuelDatas { get; set; }
              void GenerateFuelDataSource(List<TanCoLogisticsSDK.TelematicsRecord> records)
    {
        FuelDatas = new List<FuelData>();
        foreach (var record in records)
        {
            FuelDatas.Add(new FuelData { Id = record.TelematicsRecordID, DeviceTime = record.DeviceTime.DateTime, Fuel = record.FuelLevel });
        }
    }
    public class FuelData
    {
        public int Id;
        public DateTime DeviceTime;
        public double Fuel;
    }
}


SM Srihari Muthukaruppan Syncfusion Team February 4, 2021 03:00 PM UTC

Hi Raul, 
 
We have analyzed your query. Since we are unable to reproduce the reported scenario from our end in the latest version 18.4.41. Can you please share the standalone project which will be more helpful for further analysis and provide you the solution sooner. We have also attached the sample used for testing. 
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M   



PB PB February 16, 2021 12:56 PM UTC

The problem still occurs on version 18.4.0.43. Setting MaximumReceiveMessageSize helps.
Is this workaround? Or we have to use it on daily basis?


SM Srihari Muthukaruppan Syncfusion Team February 16, 2021 01:01 PM UTC

Hi PB, 
 
We have already considered this scenario as an improvement and this will be included in our volume 1 2021 release which is expected to be rolled out by the end of March 2021. Until then we suggest you to use the provided solution to overcome the reported scenario. 
 
Regards, 
Srihari M 



TR Travis February 18, 2021 05:28 AM UTC

If you are not going to fix this as a bug please consider adding it to the "breaking changes" section of the release notes, as it breaks charts completely.  Also please consider adding configuration option for those of us that use Azure SignalR and configure at the app service level and not in the startup.cs.  



SM Srihari Muthukaruppan Syncfusion Team February 19, 2021 11:25 AM UTC

Hi Travis, 
 
Thanks for the update. 
 
We have logged a documentation task regarding this and we will update the status within a week once the changes reflected in online. We appreciate your patience until then. 
 
Regards, 
Srihari M 



SM Srihari Muthukaruppan Syncfusion Team February 26, 2021 06:16 AM UTC

Hi Travis, 
 
Thanks for your patience. 
 
Based on your requirement we have modified the changes in the getting started for blazor platform and the changes got published in online. Please find the documentation link below for further reference. 
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M 



SM Srihari Muthukaruppan Syncfusion Team April 1, 2021 02:21 PM UTC

Hi Raul, 
 
Sorry for the inconvenience. 
 
Since on chart initial loading, we gather text measure information for rendering purposes. And its size exceeds the default SignalR buffer size 32 KB, the server will be disconnected. So you need to add the following service to increase the buffer size to 64 KB over the SignalR connection. And this is mandatory to render the chart in latest version 19.1.54. 
 
Code Snippet: 
using Syncfusion.Blazor; 
namespace BlazorApplication 
{ 
public class Startup 
{ 
    .... 
    .... 
    public void ConfigureServices(IServiceCollection services) 
    { 
        .... 
        .... 
        services.AddSyncfusionBlazor(); 
        services.AddSignalR(e => { 
          e.MaximumReceiveMessageSize = 65536; 
        }); 
    } 
} 
} 
 
 
Note: For using Azure SignalR to host your blazor server application use below configuration 
 
using Syncfusion.Blazor; 
namespace BlazorApplication 
{ 
public class Startup 
{ 
    .... 
    .... 
    public void ConfigureServices(IServiceCollection services) 
    { 
        .... 
        .... 
        services.AddSyncfusionBlazor(); 
        services.AddSignalR(e => {e.MaximumReceiveMessageSize = 65536;}).AddAzureSignalR(); 
    } 
} 
} 
 
 
We have also included the details in our documentation. Please find the link below. 
 
 
Let us know if you have any concerns. 
 
Regards, 
Srihari M 


Loader.
Up arrow icon