We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Charts dont work?

Thread ID:

Created:

Updated:

Platform:

Replies:

147365 Sep 7,2019 08:02 PM UTC Nov 8,2019 10:39 AM UTC Blazor 7
loading
Tags: Charts
Kyle
Asked On September 7, 2019 08:02 PM UTC

I'm trying to uyse synfcution.ej2.blazor 17.2.0.50-beta, the latest one on nuget, and the latest version of .net core 3.

Every chart example I find in the documentation does not render a chart. Am I missing something? Do these charts work?

I make a fresh example with the latest blazor template from microsoft, copy and paste this into my home page:

@page "/"

@using Syncfusion.EJ2.Blazor.Charts
<EjsChart Width="60%">
    <ChartPrimaryXAxis ValueType="Syncfusion.EJ2.Blazor.Charts.ValueType.Category"></ChartPrimaryXAxis>

    <ChartSeriesCollection>
        <ChartSeries DataSource="@MedalDetails" XName="X" YName="YValue" ColumnSpacing="0.2" ColumnWidth="0.7" Type="ChartSeriesType.Bar">
        </ChartSeries>
        <ChartSeries DataSource="@MedalDetails" XName="X" YName="YValue1" ColumnSpacing="0.2" ColumnWidth="0.2" Type="ChartSeriesType.Bar">
        </ChartSeries>
    </ChartSeriesCollection>
</EjsChart>

@code{
    public class ChartData
    {
        public string X;
        public double YValue;
        public double YValue1;
    }
    public List<ChartData> MedalDetails = new List<ChartData>
{
        new ChartData { X= "USA", YValue= 46, YValue1=56 },
        new ChartData { X= "GBR", YValue= 27, YValue1=17 },
        new ChartData { X= "CHN", YValue= 26, YValue1=36 },
        new ChartData { X= "UK", YValue= 56,  YValue1=16 },
        new ChartData { X= "AUS", YValue= 12, YValue1=46 },
        new ChartData { X= "IND", YValue= 26, YValue1=16 },
        new ChartData { X= "DEN", YValue= 26, YValue1=12 },
        new ChartData { X= "MEX", YValue= 34, YValue1=32},
    };
}



And nothing is on the screen, and the HTML output is just this:
<div id="chartsxmuk2il11ma" class="e-blazor-hidden"></div>
with nothing inside the div.


Manuel Reinacher
Replied On September 7, 2019 09:44 PM UTC

Hello Kyle,

Did you add the css and javascript references?



<head>
   ...
    <link rel='nofollow' href="https://cdn.syncfusion.com/ej2/17.2.50/material.css" rel="stylesheet" />
    <script src="https://cdn.syncfusion.com/ej2/17.2.50/dist/ej2.min.js"></script>
</head>


Are other controls working?

The basic example for a chart is working for me.


regards Manuel





Kyle
Replied On September 8, 2019 05:02 AM UTC

Ack, I had those but I was using serverside and was missing this:

    <script src="https://cdn.syncfusion.com/ej2/17.2.50/dist/ejs.interop.min.js"></script>

Thanks for the help!

Kesavan Muthusamy [Syncfusion]
Replied On September 9, 2019 07:30 AM UTC

Hi Kyle, 

Greetings from Syncfusion.  

We always happy to assists you. Please let us know if you need any further assistance.  

Regards, 
Kesavan 


Alex
Replied On October 2, 2019 12:43 PM UTC

For me, it was because I had a browser plugin (Privacy Badger) that was blocking the SyncFusion CDN. Private mode (no extensions) revealed that it was working, so then I just had to enable the CDN in my extension.

Kalaimathi Chellaiah [Syncfusion]
Replied On October 3, 2019 10:31 AM UTC

Hi Alex, 
 
Thanks for the update. Kindly get in touch with us, if you would require further assistance. We are always happy in assisting you.   
   
Regards, 
Kalai. 


Alex
Replied On November 7, 2019 06:35 PM UTC

I'm having the same problem. I fixed it by installing the nuget package to the server and shared too. It worked before with only installing it on the client, I didn't update or anything, so I don't know why it happened.

But this is the only thread that comes up when I search for "e-blazor-hidden" on google, so if any future readers have this problem, try and install the package on everything.

Ps. I'm another Alex than the cool guy above

Srihari Muthukaruppan [Syncfusion]
Replied On November 8, 2019 10:39 AM UTC

Hi Alex,  

Thanks for the update. Kindly get in touch with us, if you requires further assistance. We are always happy in assisting you.   
   
Thanks,   
Srihari M 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon