100% Stacked column Chart in Vue Component

7 Apr 202524 minutes to read

100% Stacked column

To render a 100% stacked column series in your chart, you need to follow a few steps to configure it correctly. Here’s a concise guide on how to do this:

  • Set the series type: Define the series type as StackingColumn100 in your chart configuration. This indicates that the data should be represented as a 100% stacked column chart, with segments that show the percentage contribution of each part.

  • Inject the StackingColumnSeries module: Use the provide: { chart: [StackingColumnSeries]} method to inject the StackingColumnSeries module into your chart. This step is essential, as it ensures that the necessary functionalities for rendering the 100% stacked column series are available in your chart.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Binding data with series

You can bind data to the chart using the dataSource property within the series configuration. This allows you to connect a JSON dataset or remote data to your chart. To display the data correctly, map the fields from the data to the chart series xName and yName properties.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Series customization

The following properties can be used to customize the 100% stacked column series.

Fill

The fill property determines the color applied to the series.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' fill='#2F4F4F'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' fill='#556B2F'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' fill='#8B0000'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' fill='#00008B'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' fill='#2F4F4F'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' fill='#556B2F'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' fill='#8B0000'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' fill='#00008B'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

The fill property can be used to apply a gradient color to the 100% stacked column series. By configuring this property with gradient values, you can create a visually appealing effect in which the color transitions smoothly from one shade to another.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' fill='url(#gradient1)'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' fill='url(#gradient2)'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' fill='url(#gradient3)'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' fill='url(#gradient4)'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' fill='url(#gradient1)'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' fill='url(#gradient2)'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' fill='url(#gradient3)'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' fill='url(#gradient4)'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Opacity

The opacity property specifies the transparency level of the fill. Adjusting this property allows you to control how opaque or transparent the fill color of the series appears.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' opacity=0.7> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' opacity=0.7> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' opacity=0.7> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' opacity=0.7> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' opacity=0.7> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' opacity=0.7> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' opacity=0.7> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' opacity=0.7> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Border

Use the border property to customize the width, color and dash array of the series border.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :border='border'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' :border='border1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :border='border2'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' :border='border3'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';
const border = { width: 2, color: '#ff4251', dashArray: "5,5" };
const border1 = { width: 2, color: '#66BDB7', dashArray: "5,5" };
const border2 = { width: 2, color: '#794F1B', dashArray: "5,5" };
const border3 = { width: 2, color: '#1a9a6f', dashArray: "5,5" };

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :border='border'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' :border='border1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :border='border2'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' :border='border3'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth',
      border: { width: 2, color: '#ff4251', dashArray: "5,5" },
      border1: { width: 2, color: '#66BDB7', dashArray: "5,5" },
      border2: { width: 2, color: '#794F1B', dashArray: "5,5" },
      border3: { width: 2, color: '#1a9a6f', dashArray: "5,5" }
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

100% Cylindrical stacked column chart

To render a 100% cylindrical stacked column chart, set the columnFacet property to Cylinder in the chart series. This property transforms the regular 100% stacked columns into cylindrical shapes, enhancing the visual representation of the data.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' columnFacet='Cylinder'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' columnFacet='Cylinder'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' columnFacet='Cylinder'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' columnFacet='Cylinder'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' columnFacet='Cylinder'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany' columnFacet='Cylinder'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' columnFacet='Cylinder'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' columnFacet='Cylinder'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Empty points

Data points with null or undefined values are considered empty. Empty data points are ignored and not plotted on the chart.

Mode

Use the mode property to define how empty or missing data points are handled in the series. The default mode for empty points is Gap.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :emptyPointSettings='emptyPointSettings'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :emptyPointSettings='emptyPointSettings1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: null, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: null, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';
const emptyPointSettings = {
  mode: 'Zero'
};
const emptyPointSettings1 = {
  mode: 'Average'
};

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :emptyPointSettings='emptyPointSettings'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :emptyPointSettings='emptyPointSettings1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: null, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: null, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth',
      emptyPointSettings: {
        mode: 'Zero'
      },
      emptyPointSettings1: {
        mode: 'Average'
      }
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Fill

Use the fill property to customize the fill color of empty points in the series.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :emptyPointSettings='emptyPointSettings'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :emptyPointSettings='emptyPointSettings1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: null, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: null, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';
const emptyPointSettings = {
  mode: 'Zero'
};
const emptyPointSettings1 = {
  mode: 'Average',
  fill: 'red'
};

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :emptyPointSettings='emptyPointSettings'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :emptyPointSettings='emptyPointSettings1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: null, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: null, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth',
      emptyPointSettings: {
        mode: 'Zero'
      },
      emptyPointSettings1: {
        mode: 'Average',
        fill: 'red'
      }
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Border

Use the border property to customize the width and color of the border for empty points.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :emptyPointSettings='emptyPointSettings'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :emptyPointSettings='emptyPointSettings1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: null, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: null, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';
const emptyPointSettings = {
  mode: 'Zero'
};
const emptyPointSettings1 = {
  mode: 'Average',
  fill: 'red',
  border: { 
    width: 2, 
    color: 'green' 
  }
};

provide('chart', [StackingColumnSeries, DateTime, Legend]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK' :emptyPointSettings='emptyPointSettings'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France' :emptyPointSettings='emptyPointSettings1'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: null, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: null, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth',
      emptyPointSettings: {
        mode: 'Zero'
      },
      emptyPointSettings1: {
        mode: 'Average',
        fill: 'red',
        border: { 
          width: 2, 
          color: 'green' 
        }
      }
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Point render

The pointRender event allows you to customize each data point before it is rendered on the chart.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

const pointRender = function (args) {
  if (args.point.series.index % 2 !== 0) {
      args.fill = '#ff6347';
  } 
  else {
      args.fill = '#009cb8';
  }
};

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  },
  methods: {
    pointRender: function (args) {
      if (args.point.series.index % 2 !== 0) {
          args.fill = '#ff6347';
      } 
      else {
          args.fill = '#009cb8';
      }
    }
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Corner radius

The cornerRadius property in the chart series is used to customize the corner radius for bar series. This allows you to create bars with rounded corners, giving your chart a more polished appearance. You can customize each corner of the bars using the topLeft, topRight, bottomLeft, and bottomRight properties.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' :cornerRadius = 'cornerRadius'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';
const cornerRadius = { topRight: 10, topLeft: 10 };
provide('chart', [StackingColumnSeries, DateTime, Legend]);

const pointRender = function (args) {
  if (args.point.series.index % 2 !== 0) {
      args.fill = '#ff6347';
  } 
  else {
      args.fill = '#009cb8';
  }
};

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy' :cornerRadius = 'cornerRadius'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      cornerRadius: { topRight: 10, topLeft: 10 },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  },
  methods: {
    pointRender: function (args) {
      if (args.point.series.index % 2 !== 0) {
          args.fill = '#ff6347';
      } 
      else {
          args.fill = '#009cb8';
      }
    }
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Point corner radius

We can customize the corner radius for individual points in the chart series using the pointRender event by setting the cornerRadius property in its event argument.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

const pointRender = function (args) {
  if (args.point.index === 0 && args.point.series.index === 3) {
    args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
  }
  if (args.point.index === 3 && args.point.series.index === 3) {
    args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
  }
  if (args.point.index === 4 && args.point.series.index === 3) {
    args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
  }
  if (args.point.index === 6 && args.point.series.index === 3) {
    args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
  }
};

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  },
  methods: {
    pointRender: function (args) {
      if (args.point.index === 0 && args.point.series.index === 3) {
        args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
      }
      if (args.point.index === 3 && args.point.series.index === 3) {
        args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
      }
      if (args.point.index === 4 && args.point.series.index === 3) {
        args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
      }
      if (args.point.index === 6 && args.point.series.index === 3) {
        args.cornerRadius = { topLeft: 10, bottomLeft: 0, topRight: 10, bottomRight: 0 };
      }
    }
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Events

Series render

The seriesRender event allows you to customize series properties, such as data, fill, and name, before they are rendered on the chart.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :seriesRender='seriesRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script setup>
import { provide } from "vue";
import { ChartComponent as EjsChart, SeriesCollectionDirective as ESeriesCollection, SeriesDirective as ESeries, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
  { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
  { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
  { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
  { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
  { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
  { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
];
const primaryXAxis = {
  valueType: 'DateTime',
  title: 'Years',
  interval: 1,
  labelFormat: 'y'
};
const primaryYAxis = {
  title: 'GDP (%) Per Annum',
  rangePadding: 'None',
  labelFormat: '{value}%'
};
const title = 'Gross Domestic Product Growth';

provide('chart', [StackingColumnSeries, DateTime, Legend]);

const seriesRender = function (args) {
  if (args.series.index === 0) {
      args.fill = '#ff4251';
  }
  else if (args.series.index === 1) {
      args.fill = '#4C4C4C';
  }
  else if (args.series.index === 2) {
      args.fill = '#794F1B';
  }
  else if (args.series.index === 3) {
      args.fill = '#1a9a6f';
  }
};

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :seriesRender='seriesRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y' name='UK'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y1' name='Germany'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y2' name='France'> </e-series>
        <e-series :dataSource='seriesData' type='StackingColumn100' xName='x' yName='y3' name='Italy'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StackingColumnSeries, DateTime, Legend } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: new Date(2006, 0, 1), y: 900, y1: 190, y2: 250, y3: 150 },
        { x: new Date(2007, 0, 1), y: 544, y1: 226, y2: 145, y3: 120 },
        { x: new Date(2008, 0, 1), y: 880, y1: 194, y2: 190, y3: 115 },
        { x: new Date(2009, 0, 1), y: 675, y1: 250, y2: 220, y3: 125 },
        { x: new Date(2010, 0, 1), y: 765, y1: 222, y2: 225, y3: 132 },
        { x: new Date(2011, 0, 1), y: 679, y1: 181, y2: 135, y3: 137 },
        { x: new Date(2012, 0, 1), y: 770, y1: 128, y2: 152, y3: 110 }
      ],
      primaryXAxis: {
        valueType: 'DateTime',
        title: 'Years',
        interval: 1,
        labelFormat: 'y'
      },
      primaryYAxis: {
        title: 'GDP (%) Per Annum',
        rangePadding: 'None',
        labelFormat: '{value}%'
      },
      title: 'Gross Domestic Product Growth'
    };
  },
  provide: {
    chart: [StackingColumnSeries, DateTime, Legend]
  },
  methods: {
    seriesRender: function (args) {
      if (args.series.index === 0) {
          args.fill = '#ff4251';
      }
      else if (args.series.index === 1) {
          args.fill = '#4C4C4C';
      }
      else if (args.series.index === 2) {
          args.fill = '#794F1B';
      }
      else if (args.series.index === 3) {
          args.fill = '#1a9a6f';
      }
    }
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

See also