jQWidgets.Blazor 1.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package jQWidgets.Blazor --version 1.2.0
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.
<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 and Polyglot Notebooks. 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 Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
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 8,930 12/24/2020
1.2.0 2,530 9/1/2020
1.0.0 502 7/6/2020