Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda