jQWidgets.Blazor 1.2.0

.NET Standard 2.0
There is a newer version of this package available.
See the version list below for details.
NuGet\Install-Package jQWidgets.Blazor -Version 1.2.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
dotnet add package jQWidgets.Blazor --version 1.2.0
<PackageReference Include="jQWidgets.Blazor" Version="1.2.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add jQWidgets.Blazor --version 1.2.0
#r "nuget: jQWidgets.Blazor, 1.2.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install jQWidgets.Blazor as a Cake Addin
#addin nuget:?package=jQWidgets.Blazor&version=1.2.0

// Install jQWidgets.Blazor as a Cake Tool
#tool nuget:?package=jQWidgets.Blazor&version=1.2.0

Blazor lets you build interactive web UIs using C# instead of JavaScript. Blazor apps are composed of reusable web UI components implemented using C#, HTML, and CSS. Blazor can run your client-side C# code directly in the browser, using WebAssembly. Because it's real .NET running on WebAssembly, you can re-use code and libraries from server-side parts of your application.

Prerequisites .NET Core SDK - This includes everything you need to build and run Blazor WebAssembly apps.

Setup

  1. Install templates:

dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview9.19465.2

  1. Create a blazor application:

dotnet new blazorwasm -o jqwidgets-blazor-app

  1. Navigate to the application:

cd jqwidgets-blazor-app

  1. Add the jQWidgets.Blazor package:

dotnet add package jQWidgets.Blazor

  1. Open _Imports.razor and add the following at the bottom:

@using jQWidgets.Blazor.Components

  1. Open wwwroot/index.html and add the needed styles and scripts. For example if you are going to use JqxBarGauge, the file should look like this:
<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="viewport" content="width=device-width" />
        <title>jqwidgets-blazor-app</title>
        <base href="/" />
 
        <link href="_content/jQWidgets.Blazor/jqwidgets/styles/jqx.base.css">
    </head>
    <body>
        <app>Loading...</app>
 
        <script src="_content/jQWidgets.Blazor/jqwidgets/jqxcore.js"></script>
        <script src="_content/jQWidgets.Blazor/jqwidgets/jqxdraw.js"></script>
        <script src="_content/jQWidgets.Blazor/jqwidgets/jqxbargauge.js"></script>
        <script src="_content/jQWidgets.Blazor/jqxBlazor.js"></script>
 
        <script src="_framework/blazor.webassembly.js"></script>
    </body>
</html>
  1. Open Pages/Index.razor and replace the code as follows:
<JqxBarGauge 
    width=600 height=600 colorScheme="scheme02"
    max="max" values="values" tooltip="tooltip">
</JqxBarGauge>

@code {
    private int max = 150;
 
    private double[] values = new double[4] { 102, 115, 130, 137 };
 
    private IDictionary<string, bool> tooltip = new Dictionary<string, bool>()
    {
        { "visible", true }
    };
}
  1. Start the app and check the result:

dotnet watch run Events Methods & Properties

  1. Events Below is an example of listening to the JqxBarGauge onDrawEnd event and then doing something with the result:
<JqxBarGauge onDrawEnd="onDrawEnd"
    width=600 height=600 values="values">
</JqxBarGauge>

@code {
    private double[] values = new double[4] { 102, 115, 130, 137 };
 
    private void onDrawEnd(IDictionary<string, object> e) 
    {
        @* Do Something... *@
    }
}
  1. Methods & Properties In order to use methods, first you need to make a reference to the component:
<JqxBarGauge @ref="myBarGauge"
    width="350" height="350" values="values">
</JqxBarGauge>

@code {
    JqxBarGauge myBarGauge;
 
    private double[] values = new double[4] { 102, 115, 130, 137 };
 
    protected override void OnAfterRender(bool firstRender)
    {
        if (firstRender)
        {
            double[] newValues = new double[4] { 10, 20, 30, 40 };
            myBarGauge.val(newValues);
        }
    }
}
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.0 1,777 12/24/2020
1.2.0 1,204 9/1/2020
1.0.0 335 7/6/2020