Range Step Area Chart in Vue Charts
14 May 202524 minutes to read
Range Step Area
To render a range step area 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
typeasRangeStepAreain your chart configuration. This indicates that the data should be represented as a range step area chart, which is ideal for displaying data points as a range with high and low values. It connects these points with vertical and horizontal lines, creating a step like appearance. -
Inject the RangeStepAreaSeries module: Use the
provide: { chart: [RangeStepAreaSeries]}method to inject theRangeStepAreaSeriesmodule into your chart. This step is essential, as it ensures that the necessary functionalities for rendering range step area series are available in your chart. -
Provide high and low values: The
RangeStepAreaseries requires two y-values for each data point, you need to specify both the high and low values. The high value represents the maximum range, while the low value represents the minimum range for each data point. These values define the upper and lower boundaries of the area for each point on the chart.
<template>
<div id="app">
<ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
<e-series-collection>
<e-series :dataSource='seriesData' type='RangeStepArea' xName='x' high='high' low='low'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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, high, and low properties.
<template>
<div id="app">
<ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
<e-series-collection>
<e-series :dataSource='seriesData' type='RangeStepArea' xName='x' high='high' low='low'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Series customization
The following properties can be used to customize the range step area 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='RangeStepArea' xName='x' high='high' low='low' fill='blue'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' fill='blue'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>The fill property can be used to apply a gradient color to the range step area 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='RangeStepArea' xName='x' high='high' low='low' fill='url(#gradient)'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' fill='url(#gradient)'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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='RangeStepArea' xName='x' high='high' low='low' 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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' opacity=0.7>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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='RangeStepArea' xName='x' high='high' low='low' dashArray='5,5' :border='border'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
const border = {
width: 2,
color: '#ff4251',
dashArray: "5,5"
};
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' dashArray='5,5' :border='border'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range',
border: {
width: 2,
color: '#ff4251',
dashArray: "5,5"
}
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>Step
Use the step property to change the position of the steps in a range step area series.
<template>
<div id="app">
<ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
<e-series-collection>
<e-series :dataSource='seriesData' type='RangeStepArea' xName='x' high='high' low='low' step='Right'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' step='Right'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</script>
<style>
#container {
height: 350px;
}
</style>No risers
You can eliminate the vertical lines between points by using the noRisers property in a series. This approach is useful for highlighting trends without the distraction of risers.
<template>
<div id="app">
<ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis'>
<e-series-collection>
<e-series :dataSource='seriesData' type='RangeStepArea' xName='x' high='high' low='low' noRisers=true opacity=0.1 :border='border'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
const border = { width: 1.5 };
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' noRisers=true opacity=0.1 :border='border'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range',
border: { width: 1.5 }
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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='RangeStepArea' xName='x' high='high' low='low' :emptyPointSettings='emptyPointSettings'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: null, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: undefined },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
const emptyPointSettings = {
mode: 'Gap'
};
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' :emptyPointSettings='emptyPointSettings'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: null, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: undefined },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range',
emptyPointSettings: {
mode: 'Gap'
}
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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='RangeStepArea' xName='x' high='high' low='low' :marker='marker' :emptyPointSettings='emptyPointSettings'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: null, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: undefined },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
const emptyPointSettings = {
mode: 'Average',
fill: 'red'
};
const marker = {
visible: true,
width: 7,
height: 7,
isFilled: true
};
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' :marker='marker' :emptyPointSettings='emptyPointSettings'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: null, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: undefined },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range',
emptyPointSettings: {
mode: 'Average',
fill: 'red'
},
marker: {
visible: true,
width: 7,
height: 7,
isFilled: true
}
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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='RangeStepArea' xName='x' high='high' low='low' :marker='marker' :emptyPointSettings='emptyPointSettings'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: null, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: undefined },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
const emptyPointSettings = {
mode: 'Average',
fill: 'red',
border: {
width: 2,
color: 'green'
}
};
const marker = {
visible: true,
width: 7,
height: 7,
isFilled: true
};
provide('chart', [RangeStepAreaSeries, Category]);
</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='RangeStepArea' xName='x' high='high' low='low' :marker='marker' :emptyPointSettings='emptyPointSettings'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: null, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: undefined },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range',
emptyPointSettings: {
mode: 'Average',
fill: 'red',
border: {
width: 2,
color: 'green'
}
},
marker: {
visible: true,
width: 7,
height: 7,
isFilled: true
}
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
}
};
</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='RangeStepArea' xName='x' high='high' low='low'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
provide('chart', [RangeStepAreaSeries, Category]);
const seriesRender = function (args) {
args.fill = '#ff6347';
};
</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='RangeStepArea' xName='x' high='high' low='low'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range'
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
},
methods: {
seriesRender: function (args) {
args.fill = '#ff6347';
}
}
};
</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='RangeStepArea' xName='x' high='high' low='low' :border='border' :marker='marker'>
</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, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
const seriesData = [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
];
const primaryXAxis = {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
};
const primaryYAxis = {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
};
const title = 'Monthly Temperature Range';
const border = {
width: 2,
color: 'green'
};
const marker = {
visible: true,
width: 7,
height: 7,
isFilled: true
};
provide('chart', [RangeStepAreaSeries, Category]);
const pointRender = function (args) {
if (args.point.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='RangeStepArea' xName='x' high='high' low='low' :border='border' :marker='marker'>
</e-series>
</e-series-collection>
</ejs-chart>
</div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, RangeStepAreaSeries, Category } from "@syncfusion/ej2-vue-charts";
export default {
name: "App",
components: {
'ejs-chart': ChartComponent,
'e-series-collection': SeriesCollectionDirective,
'e-series': SeriesDirective
},
data() {
return {
seriesData: [
{ x: 'Jan', high: 29, low: 19 },
{ x: 'Feb', high: 32, low: 22 },
{ x: 'Mar', high: 35, low: 25 },
{ x: 'Apr', high: 37, low: 27 },
{ x: 'May', high: 35, low: 25 },
{ x: 'Jun', high: 32, low: 22 },
{ x: 'Jul', high: 30, low: 20 },
{ x: 'Aug', high: 32, low: 22 },
{ x: 'Sep', high: 35, low: 25 },
{ x: 'Oct', high: 37, low: 27 },
{ x: 'Nov', high: 35, low: 25 },
{ x: 'Dec', high: 32, low: 22 }
],
primaryXAxis: {
valueType: 'Category',
title: 'Month',
edgeLabelPlacement: 'Shift',
majorGridLines: { width: 0 }
},
primaryYAxis: {
labelFormat: '{value}˚C',
title: 'Temperature',
lineStyle: { width: 0 },
minimum: 10,
maximum: 40,
majorTickLines: { width: 0 }
},
title: 'Monthly Temperature Range',
border: {
width: 2,
color: 'green'
},
marker: {
visible: true,
width: 7,
height: 7,
isFilled: true
}
};
},
provide: {
chart: [RangeStepAreaSeries, Category]
},
methods: {
pointRender: function (args) {
if (args.point.index % 2 !==0) {
args.fill = '#ff6347';
}
else {
args.fill = '#009cb8';
}
}
}
};
</script>
<style>
#container {
height: 350px;
}
</style>