Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

375
Vistas
how i use the same legend for two different pie charts with apexcharts in Vue

Pie Charts to edit

I just need one LEGEND for these two charts, and that be reactive for both, how can I do?? I don't know if it is possible to connect the legend with any of the charts, programmatically way or something, with and "id" property or the same options for both charts...

<template>
  <div>
    <b-card title="Apexchart">
      <b-card-body>
        <b-row>
          <b-col cols="6">
            <apexchart type="pie" :options="chartOptions" :series="series" />
          </b-col>
          <b-col cols="6"> 
            <apexchart type="pie" :options="chartOptions" :series="series" />
          </b-col>
        </b-row>
      </b-card-body>
    </b-card>
  </div>
</template>

<script>
export default {
  name: "Chart",
   data() {
    return {
      series: [60, 5, 10, 10],
      chartOptions: {
        chart: {
          width: "100%",
          type: "pie",
        },
        labels: ["legend-1", "legend-2", "legend-3", "legend-4"], //just need one, for both charts
        legend: {
          position: "bottom",
          offsetY: 0,
          markers: {
            radius: 4,
          }
        },
        title: {
          text: "Title",
          align: "center",
          offsetX: 0,
          offsetY: 0,
        },
      },
    };
  },
};
</script>

PS: My English is awful, I know, but I try >:D

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda