Skip to content

Commit

Permalink
doc(Chart): update Chart line type sample code (#2408)
Browse files Browse the repository at this point in the history
* refactor: 重构代码

* chore: bump version 8.0.3-beta01
  • Loading branch information
ArgoZhang authored Nov 20, 2023
1 parent 37616a4 commit a419f96
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public partial class Line
[NotNull]
private ConsoleLogger? Logger { get; set; }

private ChartPointStyle[] chartPointStyles = new[]
{
private readonly ChartPointStyle[] chartPointStyles =
[
ChartPointStyle.Circle,
ChartPointStyle.Cross,
ChartPointStyle.CrossRot,
Expand All @@ -35,7 +35,7 @@ public partial class Line
ChartPointStyle.RectRot,
ChartPointStyle.Star,
ChartPointStyle.Triangle,
};
];

/// <summary>
/// <inheritdoc/>
Expand Down Expand Up @@ -237,7 +237,7 @@ protected override async Task OnAfterRenderAsync(bool firstRender)

if (firstRender)
{
Module = await JSRuntime.InvokeAsync<IJSObjectReference>("import", $"Components/Samples/Charts/Line.razor.js?v={JSVersionService.GetVersion()}");
Module = await JSRuntime.InvokeAsync<IJSObjectReference>("import", $"./Components/Samples/Charts/Line.razor.js?v={JSVersionService.GetVersion()}");

//随机生成一组数据
//Randomly generate a set of data
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//通过相对路径导入BootstrapBlazor.Chart的Chart.JS模块
import '../../../../_content/BootstrapBlazor.Chart/js/chart.js'
import Data from '../../../../_content/BootstrapBlazor/modules/data.js'
import '../../../_content/BootstrapBlazor.Chart/js/chart.js'
import Data from '../../../_content/BootstrapBlazor/modules/data.js'

export function lineChart(canvasId, chartData) {
const ctx = document.getElementById(canvasId);
Expand Down
2 changes: 1 addition & 1 deletion src/BootstrapBlazor/BootstrapBlazor.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">

<PropertyGroup>
<Version>8.0.2</Version>
<Version>8.0.3-beta01</Version>
</PropertyGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net5.0'">
Expand Down

0 comments on commit a419f96

Please sign in to comment.