0

I wanted to start my chart at negative values and I can't find any solution online, how can I achieve this? I'm new to JavaScript and stuck at how can I set the start value of my gauge with negative values. I have this code:

data: {
      labels: ['Safe', 'Warning', 'Critical'],
      datasets: [{
        data: [80,85,160],
        value: 0,
        backgroundColor: ['green', 'orange', 'red'],
        borderWidth: 2
      }]
    },

Any help in setting the starting point in gauge chartjs would be much appreciated. Suggestions to other beginner friendly Javascipt gauge library are welcome.

user13539846
  • 425
  • 2
  • 5
  • 13
  • What would that look like? – Ouroborus Nov 29 '20 at 12:27
  • Hello @Ouroborus, I wanted it to look like [this](https://ibb.co/PWzwwL2). So how app works is it starts at zero and then recalibrate to what the database value is. [This](https://ibb.co/QfNzR0P) is how my app starts. I just want the start of the gauge to be negative instead of zero for the negative values to be properly pointed. – user13539846 Nov 29 '20 at 12:36
  • Does this answer your question? https://stackoverflow.com/a/62761030/2358409 – uminder Dec 05 '20 at 11:08

0 Answers0