Skip to content

Commit

Permalink
Update Nugets
Browse files Browse the repository at this point in the history
  • Loading branch information
joadan committed Oct 24, 2024
1 parent 00ba0d0 commit 2d9531e
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.10" PrivateAssets="all" />
<PackageReference Include="PublishSPAforGitHubPages.Build" Version="3.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.0" />
<PackageReference Include="System.Net.Http.Json" Version="8.0.1" />
<PackageReference Include="TabBlazor" Version="0.12.2-alpha" />

<PackageReference Include="System.Text.Json" Version="8.0.5" />
Expand Down
2 changes: 1 addition & 1 deletion docs/BlazorApexCharts.Docs/BlazorApexCharts.Docs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Bogus" Version="35.4.1" />
<PackageReference Include="Bogus" Version="35.6.1" />
<PackageReference Include="ColorCode.HTML" Version="2.0.15" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.10" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
Expand Down
10 changes: 7 additions & 3 deletions src/Blazor-ApexCharts/ApexChart.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public partial class ApexChart<TItem> : IApexChartBase, IDisposable where TItem
/// <inheritdoc/>
protected override void OnInitialized()
{
if (Options == null) { Options = new ApexChartOptions<TItem>(); }
Options ??= new ApexChartOptions<TItem>();
if (Options.Chart == null) { Options.Chart = new Chart(); }

if (string.IsNullOrEmpty(chartId))
Expand Down Expand Up @@ -810,8 +810,12 @@ public virtual async Task AppendDataBySeriesNameAsync(Dictionary<string, IEnumer
/// </remarks>
public virtual async Task ZoomXAsync(ZoomOptions zoomOptions)
{
if (zoomOptions == null) { throw new ArgumentNullException(nameof(zoomOptions)); }
await InvokeVoidJsAsync("blazor_apexchart.zoomX", Options.Chart.Id, zoomOptions.Start, zoomOptions.End);
if (zoomOptions != null)
{
await InvokeVoidJsAsync("blazor_apexchart.zoomX", Options.Chart.Id, zoomOptions.Start, zoomOptions.End);
}
else
{ throw new ArgumentNullException(nameof(zoomOptions)); }
}

/// <summary>
Expand Down
6 changes: 2 additions & 4 deletions src/Blazor-ApexCharts/ChartService/ApexChartService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public ApexChartService(IJSRuntime jSRuntime, HttpClient httpClient, NavigationM
{
this.jSRuntime = jSRuntime;
this.httpClient = httpClient;
this.navManager = navManager;


httpClient.BaseAddress = new Uri(navManager.BaseUri + "_content/Blazor-ApexCharts/");
PopulateBuiltInLocales();
globalOptions = serviceOptions.GlobalOptions;
Expand All @@ -51,7 +50,7 @@ public ApexChartService(IJSRuntime jSRuntime, HttpClient httpClient, NavigationM
private readonly IJSRuntime jSRuntime;
private IApexChartBaseOptions globalOptions;
private HttpClient httpClient;
private readonly NavigationManager navManager;

private bool globalOptionsInitialized = true;


Expand All @@ -66,7 +65,6 @@ public ApexChartService(IJSRuntime jSRuntime, HttpClient httpClient, NavigationM

private void PopulateBuiltInLocales()
{
var basePath = navManager.BaseUri + "_content/Blazor-ApexCharts/locales/";
locales.Clear();
locales.Add("ar", new LocaleResource { Name = "ar", Language = "Arabic" });
locales.Add("be-cyrl", new LocaleResource { Name = "be-cyrl", Language = "Belarusian (Cyrillic)" });
Expand Down

0 comments on commit 2d9531e

Please sign in to comment.