We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback


Overview

Vue Stacked line charts are charts with Y values stacked over one another in the series order. Shows the relation between individual values to the total sum of the points. overview


Marker

Marks data points with built-in shapes such as circles, rectangles, ellipses, vertical lines, horizontal lines, diamonds, triangles, and pentagons. In addition to these shapes, use images to make the point more attractive.

marker


Data label

Show information about data points with data labels. Add a template to display data labels with any HTML element such as images, DIV, and spans for data to be more informative.

datalabel


Multiple axes

Use multiple axes to plot different data sets that widely vary from one other.

multiple axes


Customization

Customize the look and feel of the stacked line chart using built-in APIs.

dashed line


Code snippet

<template>
    <div id="app">
         <ejs-chart id="container" :primaryXAxis='primaryXAxis'>
            <e-series-collection>
                <e-series :dataSource="seriesData" type="StackingLine" xName="x" yName="y"
                name="John" width="2" dashArray="5,1" :marker="marker"></e-series>
            <e-series :dataSource="seriesData" type="StackingLine" xName="x" yName="y1"
                name="John" width="2" dashArray="5,1" :marker="marker"></e-series>
            <e-series :dataSource="seriesData" type="StackingLine" xName="x" yName="y2"
                name="John" width="2" dashArray="5,1" :marker="marker"></e-series>
            <e-series :dataSource="seriesData" type="StackingLine" xName="x" yName="y3"
                name="John" width="2" dashArray="5,1" :marker="marker"></e-series>
            </e-series-collection>
        </ejs-chart>
    </div>
</template>
<script>
import { ChartPlugin, StackingLineSeries, Category } from "@syncfusion/ej2-charts";
Vue.use(ChartPlugin);
export default {
  data() {
    return {
      seriesData:  [
        { x: "Food", y: 90, y1: 40, y2: 70, y3: 120 },
        { x: "Transport", y: 80, y1: 90, y2: 110, y3: 70 },
        { x: "Medical", y: 50, y1: 80, y2: 120, y3: 50 },
        { x: "Clothes", y: 70, y1: 30, y2: 60, y3: 180 },
        { x: "Personal Care", y: 30, y1: 80, y2: 80, y3: 30 },
        { x: "Books", y: 10, y1: 40, y2: 30, y3: 270 },
        { x: "Fitness", y: 100, y1: 30, y2: 70, y3: 40 },
        { x: "Electricity", y: 55, y1: 95, y2: 55, y3: 75 },
        { x: "Tax", y: 20, y1: 50, y2: 40, y3: 65 },
        { x: "Pet Care", y: 40, y1: 20, y2: 80, y3: 95 },
        { x: "Education", y: 45, y1: 15, y2: 45, y3: 195 },
        { x: "Entertainment", y: 75, y1: 45, y2: 65, y3: 115 }],
        primaryXAxis: {
           valueType: 'Category',
        },
    };
  },
  provide: {
    chart: [StackingLineSeries, Category]
  }
};
</script>
<!DOCTYPE html>
<html>

<body style>
     <div id="app"></div>
</body>

</html>

Learning Resources

UG

Stacked Line Chart User Guide

Learn the available options to customize Vue stacked line chart.

API

Stacked Line Chart API Reference

Explore the Vue stacked line chart APIs.


65+ VUE UI COMPONENTS

Scroll up icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon