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

205
Visualizações
billboard.js custom label for each data series

Is it possible to apply a custom label for each data series in billboard.js? As opposed to using the value, id, or index of the data point in the series?

I've been using the following billboard.js documentation for reference: https://naver.github.io/billboard.js/release/latest/doc/Options.html#.data%25E2%2580%25A4labels

https://naver.github.io/billboard.js/demo/#Data.DataLabelFormat

data: {
  labels: true,

  // or set specific options
  labels: {
   format: function(v, id, i, j) {
    ...
    // to multiline, return with '\n' character
    return "Line1\nLine2";
   },

   // it's possible to set for each data
   format: {
    data1: function(v, id, i, texts) { ... },
    ...
    },
  }
}

In the above snippet, texts is described as "the array of whole corresponding data series' text labels". But the parameter seems empty and I'm not sure how to pass in an array of text labels. For example, I'm working with data that includes a city, Country. Would it be possible to have the legend/tile = city and the label = country.

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