Home > front end >  ABP framework: Dashboard not working in some tenants
ABP framework: Dashboard not working in some tenants

Time:08-25

Dears I'm facing strange problem here Dashboard not appear in some tenants and works in perfect way in another tenants and host and this is the error "Uncaught ReferenceError: Chart is not defined" Can anyone help in this strange error ? enter image description here

in other tenants this error not appear so it works correctly Please help !! Abp version 4.2 MVC

CodePudding user response:

It seems ChartJS is missing in your bundle. Probably it might be defined in HostDashboard but not in TenantDashboard.

Make sure ChartjsScriptContributor is added to the page.


    <abp-script type="typeof(ChartjsScriptContributor)" />

It's not recommended but you can add it to the global bundle:

Configure<AbpBundlingOptions>(options =>
{
    options.ScriptBundles.Configure(
        LeptonThemeBundles.Scripts.Global,
        bundle =>
        {
            bundle.Contributors.Add(new ChartjsScriptContributor());
            // ...
        }
    );
});
  • Related