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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Chart does not render with culture files.

Thread ID:

Created:

Updated:

Platform:

Replies:

141628 Dec 21,2018 01:08 PM UTC Dec 31,2018 05:57 AM UTC ASP.NET Core - EJ 2 3
loading
Tags: Charts
Stefan
Asked On December 21, 2018 01:08 PM UTC

Hi

EJ2.Grid in ASP.Net Core with razor pages.

Suddenly my charts stop rendering and I get a strange error “Cannot read property 'replace' of undefined”. I’ve spent hours on this and tracking all changes that can have affected the charts. The problem is when culture files are loaded, see below. If comment out the section below all charts render. Any suggestions how to fix this?

 


  ”


Kalaimathi Chellaiah [Syncfusion]
Replied On December 26, 2018 08:53 AM UTC

Hi Stefan, 
 
We have analyzed reported scenario with attached screen shot.  In your code snippet you have mentioned ajax url from node_modules folder. But in ASP.Net Core, the static files contents are should present under wwwroot  folder. Please find below ug link how to get cldr-data. And manually copy the Cldr-data and place inside the wwwroot folder and refer from the location as like the below code snippet 
 
 
function loadCultureFiles(name) { 
        var files = ['numbers.json', 'timeZoneNames.json', 'currencies.json', 'ca-gregorian.json']; 
        var loadCulture = function (prop) { 
            var val, ajax; 
            ajax = new ej.base.Ajax(location.origin + '/../../scripts/cldr-data/main/' + name + '/' + files[prop], 'GET', false); 
            ajax.onSuccess = function (value) { 
                val = value; 
                ej.base.loadCldr(JSON.parse(val)); 
            }; 
            ajax.failureHandler = function (value) { 
                console.log(value) 
            } 
            ajax.send(); 
        }; 
        for (var prop = 0; prop < files.length; prop++) { 
            loadCulture(prop); 
        } 
    } 
              
Screenshot: 
 
 
Since, we are not aware of the exact scenario on which the issue is reproduced, we would like to know the following details which will be helpful in further analysis and provide you the solution sooner.  
 
  • Could you please share the Syncfusion version you have used.
  • Try to reproduce the reported scenario with the above sample and revert us.
  • Provide your sample with replication steps.
 
Regards, 
Kalai 


Stefan
Replied On December 26, 2018 12:37 PM UTC

Hi!

Yore suggestion fixed the problem! 

Thanks,

/Stefan

Dharanidharan Dharmasivam [Syncfusion]
Replied On December 31, 2018 05:57 AM UTC

Hi Stefan, 
 
We are happy to hear that provide solution works at your end. Kindly revert us, if you would require further assistance. 
 
Thanks, 
Dharani. 


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

;