ApexChart
Namespace: Wisej.Web.Ext.ApexCharts
Assembly: Wisej.Web.Ext.ApexCharts (4.1.0.0)
Integrates the ApexCharts (https://apexcharts.com/) JavaScript charting library.
- C#
- VB.NET
public class ApexChart : Widget
Public Class ApexChart
Inherits Widget
The chart is configured using the Options object, which is passed to the ApexCharts constructor on the client. When no options are set, an empty line chart is shown. The chart always fills the control, so the chart.width and chart.height options are ignored. The JavaScript and CSS files are loaded from the source selected in the Wisej.Web.Ext.ApexCharts.json configuration file.
Example:
The following example shows a bar chart with monthly sales:
var chart = new ApexChart
{
Dock = DockStyle.Fill
};
chart.Options.chart = new { type = "bar" };
chart.Options.series = new[]
{
new { name = "Sales", data = new[] { 30, 40, 45, 50, 49, 60 } }
};
chart.Options.xaxis = new
{
categories = new[] { "Jan", "Feb", "Mar", "Apr", "May", "Jun" }
};
this.Controls.Add(chart);
Constructors
ApexChart()
Initializes a new instance of ApexChart.
Properties
WidgetEvents
WidgetEventHandler[]: The widget event handlers. (Default: null)
WidgetFunctions
WidgetFunction[]: The JS functions used in the widget (Default: null)
WidgetTemplates
WidgetTemplate[]: The templates used by the widget (Default: null)
Methods
Dispose(disposing)
Disposes of resources.
| Parameter | Type | Description |
|---|---|---|
| disposing | Boolean |
OnWebRender(config)
Wire the client config to the server
| Parameter | Type | Description |
|---|---|---|
| config | Object |