Stock Chart Series Types

17 Feb 20223 minutes to read

Essential JS 2 StockChart Stock Chart supports 6 major types of series namely Line, Spline, Hilo, HiloOpenClose, Hollow Candle and Candle . By using the series dropdown button you can navigate between the above listed series types.

Line

To render a line series, use series Type as Line.

Candle

To render a candle series, use series Type as Candle .

HollowCandle

To render a hollowcandle series, use series Type as Candle and set EnableSolidCandle as false.

Spline

To render a spline series, use series Type as Spline.

Hilo

To render a hilo series, use series Type as Hilo .

HiloOpenClose

To render a hiloOpenClose series, use series Type as HiloOpenClose.

<script src="~/financial-data.js"></script>

            @(Html.EJS().StockChart("container").Load("stockload").Title("AAPL Stock Price").IndicatorType(new List<Object>() { }).ExportType(new List<Object>() { }).TrendlineType(new List<Object>() { })
                                                                .Series(sr =>
                                                                {
                                                                    sr.Type(Syncfusion.EJ2.Charts.ChartSeriesType.Candle).DataSource("data").Add();
                                                                })
                                                                .Render())
    <script>
        var data = window.chartData;
    </script>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;

namespace EJ2CoreSampleBrowser.Controllers.StockChart
{
    public partial class StockChartController : Controller
    {
        public IActionResult Default()
        {
            return View();
        }
    }
}