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

193
Views
¿Cómo redux el espacio entre el título y el gráfico de anillos en plotly js?

Mi código actual:

 const donutData = [
 {
 values: [2, 98],
 labels: ['', ''],
 sort: false,
 marker: {
 colors: ['#0099cc', '#535353'],
 },
 name: '',
 hoverinfo: 'none',
 textfont: {
 size: [16, 1],
 color: ['#ffffff', '#535353'],
 fill: ['#ffffff', '#535353'],
 },
 hole: 0.7,
 insidetextorientation: 'none',
 type: 'pie',
 textposition: 'none',
 automargin: true,
 },
];
const layout = {
 paper_bgcolor: '#262626',
 plot_bgcolor: '#262626',
 autosize: true,
 margin: { t: 100, b: 10, l: 0, r: 0 },
 font: {
 color: '#fff',
 family: 'Roboto',
 size: 18,
 },
 showlegend: false,
 width: 500,
 height: 500,
 title: {
 text: `donut`,
 },
 annotations: [
 {
 font: {
 size: 60,
 },
 showarrow: false,
 text: `30%`,
 },
 ],
};

Quiero redux el espacio entre el título y el gráfico de anillos. Intenté agregar pad: 0 en el objeto de margen pero no funcionó. Además, no pude encontrar ningún atributo relacionado en el objeto de título. ¿Hay alguna propiedad que me ayude? añadió SS.

ss

almost 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Puede controlar el espacio por la variable y como y=0.8 en el parámetro de title de la siguiente manera:

 title: {
 text: `donut`,
 y: 0.8 # you can change this value as you prefer to reduce the space
 },
almost 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!