The Fuel gauge is recent addition to RGraph, and the available configuration options are shown here.
You can use these properties to control how the Fuel Gauge apears. You can set them by using the Set() method. Eg:
Chart configuration
chart.centerx
If required, you can position the Fuel chart using this instead of the gutters.
Default: null
chart.centery
If required, you can position the Fuel chart using this instead of the gutters.
Default: null
chart.radius
If required, you can size the Fuel chart using this instead of the gutters.
Default: null
Colors
chart.colors
The color of the Fuel Gauge. Note that despite there being only one color, this is still an array.
Default: ['red']
Margins
chart.gutter.left
The left gutter of the chart, (the gutter is where the labels and title are)).
Default: 5
chart.gutter.right
The right gutter of the chart, (the gutter is where the labels and title are).
Default: 5
chart.gutter.top
The top gutter of the chart, (the gutter is where the labels and title are).
Default: 5
chart.gutter.bottom
The bottom gutter of the chart, (the gutter is where the labels and title are).
Default: 5
Needle options
chart.needle.color
The color of the needle (not including the bulb at the bottom). Note that this is NOT an array - it's just a string.
Default: 'red'
Labels and text
chart.labels.empty
The label used as the empty text.
Default: E
chart.labels.full
The label used as the full text.
Default: F
chart.text.color
The color used for the text on the chart.
Default: black
chart.text.font
The font used for the text.
Default: Verdana
Interactive features
chart.contextmenu
The context menu. For more details see
here.
Default: null
chart.annotatable
Whether annotations are enabled for the chart (ie you can draw on the chart interactively.
Default: false
chart.annotate.color
If you do not allow the use of the palette, then this will be the only colour allowed for annotations.
Default: black
chart.resizable
Defaulting to false, this determines whether your chart will be resizable. Because of the numerous event handlers this has to install code on, This feature is unlikely to work with other dynamic features (the context menu is fine however).
Default: false
chart.resize.handle.background
With this you can specify the background color for the resize handle. If you're adjusting the position of the
handle then you may need this to make the handle stand out more.
Default: null
Zoom
chart.zoom.factor
This is the factor that the chart will be zoomed by (bigger values means more zoom)
Default: 1.5
chart.zoom.fade.in
Whether the zoomed canvas fades in or not. This also can be used to control the fade in for the zoom in thumbnail mode.
Default: true
chart.zoom.fade.out
Whether the zoomed canvas fades out or not. This also can be used to control the fade in for the zoom in thumbnail mode.
Default: true
chart.zoom.hdir
The horizontal direction of the zoom. Possible values are:
left,
center,
right
Default: right
chart.zoom.vdir
The vertical direction of the zoom. Possible values are:
up,
center,
down
Default: down
chart.zoom.delay
The delay (in milliseconds) between frames.
Default: 50
chart.zoom.frames
The number of frames in the zoom animation.
Default: 10
chart.zoom.shadow
Whether or not the zoomed canvas has a shadow or not.
Default: true
chart.zoom.background
Defaulting to true, this determines whether the zoom has a dark, semi-opaque background that covers the entire web page.
Default: true
Miscellaneous
chart.icon
This should be a URL that represents the image to use as the icon on the chart.
The default fuel icon is a data: URL, though you can specify any valid image URL.
Default: [A data: URL of a fuel icon]
chart.icon.redraw
If false, then the chart is NOT redrawn when the image/icon loads. You may need to set this to
false if you use
adjusting.
Default: true