Skip to content

Commit 73f513a

Browse files
committed
Adjust readme for alternative NuGet Package, update Chart.js version
1 parent fb6e678 commit 73f513a

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

ChartJs.Blazor.Samples/Server/Pages/_Host.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
document.getElementById("blazorMode").src = window.location.search.includes("mode=server") ? "_framework/blazor.server.js" : "_framework/blazor.webassembly.js";
2626
</script>
2727

28-
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
28+
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
2929
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
3030

3131
<!-- This is the glue between Blazor and Chart.js -->

README.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55

66
[![Join the chat at https://gitter.im/ChartJs-Blazor/community](https://badges.gitter.im/ChartJs-Blazor/community.svg)](https://gitter.im/ChartJs-Blazor/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
77

8-
[![NuGet Downloads](https://img.shields.io/nuget/dt/ChartJs.Blazor?label=NuGet%20Downloads)](https://www.nuget.org/packages/ChartJs.Blazor/)
8+
[![NuGet Downloads (official NuGet)](https://img.shields.io/nuget/dt/ChartJs.Blazor?label=NuGet%20Downloads)](https://www.nuget.org/packages/ChartJs.Blazor/)
9+
[![NuGet Downloads (2.0 NuGet)](https://img.shields.io/nuget/dt/ChartJs.Blazor.Fork?label=NuGet%20Downloads)](https://www.nuget.org/packages/ChartJs.Blazor.Fork/)
910

1011
[![Netlify Status](https://api.netlify.com/api/v1/badges/4edc0972-1674-4ff7-8fdc-41e643b33738/deploy-status)](https://app.netlify.com/sites/chartjs-blazor-samples/deploys)
1112

@@ -24,12 +25,15 @@ You need an IDE that supports Blazor and .NET Core SDK 3.x+
2425

2526
## Installation
2627

27-
There's a NuGet package available: [ChartJs.Blazor](https://www.nuget.org/packages/ChartJs.Blazor/)
28+
**Due to an [unfortunate situation](https://github.com/mariusmuntean/ChartJs.Blazor/issues/160), the new 2.0 release is only available in an [alternative NuGet package](https://www.nuget.org/packages/ChartJs.Blazor.Fork/) for the time being.**
29+
The original NuGet is [ChartJs.Blazor](https://www.nuget.org/packages/ChartJs.Blazor/).
30+
31+
Install our NuGet package: [ChartJs.Blazor.Fork](https://www.nuget.org/packages/ChartJs.Blazor.Fork/)
2832

2933
You can install it with the Package Manager in your IDE or alternatively using the command line:
3034

3135
```bash
32-
dotnet add package ChartJs.Blazor
36+
dotnet add package ChartJs.Blazor.Fork
3337
```
3438

3539
## Usage
@@ -40,10 +44,10 @@ Before you can start creating a chart, you have to add some static assets to you
4044
In your `_Host.cshtml` (server-side) or in your `index.html` (client-side) add the following lines to the `body` tag **after** the `_framework` reference.
4145

4246
```html
43-
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.3/dist/Chart.min.js"></script>
47+
<script src="https://cdn.jsdelivr.net/npm/chart.js@2.9.4/dist/Chart.min.js"></script>
4448

4549
<!-- This is the glue between Blazor and Chart.js -->
46-
<script src="_content/ChartJs.Blazor/ChartJsBlazorInterop.js"></script>
50+
<script src="_content/ChartJs.Blazor.Fork/ChartJsBlazorInterop.js"></script>
4751
```
4852

4953
If you are using a time scale (`TimeAxis`), you also need to include Moment.js.
@@ -135,7 +139,7 @@ Unfortunately, we're not up to date yet and many samples are missing. If you'd l
135139
The [ChartJs.Blazor.Samples folder](./ChartJs.Blazor.Samples) contains the projects to showcase the samples. It's based on [Suchiman/BlazorDualMode](https://github.com/Suchiman/BlazorDualMode) and allows you to switch between the server- and the client-side Blazor mode.
136140

137141
The samples should always be up to date with the current development on master. That means that the code you see on master might not work for your version.
138-
To browse the samples for the latest nuget version, see the [samples on the releases branch](https://github.com/mariusmuntean/ChartJs.Blazor/tree/releases/ChartJs.Blazor.Samples/Client/Pages) or select a specific tag.
142+
To browse the samples for the latest NuGet version, see the [samples on the releases branch](https://github.com/mariusmuntean/ChartJs.Blazor/tree/releases/ChartJs.Blazor.Samples/Client/Pages) or select a specific tag.
139143
If there's not a sample for your use-case on the releases branch, check out the master one. Maybe someone already contributed what you're looking for and if not, why not do it yourself :wink:
140144

141145
We would usually host the samples on https://www.iheartblazor.com but unfortunately, the version shown there is really old and we highly recommend downloading and running our samples on your machine.

src/ChartJs.Blazor/ChartJs.Blazor.csproj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
* Improved JavaScript interop layer and API (callbacks)
2020
* Simplified namespaces
2121
* Library no longer contains copy of Chart.js and moment.js builds
22-
* Lots of bugfixes and other improvements</PackageReleaseNotes>
22+
* Lots of bugfixes and other improvements
23+
24+
More on https://github.com/mariusmuntean/ChartJs.Blazor/releases/tag/v2.0.0</PackageReleaseNotes>
2325
<AssemblyName>ChartJs.Blazor</AssemblyName>
2426
<RootNamespace>ChartJs.Blazor</RootNamespace>
2527
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>

0 commit comments

Comments
 (0)