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

216
Views
Cómo mostrar el porcentaje correcto en el eje Y usando HighCharts js

Estoy trabajando con un gráfico de área y necesito mostrar este porcentaje en el gráfico del eje Y con (0%, 50%, 100%) en el eje Y

Pero en algunos casos, mis etiquetas en el eje Y del gráfico se comportan incorrectamente. ¿Quizás de alguna manera pueda establecer los valores para las etiquetas del eje Y yo mismo? etiquetas incorrectas en el eje Y

 // this is the method from my angular component to get the Y-axis options public getYAxisOptions(graphData: SeriesAreaOptions[]): YAxisOptions { const [allLeads] = graphData[0].data as number[]; return { title: {text: null,}, floor: 0, ceiling: allLeads || 100, min: 0, max: allLeads || 100, labels: { enabled: true, formatter: (that: AxisLabelsFormatterContextObject<string>) => { if (allLeads) { const percent = (Number(that.value) / allLeads * 100).toFixed(0); return /*Number(percent) > 100 ? "" : `${percent}%`;*/ `${percent}%`; } return `${that.value}%`; } }, gridLineDashStyle: "Dash", gridLineWidth: 1, lineWidth: 1, height: 130, top: 17, minRange: allLeads || 100 }; }

UPD: esto ya se resolvió con tickPositions: [0, allLeads/2, allLeads]

about 4 years ago · Juan Pablo Isaza
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!