Vue spline area chart are much like area chart expect that the data points are connected through a smooth line. Supports feature like zooming, panning, animation, and dynamic updates.
Multi area series are useful to compare two or more cumulative values over a period.
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.
Shows the information about the data point with data label. Add a template to display data labels with any HTML element such as images, DIV, and spans to make data more informative.
Use multiple axes to plot different data sets that widely vary from one other.
Enable zooming and panning support when dealing with large amount of data to visualize the data point in any region.
Handle the missed data elegantly with empty points support.
The spline area chart can be transposed vertically to view the data in a different perspective.
Customize the color and border of the spline area chart using built-in APIs.
<template>
<div id="app">
<ejs-chart id="container" :primaryXAxis='primaryXAxis'>
<e-series-collection>
<e-series :dataSource='seriesData' type='SplineArea' xName='x' yName='y'> </e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartPlugin,DateTime, SplineAreaSeries} from "@syncfusion/ej2-charts";
Vue.use(ChartPlugin);
export default {
data() {
return {
seriesData: [
{ x: new Date(2002, 0, 1), y: 2.2 }, { x: new Date(2003, 0, 1), y: 3.4 },
{ x: new Date(2004, 0, 1), y: 2.8 }, { x: new Date(2005, 0, 1), y: 1.6 },
{ x: new Date(2006, 0, 1), y: 2.3 }, { x: new Date(2007, 0, 1), y: 2.5 },
{ x: new Date(2008, 0, 1), y: 2.9 }, { x: new Date(2009, 0, 1), y: 3.8 },
{ x: new Date(2010, 0, 1), y: 1.4 }, { x: new Date(2011, 0, 1), y: 3.1 }
],
primaryXAxis: {
valueType: 'DateTime'
},
};
},
provide:{
chart: [SplineAreaSeries, DateTime]
}
};
</script>
<!DOCTYPE html>
<html>
<body style>
<div id="app"></div>
</body>
</html>