- Home
- Forum
- ASP.NET Core - EJ 2
- Chart does not render with culture files.
Chart does not render with culture files.
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?
”
SIGN IN To post a reply.
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
UG link: https://ej2.syncfusion.com/aspnetcore/documentation/common/internationalization/?no-cache=1
|
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
ST
Stefan
December 26, 2018 12:37 PM UTC
Hi!
Yore suggestion fixed the problem!
Thanks,
/Stefan
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.
Thanks,
Dharani.
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
ST Stefan
- Dec 21, 2018 01:08 PM UTC
- Dec 31, 2018 05:57 AM UTC