Step area Chart in Vue Component

15 Dec 202424 minutes to read

Step area

To render a 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 type as StepArea in your chart configuration. This indicates that the data should be represented as a step area chart, which connects data points with vertical and horizontal lines, creating a step like appearance.

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

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y'> </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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y'> </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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Series customization

The following properties can be used to customize the 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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' fill='#87CEEB'> </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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' fill='#87CEEB'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

The fill property can be used to apply a gradient color to the 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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' 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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' fill='url(#gradient)'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' opacity=0.5> </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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' opacity=0.5> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' 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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};
const border: { 
  width: 2, 
  color: '#FFA500',
  dashArray: "5,5"
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' dashArray='5,5' :border='border'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      },
      border: { 
        width: 2, 
        color: '#FFA500',
        dashArray: "5,5"
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

Step

Use the step property to change the position of the steps in a step area series.

<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' 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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' step='Right'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' opacity=0.1 :border='border' noRisers=true> </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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = "England - Run Rate";
const border = { width: 1.5 };
const tooltip = { enable: true };

provide('chart', [StepAreaSeries, Tooltip]);
</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' opacity=0.1 :border='border' noRisers=true> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>
import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    "ejs-chart": ChartComponent,
    "e-series-collection": SeriesCollectionDirective,
    "e-series": SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: "England - Run Rate",
      border: { width: 1.5 },
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :border='border' :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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: null },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: undefined }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};
const border = { 
  width: 2, 
  color: 'green' 
};
const emptyPointSettings = {
  mode: 'Zero'
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :border='border' :emptyPointSettings='emptyPointSettings'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: null },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: undefined }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      },
      border: { 
        width: 2, 
        color: 'green' 
      },
      emptyPointSettings: {
        mode: 'Zero'
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :border='border' :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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: null },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: undefined }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};
const border = { 
  width: 2, 
  color: 'green' 
};
const emptyPointSettings = {
  mode: 'Zero',
  fill: 'red'
};
const marker = { 
  visible: true, 
  width: 7, 
  height: 7, 
  isFilled: true 
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :border='border' :marker='marker' :emptyPointSettings='emptyPointSettings'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: null },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: undefined }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      },
      border: { 
        width: 2, 
        color: 'green' 
      },
      emptyPointSettings: {
        mode: 'Zero',
        fill: 'red'
      },
      marker: { 
        visible: true, 
        width: 7, 
        height: 7, 
        isFilled: true 
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :border='border' :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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: null },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: undefined }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};
const border = { 
  width: 2, 
  color: 'green' 
};
const emptyPointSettings = {
  mode: 'Zero',
  fill: 'red',
  border: { 
    width: 2, 
    color: 'green' 
  }
};
const marker = { 
  visible: true, 
  width: 7, 
  height: 7, 
  isFilled: true 
};

provide('chart', [StepAreaSeries, Tooltip]);

</script>
<style>
  #container {
    height: 350px;
  }
</style>
<template>
  <div id="app">
    <ejs-chart id="container" :title='title' :primaryXAxis='primaryXAxis' :primaryYAxis='primaryYAxis' :tooltip='tooltip'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :border='border' :marker='marker' :emptyPointSettings='emptyPointSettings'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: null },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: undefined }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      },
      border: { 
        width: 2, 
        color: 'green' 
      },
      emptyPointSettings: {
        mode: 'Zero',
        fill: 'red',
        border: { 
          width: 2, 
          color: 'green' 
        }
      },
      marker: { 
        visible: true, 
        width: 7, 
        height: 7, 
        isFilled: true 
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  }
};
</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' :tooltip='tooltip' :seriesRender='seriesRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y'> </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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};

provide('chart', [StepAreaSeries, Tooltip]);

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' :tooltip='tooltip' :seriesRender='seriesRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  },
  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' :tooltip='tooltip' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :marker='marker' :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, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

const seriesData = [
  { x: 1, y: 7 },   { x: 2, y: 1 }, 
  { x: 3, y: 1 },   { x: 4, y: 14 }, 
  { x: 5, y: 1 },   { x: 6, y: 10 },
  { x: 7, y: 8 },   { x: 8, y: 6 }, 
  { x: 9, y: 10 },  { x: 10, y: 10 }, 
  { x: 11, y: 16 }, { x: 12, y: 6 },
  { x: 13, y: 14 }, { x: 14, y: 7 }, 
  { x: 15, y: 5 },  { x: 16, y: 2 }, 
  { x: 17, y: 14 }, { x: 18, y: 7 },
  { x: 19, y: 7 },  { x: 20, y: 10 }
];
const primaryXAxis = {
  title: 'Overs'
};
const primaryYAxis = {
  title: 'Runs'
};
const title = 'England - Run Rate';
const tooltip = {
  enable: true
};
const marker = { 
  visible: true, 
  isFilled: true, 
  width: 7, 
  height: 7 
};
const border = { 
  width: 2, 
  color: 'green' 
};

provide('chart', [StepAreaSeries, Tooltip]);

const pointRender = function (args) {
  if (args.point.y <= 8) {
      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' :tooltip='tooltip' :pointRender='pointRender'>
      <e-series-collection>
        <e-series :dataSource='seriesData' type='StepArea' xName='x' yName='y' :marker='marker' :border='border'> </e-series>
      </e-series-collection>
    </ejs-chart>
  </div>
</template>
<script>

import { ChartComponent, SeriesCollectionDirective, SeriesDirective, StepAreaSeries, Tooltip } from "@syncfusion/ej2-vue-charts";

export default {
  name: "App",
  components: {
    'ejs-chart': ChartComponent,
    'e-series-collection': SeriesCollectionDirective,
    'e-series': SeriesDirective
  },
  data() {
    return {
      seriesData: [
        { x: 1, y: 7 },   { x: 2, y: 1 }, 
        { x: 3, y: 1 },   { x: 4, y: 14 }, 
        { x: 5, y: 1 },   { x: 6, y: 10 },
        { x: 7, y: 8 },   { x: 8, y: 6 }, 
        { x: 9, y: 10 },  { x: 10, y: 10 }, 
        { x: 11, y: 16 }, { x: 12, y: 6 },
        { x: 13, y: 14 }, { x: 14, y: 7 }, 
        { x: 15, y: 5 },  { x: 16, y: 2 }, 
        { x: 17, y: 14 }, { x: 18, y: 7 },
        { x: 19, y: 7 },  { x: 20, y: 10 }
      ],
      primaryXAxis: {
        title: 'Overs'
      },
      primaryYAxis: {
        title: 'Runs'
      },
      title: 'England - Run Rate',
      tooltip: {
        enable: true
      },
      marker: { 
        visible: true, 
        isFilled: true, 
        width: 7, 
        height: 7 
      },
      border: { 
        width: 2, 
        color: 'green' 
      }
    };
  },
  provide: {
    chart: [StepAreaSeries, Tooltip]
  },
  methods: {
    pointRender: function (args) {
      if (args.point.y <= 8) {
          args.fill = '#ff6347';
      }
      else {
          args.fill = '#009cb8';
      }
    }
  }
};
</script>
<style>
  #container {
    height: 350px;
  }
</style>

See also