ChartJS
Namespace: Wisej.Web.Ext.ChartJS
Assembly: Wisej.Web.Ext.ChartJS
ChartJS is a simple yet flexible JavaScript charting for designers and developers from http://www.chartjs.org/.
- C#
- VB.NET
public class ChartJS : Widget
Public Class ChartJS
Inherits Widget
Constructors
ChartJS()
Constructs a new instance of the ChartJS control.
Properties
ChartType
ChartType: Returns or sets the ChartType. (Default: Line)
DataSets
DataSetCollection: Returns or sets the data sets to plot the chart.
InitScript
String: Overridden to create our initialization script.
Labels
String[]: Returns or sets the labels for the data points.
Options
Options: Chart options specific for the value of ChartType. (Default: null)
Packages
List<Package>: Overridden to return our list of script resources.
Methods
GetImage(callback)
Returns the chart as a PNG image.
| Parameter | Type | Description |
|---|---|---|
| callback | Action<Image> | Callback method that receives the image. |
GetImageAsync()
Returns the chart as a PNG image.
Returns: Task<Image>. An Image with a representation of the chart.
UpdateData(duration)
Causes the chart to update the data set and labels. It performs a smooth animated transition from one data set to the new one.
| Parameter | Type | Description |
|---|---|---|
| duration | Int32 | Duration of the update animation in milliseconds. The default is 300 milliseconds. |
Events
ChartClick
ChartClickEventHandler Fired when the user clicks a data point on the chart.