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

186
Vistas
¿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 Respuestas
Responde la pregunta

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