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

179
Views
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 answers
Answer question

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 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!