Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
Apex chart Charts order in Mixed chart

I'm currently using the library ApexChart and more particulary Vue apex chart combined with nuxt.

I'm building a dashboard and I'm trying to build a mixed chart composed of :

  • An area chart
  • A Bar chart
  • A line chart

The three charts are displaying in the following order (from back to front) : Area - Bar - Line

I'd like to change the order to get the bar chart to the back but i don't see how to do it.

What i've tried

I've tried to change the order of the series to put the bar chart last

series() {
  return [
    {
      name: 'My Line chart',
      type: 'line',
      data: this.capacityCalls
    },
    {
      name: 'My Area Chart',
      type: 'area',
      data: this.callsRealProd
    },
    {
      name: 'My Bar Chart',
      type: 'bar',
      data: this.callsToMake
    },
  ]
},

Minimal reproducible example

Here is a minimal reproducible event.

<template>
  <VueApexCharts type="line" height="700" :options="chartOptions" :series="series" />
</template>

<script>
export default {
  name: "Hello",
  data: () => {
    return {
      series: [{
        name: 'TEAM A',
        type: 'line',
        data: [23, 11, 22, 27, 13, 22, 37, 21, 44, 22, 30]
      }, {
        name: 'TEAM B',
        type: 'area',
        data: [44, 55, 41, 67, 22, 43, 21, 41, 56, 27, 43]
      }, {
        name: 'TEAM C',
        type: 'bar',
        data: [30, 25, 36, 30, 45, 35, 64, 52, 59, 36, 39]
      }],
      chartOptions: {
        colors: ['#F44E7C','#FBBC04','#49619C'],
        plotOptions: {
          bar: {
            columnWidth: '100%'
          }
        },
        stroke: {
          curve: 'smooth',
          width: [3, 3, 1]
        },
        fill: {
          opacity: [1, 0.6, 0.2]
        },
      },
    }
  },
}
</script>

I'm using nuxt.js and loading the npm library apexChart throught the following plugin :

import Vue from 'vue'
import VueApexCharts from 'vue-apexcharts'

Vue.component('VueApexCharts', VueApexCharts);
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

It probably adds each chart in series as they finish loading individually. How about creating a separate component for each chart and defining the order by defining components in your template?

<line-chart></line-chart>
<area-chart></area-chart>
<bar-chart></bar-chart>
over 4 years ago · Santiago Trujillo Report

0

I had a similar problem, I'm not sure what a logical solution. But the problem is solved as below with jquery.

        chart: {
            events: {
                updated: function (chartContext, options) {
                     $('.apexcharts-area-series').insertAfter('.apexcharts-bar-series');
                },
                mounted: function (chartContext, options) {
                     $('.apexcharts-area-series').insertAfter('.apexcharts-bar-series');
                }
            }
        },
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!