Skip to content

Commit 0d0bf5c

Browse files
authored
feat(Chart): support custome BackgroundColor (#7352)
* feat(Chart): add Hidden parameter on ChartDataset * chore: update documentation * feat(Chart): support custome BackgroundColor
1 parent 264b9d6 commit 0d0bf5c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/BootstrapBlazor.Server/BootstrapBlazor.Server.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<PackageReference Include="BootstrapBlazor.BarCode" Version="10.0.0" />
3030
<PackageReference Include="BootstrapBlazor.BarcodeGenerator" Version="10.0.0" />
3131
<PackageReference Include="BootstrapBlazor.BootstrapIcon" Version="10.0.0" />
32-
<PackageReference Include="BootstrapBlazor.Chart" Version="10.0.1-beta01" />
32+
<PackageReference Include="BootstrapBlazor.Chart" Version="10.0.1-beta02" />
3333
<PackageReference Include="BootstrapBlazor.ChatBot" Version="10.0.0" />
3434
<PackageReference Include="BootstrapBlazor.CherryMarkdown" Version="10.0.1" />
3535
<PackageReference Include="BootstrapBlazor.CodeEditor" Version="10.0.0" />

src/BootstrapBlazor.Server/Components/Samples/Charts/Bar.razor.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the Apache 2.0 License
33
// See the LICENSE file in the project root for more information.
44
// Maintainer: Argo Zhang([email protected]) Website: https://www.blazor.zone
@@ -67,7 +67,11 @@ private Task<ChartDataSource> OnInit(bool stacked, bool setTitle = true)
6767
ds.Labels = Enumerable.Range(1, _barDataCount).Select(i => i.ToString());
6868
for (var index = 0; index < _barDatasetCount; index++)
6969
{
70-
ds.Data.Add(new ChartDataset() { Label = $"Set {index}", Data = Enumerable.Range(1, _barDataCount).Select(i => Random.Shared.Next(20, 37) / 10.0f).Cast<object>() });
70+
ds.Data.Add(new ChartDataset()
71+
{
72+
Label = $"Set {index}",
73+
Data = Enumerable.Range(1, _barDataCount).Select(i => Random.Shared.Next(20, 37) / 10.0f).Cast<object>()
74+
});
7175
}
7276

7377
return Task.FromResult(ds);

0 commit comments

Comments
 (0)