Vertical Chart in EJ2 TypeScript control

28 Sep 20232 minutes to read

Vertical chart

In EJ2 chart, you can draw a chart in vertical manner by changing orientation of the axis. All series types support this feature.
You can use isTransposed property in chart to render a chart in vertical manner.

import { Chart, SplineSeries, Category } from '@syncfusion/ej2-charts';
import { columnData } from './datasource.ts';
Chart.Inject(SplineSeries, Category);

let chart: Chart = new Chart({
    primaryXAxis: {
       valueType: 'Category'
        dataSource: columnData,
        xName: 'country', yName: 'gold',
        type: 'Spline',
    isTransposed: true,

}, '#element');
<!DOCTYPE html>
<html lang="en">

    <title>EJ2 Animation</title>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="description" content="Typescript UI Controls" />
    <meta name="author" content="Syncfusion" />
    <link href="index.css" rel="stylesheet" />
    <script src=""></script>
    <script src="systemjs.config.js"></script>
<script src="" type ="text/javascript"></script>

    <div id='loader'>Loading....</div>
    <div id='container'>
        <div id='element'></div>


See Also