We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Trusted by the world’s leading companies

Syncfusion Trusted Companies

Overview

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.


Why choose Syncfusion JavaScript Stock Chart?

JavaScript stock chart high performance

High performance

Several data rendering optimizations have been used to achieve the best possible efficiency when plotting large amounts of data and managing high-frequency, real-time data.

JavaScript stock chart elegant animation

Elegant animation

The Stock Chart for JavaScript provides fluid animation to present data with smooth transitions.

JavaScript interactive stock chart

Interactive stock chart

The tooltip and crosshair cursor allow users to interact with the chart and obtain detailed information about data points.

JavaScript stock chart stock events

Stock events

Visualize stock events to display many types of market events on the chart.

JavaScript stock chart admirable feature set

Admirable feature set

The JavaScript Stock Chart supports zooming and panning, multiple series, period selector, range selector, trendlines, and indicators.

JavaScript stock chart adapts to any resolution

Adapts to any resolution

Stock Chart has a highly responsive layout and an optimized design for desktops, touchscreens, and phones. It works well on all mobile phones that use iOS, Android, or Windows OS.

JavaScript stock chart customizable themes

Attractive, customizable themes

Cutting-edge design with several built-in themes, such as Fluent, Tailwind CSS, Bootstrap, Material, and Fabric. Utilize the online Theme Studio tool to customize themes of stock chart easily.

JavaScript stock chart global and local

Globalization and localization

Enable users from different locales to use the control by formatting dates, currency, and numbering to suit preferences.


JavaScript Stock Chart Code Example

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');

Interactive Chart

The end-user experience is greatly enhanced by including a set of interactive features such as zooming and panning, crosshair, trackball, events, and selection.

Interactive Chart in JavaScript Stock Chart


Candle with volume in JavaScript Stock Chart

Candlestick with volume

JavaScript Candlestick Chart allows analyzing both price action and volume at a glance.


Multiple series

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.

Multiple series in JavaScript Stock Chart


Plot band in JavaScript Stock Chart

Plot band

In JavaScript Stcok Chart, you can draw special attention to any region of the chart or graph with the help of strip lines.


Range selector

Use the range selector to filter a date range for data that needs to be visualized in JavaScript Stock Chart.

Range selector in JavaScript Stock Chart


Period selector in JavaScript Stock Chart

Period selector

Use the period selector in JavaScript Stcok Chart to choose a range of data points at predetermined intervals with a single click.


Series type

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.

Series type in JavaScript Stock Chart


Legend in JavaScript Stock Chart

Legend

Legends provide additional information helpful in identifying individual data or series in a stock chart.


Indicators

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.

Indicators in JavaScript Stock Chart


Trendlines in JavaScript Stock Chart

Trendlines

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.


Export JavaScript Stock Charts to PDF documents or to image formats such as SVG, PNG, and JPEG as well as export chart data to XLSX and CSV formats in the client-side. Print the rendered stock charts and graphs directly from the browser.

Print and export in JavaScript Stock Chart


Axis type in Javascript Stock Chart

Axis type

Visualize data using different axis types like numeric, logarithmic, date-time, and date-time category. And this chart’s axis elements can be customized further to make an axis more readable.


Accessibility

Keyboard navigation in JavaScript Stock Chart

Keyboard navigation

Every element in JavaScript Stock Charts is keyboard accessible. Major features like tooltip, trackball, legend, collapse, zoom, and pan can be used through keyboard commands alone. No mouse interaction is required. This helps in creating highly accessible applications.

Accessibility and screen reader support in JavaScript Stock Chart

Screen reader

The JavaScript Stock Chart view has complete WAI-ARIA accessibility support. The Stock Chart UI includes high-contrast visual elements that help visually impaired people to have the best viewing experience. Also, valid UI descriptions are easily accessible through assistive technologies such as screen readers.

Show right-to-left language in JavaScript Stock Chart

Right to left (RTL)

Right-to-left rendering allows displaying the text and layout of the Stock Chart from right to left. This improves the user experience and accessibility for RTL languages.





Other supported frameworks

Stock Chart is also available in the Blazor, Angular,React, and Vue frameworks. Check out the Stock Chart for different platforms from the following links.

Supported browsers

The JavaScript Stock Chart works well with all modern web browsers such as Chrome, Firefox, Microsoft Edge, Safari, and Opera.

Supported browsers

80+ JAVASCRIPT UI CONTROLS

Frequently Asked Questions

The JavaScript Stock Chart with rich set of features offers the following:

  • Visualize and analyze stock data with candlestick, OHLC, HiLo Chart.
  • Interact and explore stock charts with features such as period selector, range selector, zoom and pan, crosshair, tooltip, trackball, and more.
  • Flexible UI customization of period and range selector with fluent APIs.
  • One of the best JavaScript Stock Chart in the market that offers feature-rich UI to interact with the software.
  • 10 Technical indicators and 4+ Financial Chart types with elegant animation.
  • Simple configuration and API.
  • Supports all modern browsers.
  • Mobile-touch friendly and responsive.
  • Expansive learning resources such as demos and documentation to learn quickly and get started with JavaScript Stock Chart.

You can find our JavaScript Stock Chart demo, which demonstrates how to render and configure the Stock Chart.

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, 5 or fewer developers, and 10 or fewer total employees.

A good place to start would be our comprehensive getting started documentation.

Our Customers Love Us

Having an excellent set of tools and a great support team, Syncfusion reduces customers’ development time.
Here are some of their experiences.

Rated by users across the globe

Transform your applications today by downloading our free evaluation version Download Free Trial

Awards

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.

Up arrow icon
Live Chat Icon For mobile