Vue spline chart connects the data points through smooth lines. Uses numeric, category, datetime, or logarithmic axis to plot data.
Allows you to plot multiple series in a single chart to compare different data sets. Enabling legend and tooltip gives more information about the individual series.
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.
Create and update the spline chart with live data that changes over seconds or minutes.
Handle the missed data elegantly with empty points support.
The spline chart can be transposed vertically to view the data in a different perspective.
Customize the color, thickness, and dash array of the spline chart using built-in APIs.
<template>
<div id="app">
<ejs-chart id="container" :primaryXAxis='primaryXAxis'>
<e-series-collection>
<e-series :dataSource='seriesData' type='Spline' xName='x' yName='y'> </e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartPlugin,Category, SplineSeries} from "@syncfusion/ej2-charts";
Vue.use(ChartPlugin);
export default {
data() {
return {
seriesData: [
{ x: 'Sun', y: 15 }, { x: 'Mon', y: 22 },
{ x: 'Tue', y: 32 },
{ x: 'Wed', y: 31 },
{ x: 'Thu', y: 29 }, { x: 'Fri', y: 24 },
{ x: 'Sat', y: 18 },
],
primaryXAxis: {
valueType: 'Category'
},
};
},
provide:{
chart: [SplineSeries, Category]
}
};
</script>
<!DOCTYPE html>
<html>
<body style>
<div id="app"></div>
</body>
</html>