---
product: "AG Charts"
title: "Combination Charts"
description: "Create Vue Combination Charts by combining two or more series types for more flexible data visualisations. Add a secondary axis to handle different scales."
framework: vue
version: "14.2.0"
related:
    - title: "Bar"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/bar-series/"
    - title: "Line"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/line-series/"
    - title: "Area"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/area-series/"
    - title: "Scatter"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/scatter-series/"
    - title: "Bubble"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/bubble-series/"
    - title: "Pie"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/pie-series/"
    - title: "Donut"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/donut-series/"
    - title: "Box Plot"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/box-plot-series/"
    - title: "Candlestick"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/candlestick-series/"
    - title: "OHLC"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/ohlc-series/"
    - title: "Heatmap"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/heatmap-series/"
    - title: "Histogram"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/histogram-series/"
    - title: "Nightingale"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/nightingale-series/"
    - title: "Radar Area"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/radar-area-series/"
    - title: "Radar Line"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/radar-line-series/"
    - title: "Radial Bar"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/radial-bar-series/"
    - title: "Radial Column"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/radial-column-series/"
    - title: "Range Area"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/range-area-series/"
    - title: "Range Bar"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/range-bar-series/"
    - title: "Waterfall"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/waterfall-series/"
    - title: "Sunburst"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/sunburst-series/"
    - title: "Treemap"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/treemap-series/"
    - title: "Sankey"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/sankey-series/"
    - title: "Chord"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/chord-series/"
    - title: "Funnel"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/funnel-series/"
    - title: "Cone Funnel"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/cone-funnel-series/"
    - title: "Pyramid"
      url: "https://www.ag-grid.com/charts/archive/14.2.0/vue/pyramid-series/"
llms: "https://www.ag-grid.com/charts/archive/14.2.0/llms.txt"
---

# Combination Charts

A combination chart combines two or more series types allowing for flexible data visualisations. They are ideal for making visual comparisons of different sets of data in a single chart.

## Combination Series Types

It is possible to create Combination Charts using the following series types: `bar`, `line`, `area`, `scatter` and `bubble`.

The `type` property must be specified explicitly on each individual series object in the `series` options array, as shown below:

```js
{
    series: [
        {
            type: 'bar', // use 'bar' series
            xKey: 'year',
            yKey: 'men',
            // ...other series options
        },
        {
            type: 'line', // use 'line' series
            xKey: 'year',
            yKey: 'portions',
            // ...other series options
        },
    ],
}
```

The snippet above shows the configuration required for a combination chart consisting of a `bar` and `line` series.

The example below demonstrates two common combination chart types. You can switch between these two combination chart types using the buttons above the chart. Please note:

- Series are rendered according to the order in which they are added in the `series` array.
- The area and line series are plotted on a [Secondary Axis](https://www.ag-grid.com/charts/archive/14.2.0/vue/axes-secondary/) with a different scale.

#### Combination Charts

```ts
import { createApp, defineComponent, ref } from "vue";
import { AgCharts } from "ag-charts-vue3";
import type { AgChartOptions } from "ag-charts-types";
import {
  AreaSeriesModule,
  BarSeriesModule,
  CategoryAxisModule,
  LegendModule,
  LineSeriesModule,
  ModuleRegistry,
  NumberAxisModule,
} from "ag-charts-community";
import { getData } from "./data";
import clone from "clone";

const WOMEN = {
  type: "bar",
  xKey: "year",
  yKey: "women",
  yName: "Women",
  grouped: true,
};

const MEN = {
  type: "bar",
  xKey: "year",
  yKey: "men",
  yName: "Men",
  grouped: true,
};

const PORTIONS = {
  type: "line",
  xKey: "year",
  yKey: "portions",
  yName: "Portions",
  yKeyAxis: "ySecondary",
};

const BAR_AND_LINE = [
  { ...WOMEN, type: "bar" },
  { ...MEN, type: "bar" },
  { ...PORTIONS, type: "line" },
];

const AREA_AND_BAR = [
  { ...PORTIONS, type: "area" },
  { ...WOMEN, type: "bar" },
  { ...MEN, type: "bar" },
];

ModuleRegistry.registerModules([
  AreaSeriesModule,
  BarSeriesModule,
  CategoryAxisModule,
  LineSeriesModule,
  NumberAxisModule,
  LegendModule,
]);

const ChartExample = defineComponent({
  template: `
    <div class="example-controls">
      <div class="controls-row">
        <div class="button-group" role="group" aria-label="Combination Type">
          <input type="radio" id="combination-type-area-bar" name="combination-type" value="area-bar" v-on:change="combinationTypeChange($event)">
            <label for="combination-type-area-bar">Area &amp; Bar</label>
            <input type="radio" id="combination-type-bar-line" name="combination-type" value="bar-line" checked="" v-on:change="combinationTypeChange($event)">
              <label for="combination-type-bar-line">Bar &amp; Line</label>
            </div>
          </div>
        </div>
        <ag-charts
          :options="options"
        />
  `,
  components: {
    "ag-charts": AgCharts,
  },
  setup(props) {
    const options = ref<AgCartesianChartOptions>({
      data: getData(),
      title: {
        text: "Fruit & Vegetable Consumption",
      },
      series: BAR_AND_LINE,
      axes: {
        y: {
          type: "number",
          position: "left",
          title: {
            text: "Adults Who Eat 5 A Day (%)",
          },
        },
        ySecondary: {
          type: "number",
          position: "right",
          title: {
            text: "Portions Consumed (Per Day)",
          },
        },
      },
    });

    const combinationTypeChange = (event) => {
      const optionsCopy = clone(options.value);

      const type = event.target.value;
      optionsCopy.series = type === "bar-line" ? BAR_AND_LINE : AREA_AND_BAR;

      options.value = optionsCopy;
    };

    return {
      options,
      combinationTypeChange,
    };
  },
});

createApp(ChartExample).mount("#app");
```

[Live example: Combination Charts](https://www.ag-grid.com/charts/archive/14.2.0/vue3/combination-series/examples/combination/)

## Combination Chart Examples

See more Combination Chart examples in the [AG Charts Gallery](https://www.ag-grid.com/charts/archive/14.2.0/gallery/#combination).

- [Bar And Line Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/bar-line-combination/)
- [Histogram And Scatter Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/histogram-scatter-combination/)
- [Horizontal Range Bar And Scatter Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/horizontal-range-bar-scatter-combination/)
- [Radar Line, Radar Area And Nightingale Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/radar-line-radar-area-nightingale-combination/)
- [Grouped Category Axis Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/grouped-bar-line-combination/)
- [Step Interpolation Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/step-interpolation-combination/)
- [Bar, Line And Area Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/grouped-category-combination/)
- [Stacked Bar And Area Combination Chart Example](https://www.ag-grid.com/charts/archive/14.2.0/gallery/stacked-bar-area-combination/)
