The JavaScript Stock Chart is a well-crafted, easy-to-use financial charting package. Track and visualize the stock price of any company over a specific period of time using charting and range tools. The component comes with a lot of features such as zooming, panning, tooltip, crosshair, trackball, period selector, range selector, and events to make the stock charts more interactive.
Several data-rendering optimizations are included for the best possible performance when plotting large volumes of data and handling high-frequency real-time data.
The end-user experience is greatly enhanced by including a set of interactive features such as zooming and panning, crosshair, trackball, events, and selection.
Analyze both price action and volume at a glance.
Plot multiple series in a single chart to compare different stock values. Enabling a legend and a tooltip gives more information about an individual series.
Draw special attention to any region of the chart or graph with the help of strip lines.
Use the range selector to filter a date range for data that needs to be visualized.
Select data using predefined periods in the period selector and use the date picker to select a custom range.
Visualize data using different series types like candle, OHLC, HiLo, line, spline, area, and spline area. The series type can be changed using the series options in the period selector.
Legends provide additional information helpful in identifying individual data or series in a stock chart.
Use technical indicators to analyze the past and predict the future market trends based on historic price, volume, or open interest. The JS Stock Chart supports 10 different types of indicators. You can add these indicators to a stock chart using the indicator option in the period selector.
Predict future trends with predetermined data for any measurement such as the stock market or target revenue with the help of trendlines. You can add trendlines to a JS stock chart using the trendlines options in the period selector.
Stock events are used to show different kinds of market events on the chart. Use a flag, sign, pin, text, circle, or description.
The JavaScript Financial Charts ships with several built-in themes: Material, Bootstrap, Fabric (Office 365), and high contrast.
Export JavaScript Stock Charts to PDF documents or to image formats such as SVG, PNG, and JPEG in the client-side. Print the rendered stock charts and graphs directly from the browser.
JavaScript stock charts enables users from different locales to use them by formatting dates, currency, and numbering to suit preferences. Stock charts and graphs use the Essential JS 2 internalization library for handling value formatting.
All the stock chart strings in the user interface can be localized as needed. JavaScript Stock charts and graphs use the Essential JS 2 localization library to localize the strings.
Easily get started with the JavaScript Stock Chart using a few simple lines of HTML and TS code as demonstrated below. Also explore our JavaScript Stock Chart Example that shows you how to render and configure the stock chart in JavaScript.
<div class="control-section">
<div id="container"></div>
</div>
import { StockChart } from '@syncfusion/ej2-charts';
import { chartData } from './indicator-data';
import { DateTime, AreaSeries, CandleSeries, HiloOpenCloseSeries, HiloSeries, LineSeries, SplineSeries } from '@syncfusion/ej2-charts';
import { AccumulationDistributionIndicator, AtrIndicator, BollingerBands, EmaIndicator, MomentumIndicator } from '@syncfusion/ej2-charts';
import { MacdIndicator, RsiIndicator, Trendlines, SmaIndicator, StochasticIndicator, Export } from '@syncfusion/ej2-charts';
import { TmaIndicator, RangeTooltip, Tooltip, Crosshair, ITooltipRenderEventArgs, IStockChartEventArgs, ChartTheme }
from '@syncfusion/ej2-charts';
StockChart.Inject(DateTime, AreaSeries, CandleSeries, HiloOpenCloseSeries, HiloSeries, LineSeries, SplineSeries);
StockChart.Inject(AccumulationDistributionIndicator, AtrIndicator, BollingerBands, EmaIndicator, MomentumIndicator);
StockChart.Inject(MacdIndicator, RsiIndicator, SmaIndicator, StochasticIndicator);
StockChart.Inject(Trendlines, TmaIndicator, RangeTooltip, Tooltip, Crosshair, Export);
let stockChart: StockChart = new StockChart({
chartArea: { border: { width: 0 } },
primaryYAxis: {
lineStyle: { color: 'transparent' },
majorTickLines: { color: 'transparent', width: 0 },
},
primaryXAxis: { majorGridLines: { color: 'transparent' }, crosshairTooltip: { enable: true } },
series: [
{
dataSource: chartData,
type: 'Candle'
}
],
tooltipRender : (args: ITooltipRenderEventArgs) => {
if (args.text.split('<br/>')[4]) {
let target : number = parseFloat(args.text.split('<br/>')[4].split('<b>')[1].split('</b>')[0]);
let value : string = (target / 100000000).toFixed(1) + 'B';
args.text = args.text.replace(args.text.split('<br/>')[4].split('<b>')[1].split('</b>')[0], value);
}
},
tooltip: {
enable: true
},
crosshair: {
enable: true
},
title: 'AAPL Stock Price'
});
stockChart.appendTo('#container');
Stock Chart is also available in the Blazor, React, Angular, and Vue frameworks. Check out the Stock Chart for different platforms from the following links.
You can find our JavaScript Stock Chart demo here.
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue and five or fewer developers.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.