---
product: "AG Charts"
title: "Financial Charts - Configuration"
description: "Learn how to create Financial Charts with minimal configuration and customisations."
enterprise: true
framework: angular
version: "14.3.0"
related:
    - title: "Overview"
      url: "https://www.ag-grid.com/charts/angular/financial-charts/"
    - title: "Toolbar"
      url: "https://www.ag-grid.com/charts/angular/financial-charts-toolbar/"
    - title: "Range Buttons"
      url: "https://www.ag-grid.com/charts/angular/range-buttons/"
    - title: "Volume Profile"
      url: "https://www.ag-grid.com/charts/angular/financial-charts-volume-profile/"
llms: "https://www.ag-grid.com/charts/llms.txt"
---

# Financial Charts - Configuration

Learn how to create Financial Charts with minimal configuration and customisations.

## Default Configuration

#### Default Configuration

```ts
// Angular entry point file
import '@angular/compiler';
import { bootstrapApplication } from '@angular/platform-browser';

import { AppComponent } from './app.component';

bootstrapApplication(AppComponent);
```

[Live example: Default Configuration](https://www.ag-grid.com/charts/angular/financial-charts-configuration/examples/default-configuration/)

Financial Charts come pre-configured with built-in features – just add your data to produce the chart shown above.

```ts
import { Component } from '@angular/core';

import { AgFinancialCharts } from 'ag-charts-angular';
import { AgFinancialChartOptions } from 'ag-charts-enterprise';
import 'ag-charts-enterprise';

import { getData } from './data';

@Component({
    selector: 'my-app',
    standalone: true,
    imports: [AgFinancialCharts],
    template: `<ag-financial-charts [options]="options"></ag-financial-charts> `,
})
export class AppComponent {
    public options;

    constructor() {
        this.options = {
            data: getData(),
        };
    }
}
```

> **Note**
>
> This snippet assumes the supplied data includes 'date', 'open', 'high', 'low', 'close' and 'volume' (optional) keys.

For custom data keys, map your data properties to the appropriate [AgFinancialChartOptions](https://www.ag-grid.com/charts/angular/financial-charts-configuration/#reference-AgFinancialChartOptions) keys:

- `dateKey` : key for the date values.
- `openKey`: key for the open values.
- `highKey`: key for the high values.
- `lowKey`: key for the low values.
- `closeKey`: key for the close values.
- `volumeKey`: key for the volume values (optional).

## Customisation

### Chart Features

#### Chart Features

```ts
// Angular entry point file
import '@angular/compiler';
import { bootstrapApplication } from '@angular/platform-browser';

import { AppComponent } from './app.component';

bootstrapApplication(AppComponent);
```

[Live example: Chart Features](https://www.ag-grid.com/charts/angular/financial-charts-configuration/examples/chart-features/)

Financial Chart features can be enabled or disabled via the following properties:

```ts
const options: AgFinancialChartOptions = {
    // ...
    toolbar: true,
    rangeButtons: true,
    volume: true,
    statusBar: true,
    zoom: true,
    // disabled by default
    navigator: false,
    volumeProfile: { enabled: false /*other volume profile options*/ },
};
```

In this configuration:

- `navigator`: Enables the mini chart navigator for easy dataset navigation.
- `toolbar`: Shows the [Toolbar](https://www.ag-grid.com/charts/angular/financial-charts-toolbar/).
- `rangeButtons`: Provides range buttons for navigating different time periods.
- `volume`: Displays volume data on the chart.
- `statusBar`: Shows a status bar at the top of the chart when hovering over the chart series.
- `zoom`: Enables zoom functionality for detailed analysis of the data.
- `volumeProfile`: Shows a [Volume Profile](https://www.ag-grid.com/charts/angular/financial-charts-volume-profile/) of the volume traded at each price level.

### Chart Types

End users can use the [Chart Type Selection Tool](https://www.ag-grid.com/charts/angular/financial-charts-toolbar/#chart-type-selection) to choose a series type for visualising the data. However, this can also be done programmatically.

The default chart type is `candlestick`. To use a different chart type, set the `chartType` property.

#### Chart Types

```ts
// Angular entry point file
import '@angular/compiler';
import { bootstrapApplication } from '@angular/platform-browser';

import { AppComponent } from './app.component';

bootstrapApplication(AppComponent);
```

[Live example: Chart Types](https://www.ag-grid.com/charts/angular/financial-charts-configuration/examples/chart-types/)

```ts
const options: AgFinancialChartOptions = {
    // ...
    chartType: 'line', // Set to line
};
```

The chart type state can be saved, restored and programmatically initialised and modified, using the [Chart State API](https://www.ag-grid.com/charts/angular/api-state/).

The following chart types are supported:

- `candlestick`, `hollow-candlestick`, `ohlc`, `line`, `step-line`, `hlc`, `high-low`.

### Chart Styling

#### Chart Styling

```ts
// Angular entry point file
import '@angular/compiler';
import { bootstrapApplication } from '@angular/platform-browser';

import { AppComponent } from './app.component';

bootstrapApplication(AppComponent);
```

[Live example: Chart Styling](https://www.ag-grid.com/charts/angular/financial-charts-configuration/examples/chart-styling/)

Use the `theme` property in `AgFinancialChartOptions` to customise chart styles.

```ts
const options: AgFinancialChartOptions = {
    // ...
    theme: {
        palette: {
            up: { fill: '#F3A93C', stroke: '#A8492D' },
            down: { fill: '#1A00F4', stroke: '#75FBFD' },
        },
    },
};
```

In this configuration:

- `palette`: Specifies custom colours.
  - `up`: Colours for "rising values"
  - `down`: Colours for "falling values"

For additional customisation, use [Theme Override Options](https://www.ag-grid.com/charts/themes-api/) in the `theme` option.

> **Note**
>
> Financial Charts use the `ag-financial` and `ag-financial-dark` themes.

## API Reference

#### Options

| Property | Type | Default | Description |
| --- | --- | --- | --- |
| theme | AgChartTheme \| AgChartThemeName |  | A predefined theme name or an object containing theme overrides.   See: [Themes Reference](/themes-api/) |
| listeners | AgAxesChartListeners |  | A map of event names to event listeners. |
| listeners.crossLineClick | Listener |  | The listener to call when a Cross Line on any axis is clicked. |
| listeners.crossLineDoubleClick | Listener |  | The listener to call when a Cross Line on any axis is double-clicked. |
| listeners.seriesNodeClick | Listener |  | The listener to call when a node (marker, column, bar, tile or a pie sector) in any series is clicked. Useful for a chart containing multiple series. |
| listeners.seriesNodeDoubleClick | Listener |  | The listener to call when a node (marker, column, bar, tile or a pie sector) in any series is double-clicked. Useful for a chart containing multiple series. |
| listeners.axisClick | Listener |  | The listener to call when any axis in the chart is clicked. Useful for a chart containing multiple axes. |
| listeners.axisDoubleClick | Listener |  | The listener to call when any axis in the chart is double-clicked. Useful for a chart containing multiple axes. |
| listeners.captionClick | Listener |  | The listener to call when any caption (title, subtitle or footnote) in the chart is clicked. |
| listeners.captionDoubleClick | Listener |  | The listener to call when any caption (title, subtitle or footnote) in the chart is double-clicked. |
| listeners.seriesVisibilityChange | Listener |  | The listener to call when a series visibility is changed. |
| listeners.activeChange | Listener |  | The listener to call when the active state (highlight/tooltip) is changed. |
| listeners.selectionChange | Listener |  | The listener to call when data selection is changed |
| listeners.collapsedChange | Listener |  | The listener to call when collapsed items are changed. |
| listeners.click | Listener |  | The listener to call when the chart is clicked. |
| listeners.doubleClick | Listener |  | The listener to call when the chart is double-clicked. |
| listeners.annotations | Listener |  | The listener to call when the annotations are changed. |
| listeners.zoom | Listener |  | The listener to call when the zoom is changed. |
| data | DatumDefault[] |  | The data to render the chart from. If this is not specified, it must be set on individual series instead. |
| dataIdKey | DatumKey |  | The key of the property on each datum that contains its unique identifier. When specified, transactions will match items by this field instead of by object reference. The values of this field must be unique across the dataset. |
| container | HTMLElement \| null |  | The element to place the rendered chart into. |
| initialState | AgInitialStateOptions |  | The initial state of the chart. This must be a serialisable value. |
| initialState.active | AgActiveState |  | The initial picked item. |
| initialState.active.activeItem | AgActiveItemState |  | The active series datum shape. If the entire series is active, then `itemId` will be set to `undefined`. |
| initialState.active.activeItem.type (required) | 'series-node' \| 'legend' |  | Where the item activation originates from. |
| initialState.active.activeItem.seriesId (required) | string |  | The unique identifier of the series that this picked datum belongs to. |
| initialState.active.activeItem.itemId (required) | string \| number |  | The unique identifier of the picked datum. |
| initialState.active.frozen | boolean |  | The frozen state. When the picked item is frozen, user interactions with the chart will be ignored and not updated the currently picked item. |
| initialState.annotations | AgAnnotation[] |  | The initial set of annotations to display on the chart. |
| initialState.chartType | AgInitialStateChartType |  | The initial chart type. |
| initialState.collapsed | Array<string \| number> |  | The initial collapsed datums by id, for Organization Charts. |
| initialState.legend | AgInitialStateLegendOptions[] |  | The initial legend series visibility state. |
| initialState.legend.visible (required) | boolean |  | Whether the legend item is currently enabled or not. |
| initialState.legend.seriesId | string |  | Series or item id |
| initialState.legend.itemId | string |  | Legend item id - usually yKey value for cartesian series. |
| initialState.legend.legendItemName | string |  | Human-readable description of the y-values. If supplied, matching items with the same value will be toggled together. |
| initialState.legendPagination | number |  | The initial legend pagination page as a zero-based index, restored on a best-effort like-for-like basis as the page count depends on the render size. |
| initialState.zoom | AgInitialStateZoomOptions |  | The initial zoom state. |
| initialState.zoom.rangeX | AgInitialStateZoomRange |  | The initial zoom range for the x-axis. |
| initialState.zoom.rangeX.start | AgStateSerializableDate \| AgStateSerializableBigInt \| AgStateSerializableGroupingValueType \| number |  | The start value of the zoom range. A number, or a serialised value object. |
| initialState.zoom.rangeX.end | AgStateSerializableDate \| AgStateSerializableBigInt \| AgStateSerializableGroupingValueType \| number |  | The end value of the zoom range. A number, or a serialised value object. |
| initialState.zoom.rangeY | AgInitialStateZoomRange |  | The initial zoom range for the y-axis. |
| initialState.zoom.rangeY.start | AgStateSerializableDate \| AgStateSerializableBigInt \| AgStateSerializableGroupingValueType \| number |  | The start value of the zoom range. A number, or a serialised value object. |
| initialState.zoom.rangeY.end | AgStateSerializableDate \| AgStateSerializableBigInt \| AgStateSerializableGroupingValueType \| number |  | The end value of the zoom range. A number, or a serialised value object. |
| initialState.zoom.ratioX | AgInitialStateZoomRatio |  | The initial zoom ratio for the x-axis. |
| initialState.zoom.ratioX.start | Ratio |  | The start ratio of the zoom range. |
| initialState.zoom.ratioX.end | Ratio |  | The end ratio of the zoom range. |
| initialState.zoom.ratioY | AgInitialStateZoomRatio |  | The initial zoom ratio for the y-axis. |
| initialState.zoom.ratioY.start | Ratio |  | The start ratio of the zoom range. |
| initialState.zoom.ratioY.end | Ratio |  | The end ratio of the zoom range. |
| initialState.zoom.autoScaledAxes | AgAutoScaledAxes |  | Axes that are zoomed by the auto scaling functionality. |
| width | PixelSize |  | The width of the chart in pixels. |
| height | PixelSize |  | The height of the chart in pixels. |
| minHeight | PixelSize | 300 | Sets the minimum height of the chart. Ignored if `height` is specified. |
| minWidth | PixelSize | 300 | Sets the minimum width of the chart. Ignored if `width` is specified. |
| title | AgChartCaptionOptions |  | Configuration for the title shown at the top of the chart. |
| title.enabled | boolean |  | Whether the text should be shown. |
| title.text | TextValue \| ContentSegment[] |  | The text to display. Plain text, or an array of segments for rich content. |
| title.textAlign | 'left' \| 'center' \| 'right' \| 'start' \| 'end' |  | Horizontal position of the text. |
| title.fontStyle | FontStyle |  | The font style to use for the text. |
| title.fontWeight | FontWeight |  | The font weight to use for the text. |
| title.fontSize | FontSize |  | The font size in pixels to use for the text. |
| title.lineHeight | PixelSize |  | The line height in pixels to use for the text. Defaults to the natural line height of the font. |
| title.fontFamily | FontFamily \| GoogleFontFamily \| Array<FontFamily \| GoogleFontFamily> |  | The font family to use for the text. A single family name, or an array of names used as fallbacks. |
| title.color | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor |  | The colour to use for the text. A colour string, or a theme-colour reference object. |
| title.spacing | PixelSize |  | Spacing added to help position the text. |
| title.maxWidth | PixelSize |  | Used to constrain the width of the title before text is wrapped or truncated. |
| title.maxHeight | PixelSize |  | Used to constrain the height of the title before text is truncated. |
| title.minimumFontSize | FontSize |  | If the text does not fit within the space available to it, setting this will allow the text to pick a font size between its normal `fontSize` and `minimumFontSize` to fit. The text is only truncated when it still does not fit at `minimumFontSize`. |
| title.wrapping | 'never' \| 'always' \| 'hyphenate' \| 'on-space' | 'on-space' | Text wrapping strategy for long text. - `'always'` will always wrap text to fit within the `maxWidth`. - `'hyphenate'` is similar to `'always'`, but inserts a hyphen (`-`) if forced to wrap in the middle of a word. - `'on-space'` will only wrap on white space: spaces, tabs and zero-width spaces (`\u200B`), but not on a non-breaking space (`\u00A0`). - `'never'` disables text wrapping. |
| title.tooltip | AgCaptionTooltipOptions |  | Configuration for the caption tooltip shown on hover. |
| title.tooltip.visible | 'auto' \| 'always' \| 'never' |  | Controls when the caption tooltip is shown. - `'auto'` — only when text is truncated. - `'always'` — on every hover. - `'never'` — tooltip is disabled.  Default: `'always'` when `text` or `renderer` is provided, `'auto'` otherwise. |
| title.tooltip.text | string |  | Static text to display in the tooltip. Overrides the default caption text. |
| title.tooltip.renderer | Renderer |  | Function to produce tooltip content. Return a plain string or an HTML string. Takes precedence over `text`.  Returning `undefined` falls back to `text` (or the caption's own text). Returning an empty string suppresses the tooltip. |
| title.listeners | AgCaptionListeners |  | A map of event names to event listeners. |
| title.listeners.click | Listener |  | The listener to call when the caption is clicked. |
| title.listeners.doubleClick | Listener |  | The listener to call when the caption is double-clicked. |
| title.border | BorderOptions |  | Stroke options for the box border. |
| title.border.enabled | boolean |  | Whether the associated elements and properties should be used in the chart. |
| title.border.stroke | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor |  | The colour for the stroke. |
| title.border.strokeWidth | PixelSize |  | The width of the stroke in pixels. |
| title.border.strokeOpacity | Opacity |  | The opacity of the stroke colour. |
| title.cornerRadius | PixelSize |  | Apply rounded corners to the label box. |
| title.padding | PixelSize \| PaddingOptions |  | Distance between the label text and the border. A number applies uniform padding; an object sets each side. |
| title.fill | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor \| AgGradientColor \| AgPatternColor \| AgImageFill |  | The colour for filling shapes. A colour string, or an object for a gradient, pattern, or image fill. |
| title.fillOpacity | Opacity |  | The opacity of the fill colour. |
| dataSource | AgDataSourceOptions |  | Configuration for asynchronously loaded data. |
| dataSource.getData (required) | Function |  | Asynchronous callback to load data into the chart. |
| formatter | FunctionFormatter \| Partial |  | Global formatter configuration. |
| enableRtl | boolean |  | Set to `true` to render the chart in right-to-left mode. If not specified, the chart will detect the `dir` attribute on the container or its ancestors. |
| chartType | 'candlestick' \| 'hollow-candlestick' \| 'ohlc' \| 'line' \| 'step-line' \| 'hlc' \| 'high-low' | 'candlestick' | Series type used for the OHLC data. |
| dateKey | string | 'date' | The key used to retrieve x-values from the data. |
| openKey | string | 'open' | The key used to retrieve 'open' values from the data. |
| highKey | string | 'high' | The key used to retrieve 'high' values from the data. |
| lowKey | string | 'low' | The key used to retrieve 'low' values from the data. |
| closeKey | string | 'close' | The key used to retrieve 'close' values from the data. |
| volumeKey | string | 'volume' | The key used to retrieve 'volume' values from the data. |
| navigator | boolean | false | Whether to show the Navigator and mini-chart beneath the main chart. |
| volume | boolean | true | Whether to show the volume series at the bottom of the chart. |
| volumeProfile | AgVolumeProfileOptions |  | Configuration for a Volume Profile, showing the traded volume at each price level as horizontal bars against the price axis. |
| volumeProfile.data (required) | DatumDefault[] |  | The price levels to display, supplied separately from the chart's own `data`. |
| volumeProfile.upKey (required) | string |  | The key used to retrieve the up volume of each level from the data. |
| volumeProfile.downKey (required) | string |  | The key used to retrieve the down volume of each level from the data. |
| volumeProfile.priceKey | string | 'price' | The key used to retrieve the price of each level from the data. |
| volumeProfile.up | AgBarSeriesStyle |  | Styling for the bars showing the up volume of each level. |
| volumeProfile.up.cornerRadius | PixelSize |  | Apply rounded corners to each bar. |
| volumeProfile.up.fill | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor \| AgGradientColor \| AgPatternColor \| AgImageFill |  | The colour for filling shapes. A colour string, or an object for a gradient, pattern, or image fill. |
| volumeProfile.up.fillOpacity | Opacity |  | The opacity of the fill colour. |
| volumeProfile.up.stroke | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor |  | The colour for the stroke. |
| volumeProfile.up.strokeWidth | PixelSize |  | The width of the stroke in pixels. |
| volumeProfile.up.strokeOpacity | Opacity |  | The opacity of the stroke colour. |
| volumeProfile.up.lineDash | PixelSize[] |  | An array specifying the length in pixels of alternating dashes and gaps. |
| volumeProfile.up.lineDashOffset | PixelSize |  | The initial offset of the dashed line in pixels. |
| volumeProfile.down | AgBarSeriesStyle |  | Styling for the bars showing the down volume of each level. |
| volumeProfile.down.cornerRadius | PixelSize |  | Apply rounded corners to each bar. |
| volumeProfile.down.fill | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor \| AgGradientColor \| AgPatternColor \| AgImageFill |  | The colour for filling shapes. A colour string, or an object for a gradient, pattern, or image fill. |
| volumeProfile.down.fillOpacity | Opacity |  | The opacity of the fill colour. |
| volumeProfile.down.stroke | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor |  | The colour for the stroke. |
| volumeProfile.down.strokeWidth | PixelSize |  | The width of the stroke in pixels. |
| volumeProfile.down.strokeOpacity | Opacity |  | The opacity of the stroke colour. |
| volumeProfile.down.lineDash | PixelSize[] |  | An array specifying the length in pixels of alternating dashes and gaps. |
| volumeProfile.down.lineDashOffset | PixelSize |  | The initial offset of the dashed line in pixels. |
| volumeProfile.placement | 'left' \| 'right' | 'right' | The edge of the series area the bars extend from. |
| volumeProfile.widthRatio | Ratio | 0.5 | The length of the longest bar, as a ratio of the series area width. |
| volumeProfile.totalSegment | AgVolumeProfileTotalSegmentOptions |  | A fixed-width column showing each level's total volume, set between the price axis and the up and down bars. |
| volumeProfile.totalSegment.fill | CssColor |  | The fill of each level's block. |
| volumeProfile.totalSegment.width | PixelSize |  | The width of the segment in pixels. |
| volumeProfile.totalSegment.minWidth | PixelSize | 60 | The minimum width of the segment in pixels, when `width` is not set. |
| volumeProfile.totalSegment.gap | PixelSize | 2 | The space between the segment and the up and down bars, in pixels. |
| volumeProfile.totalSegment.label | AgVolumeProfileTotalSegmentLabelOptions |  | The label showing each level's total volume. |
| volumeProfile.totalSegment.label.formatter | Function |  | A function that converts a level's total volume into the text to display. Without one, the value is abbreviated with a suffix and shown to one decimal place, such as `1.2K` or `3.0M`. |
| volumeProfile.totalSegment.label.enabled | boolean |  | Whether the associated elements and properties should be used in the chart. |
| volumeProfile.totalSegment.label.color | CssColor \| AgColorRef \| AgColorRefMixOnto \| AgColorRefMixOntoColor |  | The colour for text elements. A colour string, or a theme-colour reference object. |
| volumeProfile.totalSegment.label.fontSize | FontSize |  | The size of the font in pixels for text elements. |
| volumeProfile.totalSegment.label.lineHeight | PixelSize |  | The line height in pixels for text elements. Defaults to the natural line height of the font. |
| volumeProfile.totalSegment.label.fontFamily | FontFamily |  | The font family for text elements. |
| volumeProfile.totalSegment.label.fontStyle | FontStyle |  | The style to use for text elements. |
| volumeProfile.totalSegment.label.fontWeight | FontWeight |  | The font weight to use for text elements. |
| volumeProfile.totalSegment.enabled | boolean |  | Whether the associated elements and properties should be used in the chart. |
| volumeProfile.enabled | boolean |  | Whether the associated elements and properties should be used in the chart. |
| tickSize | number |  | The height of each Volume Profile price level, in price units. If not set, the smallest gap between the prices in `volumeProfile.data` is used. |
| rangeButtons | boolean | true | Whether to show the range buttons. |
| statusBar | boolean | true | Whether to show the status bar. |
| toolbar | boolean | true | Whether the toolbar is enabled. |
| zoom | boolean | true | Whether Zoom is enabled. |
| sync | boolean | false | Whether to enable chart synchronization. |
