Setting the width of the bar in "indicator" type,"bullet" shape

I’m using the Indicator with the “bullet” shape and I cannot figure out how to increase the width of the green bar to fill the entire vertical space of the plot.

image

See Indicators in JavaScript

The configuration of the bar property lets me add a line with a width (which then makes the bar start below zero), but there doesn’t seem to be a way how to change the width of the bar itself, or to reduce the margin around it.

Any help would be appreciated

Hello, if you haven’t yet found your solution, or if anyone comes upon this question:
You can set the gauge.bar.thickness, ranging from 0 to 1, describing the portion the bar should take.

You can find other properties in the reference pages (I believe the docs should be better organized, to make a new user aware of their existance)

Reference page for indicators

Example simple code:

    type: "indicator",
    value: 120,
    gauge: {
      shape: "bullet",
      axis: {
        visible: false,
        range: [-200, 200]
      },
      bar: {
        thickness: 0.8
      }
    },

Would produce a bar thickness of 80%:
image

1 Like