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

178
Vistas
How to put the category values in Y axis for Scatter plot in Angular Apexchart , the values should be company1 instead of year

error image click here
dummy arrays example :
plant_arr = ["abc","dbc","asd"]
opr_no_arr = ["company1","company2","company3"]
draft_arr = [0:{x:"abc",y:"comapny1"},1:{x:"bds",y:"comapny2"},2:{x:"dbc",y:"comapny3"}]
Pending For Creation = [0:{x:"abc",y:"comapny1"},1:{x:"bds",y:"comapny2"},2:{x:"dbc",y:"comapny3"}]
Created = [0:{x:"abc",y:"comapny1"},1:{x:"bds",y:"comapny2"},2:{x:"dbc",y:"comapny3"}]

        name: "Pending For Creation",
        data: draft_arr,
        color:"#000000"
      },{
        name: "Created",
        data: created_arr,
        color:'#FF0000'
      },{
        name: "Execution In Progress",
        data: execution_arr,
        color:'#FFAE42'
      },
      {
        name: "Completed",
        data: completed_arr,
        color:'#28a745'
      }],
      chart: {
        height: 350,
        type: 'scatter',
        zoom: {
          enabled: true,
          type: 'xy'
        },
      },
      xaxis: {
        type: 'category',
        //tickAmount: 10,
        categories: plant_arr,
      }, this is working 
      yaxis:
        {
          //type: 'category',
          // tickAmount:1,
          // categories : opr_no_arr,
          labels: {
            maxWidth: "auto",
            formatter: (val : string, index) => opr_no_arr[index], //error cant show particaular labels 
          }, 
          title: {
            text: "OPR",
            style: {
              colors: "#000000"
            }
          }
        },
      legend: {
        position: "top",
        horizontalAlign: "right"
      }
    };
    this.first_chartRef = new ApexCharts(document.getElementById('first'), chartOptions);
    this.first_chartRef.render();
 }

this the image of the output red line are output required

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

yaxis: { type: 'category', tickAmount:6, categories: opr_no_arr, tags: { maxWidth: "auto", }, } keep it like this and check?

about 4 years ago · Santiago Trujillo Denunciar
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