For the complete documentation index, see llms.txt. This page is also available as Markdown.

ChartJS3

Simple yet flexible JavaScript charting for designers & developers

ChartJS3 is the same as the ChartJS extension, just for version 3 of ChartJS. See here for an example of how to create a chart, the code is the same in both versions:

ChartJS

Some key differences between ChartJS and ChartJS3 are in the Options configuration. For example, in ChartJS3 in order to set the tooltip enabled to False, you would do this:

chartJS31.Options.Plugins.Tooltip = new Wisej.Web.Ext.ChartJS3.OptionsTooltips { Enabled = false };

(Note that ChartJS3 uses Options.Plugins.ToolTip where ChartJS uses Options.Tooltip)

In ChartJS3 you can do this to disable the legend: (Again note the use of Options.Plugins.)

chartJS31.Options.Plugins.Legend.Display = false;

ChartJS requires OptionsScalesTicks in order to set the minimum and maximum values on the X and Y axis. However, ChartJS3 does not require OptionsScalesTicks. Here's an example of how to set the minimum and maximum value on the Y axis in ChartJS3:

chartJS31.Options.Scales.yAxes = new[]
{
    new OptionScalesAxesY { Min = 1, Max = 100 }
};

How To Use

The ChartJS3 extension can be added to a Wisej.NET project using NuGet Package Manager.

Last updated

Was this helpful?