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. Image for the cookie policy date

Chart does not render with culture files.


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?



3 Replies

KC Kalaimathi Chellaiah Syncfusion Team 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; 
            ajax.failureHandler = function (value) { 
        for (var prop = 0; prop < files.length; prop++) { 
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.

ST Stefan December 26, 2018 12:37 PM UTC


Yore suggestion fixed the problem! 



DD Dharanidharan Dharmasivam Syncfusion Team 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. 

Live Chat Icon For mobile
Up arrow icon