How do I Hide Labels in a Gauge Chart?

Problem:
I want to remove labels that are shown in picture like 100, 200. How do I hide these labels?

Solution:
To hide the labels, you will need the idea of setting labels at arbitrary positions, inside scaleR object which involves including a labels property in this format labels: ['0', '23', '', '', '177', '250', '', '', '421', ''] to display your desired labels. Please use this demo for reference.


The labels are always located in front of a real step, and you can fake the values in the labels.

For instance if you want a gauge from 0 to 100 and display values at 0, 7, 12 and 100 I have 2 possibilities:

  1. Use step of "5", create 16 empty labels and your desired labels will be approximately placed ("7" will be placed at real value "5", "12" will be placed at real value "10").
  2. Use step of "1", create 96 empty labels and your desired labels will be correctly placed.


To hide the labels, you'll have to use empty strings for the entries in the labels property. We created this other demo for reference.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us