Skip to main content

StockChart

Namespace: Wisej.Web.Ext.Syncfusion2

Assembly: Wisej.Web.Ext.Syncfusion2 (4.1.0.0)

A chart used to visualize stock data.

public class StockChart : ej2Base

Constructors​

Instance member StockChart()​

Constructs a new instance of the StockChart class.

Example:

The following example creates a stock chart that shows the closing prices as a line, configured through the Options object.

var stockChart = new StockChart();
stockChart.Options.title = "ACME Corp.";
stockChart.Options.primaryXAxis = new { valueType = "DateTime" };
stockChart.Options.series = new[]
{
new { type = "Line", dataSource = prices, xName = "date", yName = "close" }
};
stockChart.Dock = DockStyle.Fill;
this.Controls.Add(stockChart);

Instance member StockChart(options)​

Constructs a new instance of the StockChart class.

NameTypeDescription
optionsObjectInitial set of options.

Example:

The following example creates a candlestick chart from a list of daily quotes.

var quotes = new[]
{
new { date = new DateTime(2024, 5, 6), open = 101.2, high = 104.5, low = 100.8, close = 103.9, volume = 1250000 },
new { date = new DateTime(2024, 5, 7), open = 103.9, high = 105.1, low = 102.0, close = 102.4, volume = 980000 }
};
var stockChart = new StockChart(new
{
title = "ACME Corp.",
primaryXAxis = new { valueType = "DateTime" },
series = new[]
{
new { type = "Candle", dataSource = quotes, xName = "date", open = "open", high = "high", low = "low", close = "close", volume = "volume" }
}
});
stockChart.Dock = DockStyle.Fill;
this.Controls.Add(stockChart);

Implements​