Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc(Chart): update Chart line type sample code #2408

Merged
merged 2 commits into from
Nov 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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