ChartJS
Simple yet flexible JavaScript charting for designers & developers
The ChartJS extension component uses the excellent ChartJS widget to render amazing charts in real time. Please note that this extension is still under development and some advanced options are not yet available. Nevertheless, it’s quite an extension!

Features
The ChartJS Extension includes the following chart types:
Line
Bar
HorizontalBar
Radar
PolarArea
Pie
Doughnut
Bubble
Scatter
How to Use
The ChartJS extension can be added to a Wisej.NET project using NuGet Package Manager.
You can configure your instance by setting Chart specific Options.
For example, you can disable the tooltip using Options:
chartJS1.Options.Tooltips = new Wisej.Web.Ext.ChartJS.OptionsTooltips { Enabled = false };
Data is provided in DataSets.
Code sample
The code snippet below:
var data = new object[10];
Random random = new Random();
for (int i = 0; i < 10; i++)
{
data[i] = new Point(i, random.Next(10));
}
DataSet ds = chartJS1.DataSets.Add("ds1");
ds.Data = data;
ds.BackgroundColor = Color.Red;
Creates the following chart:

Make sure to set the labels of the chart either in the Designer or via code. If there are no labels, the points on the graph will not be shown.
You can add labels to the X axis like so:
// Numeric labels
this.chartJS1.Labels = new string[] {"1","2","3","4"};
// Day of the week labels
this.chartJS1.Labels = new string[] {"Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"};
Last updated
Was this helpful?