question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

label scale formatting not working

See original GitHub issue

Hello ! What happened to the formatting of the scale of values? I have some data values and i want to conver it in time format by moment.js. In old version of Chart.js i did var options = { scaleLabel: '<%= (moment().set({'+ '"hour": parseInt(parseInt(value) / 3600),'+ '"minute": parseInt(parseInt(value) / 60 % 60),'+ '"second": parseInt(parseInt(value) % 60)'+ '})'+ '.format("H:mm:ss"))%>', tooltipTemplate: '<%= (moment().set({'+ '"hour": parseInt(parseInt(value) / 3600),'+ '"minute": parseInt(parseInt(value) / 60 % 60),'+ '"second": parseInt(parseInt(value) % 60)'+ '})'+ '.format("H:mm:ss"))%>', }; In the latest version i cant format values of Y-axis! How to do it? https://plnkr.co/edit/VoZEbeZKWQAmknjfRyfD?p=preview

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
etimbergcommented, May 20, 2016

You can provide a custom function to do the string.

options: {
  xAxes: [{
    ticks: {
      callback: function(tick, index, ticksArray) {
        // Return string here for individual tick marks
      }
    }
  }]
}
1reaction
kpmanuelcommented, May 20, 2016

I would also like to know this. I’m trying to format the values as a currency.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Misaligned Labels Templates?
1. Check your printer settings ... Your labels look correct on screen but are not printing correctly? The first thing you want to...
Read more >
Matplotlib log scale tick label number formatting - Stack Overflow
@Joe Kington: I would like to add ticks in between, like 50,200, etc.. , How can I do that? I tried, set_xticks[50.0,200.0] but...
Read more >
Conditional Formatting Not Working - Microsoft Community Hub
I am trying to use conditional formatting and it is not working properly. I need the cells that are 74 or below to...
Read more >
R Visualization Tips: Using the scales package - Bookdown
Axis labels. label numbers. decimal format. Use label_number() and its variants to force decimal display of numbers, that is, the antithesis ...
Read more >
[SOLVED] Color Scale Not Working - Excel Help Forum
Next, click on the A to select the whole of the A column, then go to conditional formatting and select colour scales -...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found