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

201
Views
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
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!