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

122
Vistas
lightweight-charts - How to setup a chart background collor to black?

I am using the [lightweight-charts] javascript library to generate some charts. For this example I am using the Realtime emulation chart.

In this example the background color is white. I would like to set the background color to black. I am following the documentation but I can't achieve the goal.

Following is the code I am using but it is not working:

var chart = LightweightCharts.createChart(document.getElementById('chart'), {
    width: 1200,
    height: 800,
    background: '#000000',
    textColor: '#ffffff'
});


var candleSeries = chart.addCandlestickSeries();
var data = [...]

What am I missing?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You'll need to wrap both background & textColor within a layout property like

var chart = LightweightCharts.createChart(document.getElementById('chart'), {
  width: 1200,
  height: 800,
  layout: {
    background: {
      color: '#000000'
    },
    textColor: '#ffffff'
  }
});

as seen in this doc

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