Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
joadan committed Oct 19, 2024
2 parents 767f5a8 + 7c78197 commit 0557946
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
9 changes: 1 addition & 8 deletions docs/BlazorApexCharts.Docs.Server/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddDocs();
services.AddScoped<ICodeSnippetService, LocalSnippetService>();

services.AddApexCharts(e =>
{
e.GlobalOptions = new ApexChartBaseOptions
{
Debug = true,
Theme = new Theme { Palette = PaletteType.Palette6 }
};
});
services.AddApexCharts();
}

// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
Expand Down
6 changes: 5 additions & 1 deletion src/Blazor-ApexCharts/ApexChart.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,11 @@ protected override async Task OnAfterRenderAsync(bool firstRender)
isReady = true;
JSHandler = new JSHandler<TItem>(this);

await chartService?.GlobalOptionsInitializedAsync();
if (chartService != null)
{
await chartService.GlobalOptionsInitializedAsync();
}

}

if (isReady && forceRender)
Expand Down

0 comments on commit 0557946

Please sign in to comment.