Plugins 〉D3 Gauge
D3 Gauge
Grafana Gauge Panel
This panel plugin provides a D3-based gauge panel for Grafana 10.0+
Screenshots
Example gauges






Configuration Options
The React port has separated the configuration options into multiple searchable sections and added new features.
Standard Options

| Option | Description |
|---|---|
| Show Display Name on Gauge | Show the field or series name above the value on the gauge |
| Show Value on Gauge | Show the numeric value on the gauge |
| Show Tick Labels | Show numeric labels next to the major ticks |
| Stat | The statistic to be displayed on the gauge |
| Unit | A unit for the value displayed. This will be used to abbreviate as needed |
| Decimals | Maximum number of decimals to display if any are required |
Font Settings

| Option | Description |
|---|---|
| Display Name Font | Font used for the display name shown above the value |
| Display Name Font Size | Font size of the display name |
| Value Font | Font to be used on the value displayed |
| Value Font Size | Font size for the value displayed |
| Tick Label Font | Font to be used on the tick labels |
| Tick Label Font Size | Font size to be used for the tick labels |
Needle Options

| Option | Description |
|---|---|
| Animate Needle Transition | Enables needle animation between values |
| Transition Speed (MS) | When animation is enabled, set how fast the transition occurs |
| Allow Crossing Limits | Enable this to allow the needle to go below and above the limit |
| Needle Cross Limit Degrees | When crossing limits is enabled, this sets the degrees that can be exceeded |
| Needle Width | Specifies the width of the needle |
| Show End Marker | This will create a marker at the end of the needle of the specified shape |
| Show Start Marker | This will create a marker at the start of the needle of the specified shape |
When the option Allow Crossing Limits is enabled, the needle can exceed
the maximum or minimum limit by the specified degrees. The example below shows a gauge with a limit of 100,
and allows the needle to cross the limit (burying the needle).

Limits

| Option | Description |
|---|---|
| Minimum Value | Minimum Value allowed on the face |
| Maximum Value | Maximum Value allowed on the face |
| Wrap Values to Range | Wrap out-of-range values using modulo arithmetic (for compass) |
When you change the Minimum or Maximum Value, tick spacing is automatically recalculated if the new range would produce more than 100 ticks. If the current tick spacing is still within the limit, your settings are preserved. A warning icon appears on the gauge when the tick count is clamped, with a tooltip showing suggested spacing values.
Coloring

| Option | Description |
|---|---|
| Outer Edge | Color of the outer edge of the gauge |
| Inner (Face) | Color used on the face of the gauge (background of dial) |
| Pivot | Color of the pivot (center) |
| Needle | Color of the needle |
| Units Label | Color for label units when displayed |
| Tick Label | Color of values displayed near the tick major sections |
| Tick Major | Color of the major ticks (longer lines) |
| Tick Minor | Color of the minor ticks (shorter lines) |
Radial Customization
Note that many of these settings are very sensitive to the visualization since they are percentages of the radius. Adjust in small increments to see how they affect the gauge.

| Option | Description |
|---|---|
| Radius | Specifies size of gauge by radius. Value 0 will auto-scale to fit panel |
| Tickness Gauge Basis | Scaling for tick, a lower value will autoscale poorly |
| Pivot Radius | Size of the center pivot, as a percentage of radius |
| Value Y-Offset (Vertical) | Sets a vertical offset to better place the displayed metric |
| Display Name Y-Offset (Vertical) | Sets a vertical offset to better place the display name |
| Padding | Adds space between the ticks and outer edge |
| Edge Width | Thickness of the circle around the edge, as a percentage of radius |
| Tick Edge Gap | Spacing between ticks and the outer circle, as a percentage of radius |
| Tick Length Major | Length of the major ticks, as a percentage of the gauge radius |
| Tick Width Major | Width of the major ticks in pixels |
| Tick Length Minor | Length of the minor ticks, as a percentage of the gauge radius |
| Tick Width Minor | Width of the minor ticks in pixels |
| Needle Tick Gap | Spacing between ticks and needle end, as a percentage of gauge radius |
| Needle Length Stem | Length of the needle beyond the centre, as a percentage of gauge radius |
Gauge Degrees
This is the main section that is used to modify the displayed range on the gauge.

| Option | Description |
|---|---|
| Zero Tick Angle | Angle where the tick value (0) starts (default 60) |
| Max Tick Angle | Angle where the tick value ends (default 300) |
| Zero Needle Angle | Angle where needle is at minimum value (default 40) |
| Max Needle Angle | Angle where needle is at maximum value (default 320) |
Gauge Readings

| Option | Description |
|---|---|
| Tick Spacing Major | The numeric spacing of the major increment ticks (minimum 0.001) |
| Tick Spacing Minor | The numeric spacing of the minor increment ticks (minimum 0.001) |
| Format Tick Labels with Unit | Format tick labels using the configured unit and decimals |
When Format Tick Labels with Unit is enabled, tick labels are formatted using the unit configured in Standard options (e.g., "bytes/sec"). The unit suffix is shown on a second line below the value on the first tick, last tick, and any tick where the unit prefix changes (e.g., "KB/s" to "MB/s"). Middle ticks show only the number for clean alignment.


Fractional tick spacing is supported for both major and minor ticks. This is useful for gauges with narrow ranges where sub-integer precision is needed (e.g., a frequency gauge spanning 47-52 Hz with 0.1 Hz minor ticks). Minor ticks that overlap with major tick positions are automatically hidden.
Tick Maps

Use the Add Tick Map button to create a tick map.
A tick map allows you to substitute text for a given value. Using this option a compass style gauge can be constructed.
| Option | Description |
|---|---|
| Label | Sets the name of the Tick Map |
| Value | Tick value where the text will be placed |
| Text | Text to be displayed |
Thresholds
Thresholds operate in the same manner as other Grafana plugins.
Dynamic thresholds are supported via Grafana's Config from query results transformation. When thresholds are set dynamically from query data, they take precedence over the static thresholds configured in the panel editor.
There are additional display options detailed below.

| Option | Description |
|---|---|
| Show Threshold Band On Gauge | Thresholds are displayed as a band on face of gauge along the needle arc |
| Show Lower Range | Lower threshold is displayed on band |
| Show Middle Range | Middle thresholds are displayed on band |
| Show Upper Range | Upper threshold is displayed on band |
| Show Threshold State on Background | Gauge face color changes to state of threshold |
| Show Threshold State on Value | Displayed value color changes to state of threshold |
| Show Threshold State on Title | Displayed title color changes to state of threshold |
When the middle and upper threshold option are selected, the gauge will look similar to this:

The state of the threshold can be displayed as the background color of the gauge.

The state of the threshold can be displayed on the value of the gauge.

Value Mappings
Value Mappings works the same as other Grafana plugins. This allows displaying alternative text instead of the value based on ranges or regular expressions.
Primarily this is used for N/A for null data, but can be used to indicate a state.
Ex: For a temperature gauge, a value below 0 could be harmful, or a value above 100 could be harmful to a device. A value mapping could be used to display this as an urgent message, or simply indicate a "nominal" reading.

Features
Data operator same as SingleStat panel (avg, sum, current, etc)
Unit formats same as SingleStat
Customizable Font size and type for value displayed and ticks
Animated needle transition (elastic or quadin)
Adjustable Limits
All possible color options for gauge components
Customizable gauge component sizes (needle length, width, tick length, etc)
Threshold colors displayed on gauge
Threshold can modify displayed value and background
Needle animation speed is configurable
Arbitrary degree gauges now supported (default is from 60 to 320)
Value text on gauge can now be moved up/down as needed
Contributing
All contributions are welcome! See the CONTRIBUTING.md doc for more information.
Acknowledgements
This panel is based on the "SingleStat" panel by Grafana, along with large portions of these excellent D3 examples:
- https://oliverbinns.com/articles/D3js-gauge/
- http://bl.ocks.org/tomerd/1499279
- http://bl.ocks.org/dustinlarimer/5888271 Markers!
Contributors
Brian Gann 💻 📖 🚧 | Clinton Judy 💻 | Dan Cech 💻 | Jasper Hafkenscheid 💻 | Ole Martin Ruud 💻 |
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Grafana Cloud Free
- Free tier: Limited to 3 users
- Paid plans: $55 / user / month above included usage
- Access to all Enterprise Plugins
- Fully managed service (not available to self-manage)
Self-hosted Grafana Enterprise
- Access to all Enterprise plugins
- All Grafana Enterprise features
- Self-manage on your own infrastructure
Installing D3 Gauge on Grafana Cloud:
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Warning
Plugin installation from this page will be removed in February 2026. Use the Plugin Catalog in your Grafana instance instead. Refer to Install a plugin in the Grafana documentation for more information.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Warning
Plugin installation from this page will be removed in February 2026. Use the Plugin Catalog in your Grafana instance instead. Refer to Install a plugin in the Grafana documentation for more information.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Warning
Plugin installation from this page will be removed in February 2026. Use the Plugin Catalog in your Grafana instance instead. Refer to Install a plugin in the Grafana documentation for more information.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Warning
Plugin installation from this page will be removed in February 2026. Use the Plugin Catalog in your Grafana instance instead. Refer to Install a plugin in the Grafana documentation for more information.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Warning
Plugin installation from this page will be removed in February 2026. Use the Plugin Catalog in your Grafana instance instead. Refer to Install a plugin in the Grafana documentation for more information.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Warning
Plugin installation from this page will be removed in February 2026. Use the Plugin Catalog in your Grafana instance instead. Refer to Install a plugin in the Grafana documentation for more information.
Installing plugins on a Grafana Cloud instance is a one-click install; same with updates. Cool, right?
Note that it could take up to 1 minute to see the plugin show up in your Grafana.
Marketplace plugins
This is a paid plugin developed by a marketplace partner. To purchase an entitlement, sign in first, then fill out the contact form.
Get this plugin
This is a paid for plugin developed by a marketplace partner. To purchase entitlement please fill out the contact us form.
What to expect:
- Grafana Labs will reach out to discuss your needs
- Payment will be taken by Grafana Labs
- Once purchased the plugin will be available for you to install (cloud) or a signed version will be provided (on-premise)
Thank you! We will be in touch.
For more information, visit the docs on plugin installation.
Installing on a local Grafana:
For local instances, plugins are installed and updated via a simple CLI command. Plugins are not updated automatically, however you will be notified when updates are available right within your Grafana.
1. Install the Panel
Use the grafana-cli tool to install D3 Gauge from the commandline:
grafana-cli plugins install The plugin will be installed into your grafana plugins directory; the default is /var/lib/grafana/plugins. More information on the cli tool.
Alternatively, you can manually download the .zip file for your architecture below and unpack it into your grafana plugins directory.
Alternatively, you can manually download the .zip file and unpack it into your grafana plugins directory.
2. Add the Panel to a Dashboard
Installed panels are available immediately in the Dashboards section in your Grafana main menu, and can be added like any other core panel in Grafana.
To see a list of installed panels, click the Plugins item in the main menu. Both core panels and installed panels will appear.
Change Log
All changes noted here.
v2.2.0 (2026-04-21)
Bug Fixes (Rendering and Migration)
- Fix
for...initerating array indices instead of values inrenderMajorTickLabels, causing incorrectmaxLabelLengthcalculation for font scaling - Fix falsy-zero bug where
displayValueof0skipped threshold coloring inrenderCircleGroup,valueColor, andtitleColor(use strict!== nullcheck matching thenumber | nulltype) - Add React
keyprops to threshold band elements to fix missing key warnings and prevent incorrect reconciliation - Fix
migrateTickMapsmissingenabledfield in return value - Fix marker shape migration assigning
MarkerTypeobject tostringfield (now correctly extracts.name) - Fix browser hang when gauge max value is very large (e.g., 6 billion) by lowering tick cap from 500 to 100, adding an iteration guard to prevent runaway loops, and auto-calculating tick spacing when the user changes min/max values (fixes #63)
- Fix threshold band angular misalignment with gauge ticks when using
non-default
zeroTickAngle/maxTickAnglevalues; thedrawBandrotation is now computed as2 * zeroTickAngle + 180instead of being hardcoded tomaxTickAngle(fixes #109) - Fix Needle Length Stem ignoring decimal values by changing
integer: truetointeger: false(fixes #110)
Type Safety
- Replace
anytype ondToRparameter withnumber - Replace
anytypes onpanelHeight/panelWidthwithnumber - Add
AngularPanelPropertiesinterface andAngularPaneltype for migration code, eliminating all 38@ts-ignoresuppressions - Add
AngularFieldConfiginterface for angular fieldConfig migration - Type
migrateValueAndRangeMapsparameter (wasany) - Replace
return {} as anywithreturn {}inPanelMigrationHandler
Code Quality
- Remove all
eslint-disablecomments fromsrc/by inlininggetValuesintouseMemoand narrowing dependency arrays - Increase tick label gap from 1.0x to 1.3x font size for better spacing with unit-formatted labels
Cleanup
- Remove unused
GaugeModelinterface - Remove commented-out
MarkerStartShapes/MarkerEndShapesarrays - Remove unused
GaugePresetOptionsimports and commented-out preset block - Remove unused
PanelChangedHandlerexport - Remove unused
Reactimport inneedle_utils.tsx - Remove unexposed
needleLengthNegCalcfromuseGaugeDimensionsreturn
Testing
- Add 34 migration tests covering
convertOperators,migrateTickMaps,migrateFieldConfig,migrateValueAndRangeMaps,migrateDefaults, and fullPanelMigrationHandlerintegration (threshold migration with custom/default colors, format migration, angular property cleanup) - Migration tests: 4 → 38, total suite: 200 → 234
Build & Config
- Update
.config/scaffolding from latest@grafana/create-plugin - Move shared bundler utilities (
constants.ts,utils.ts) to.config/bundler/ - Centralize webpack copy patterns into
.config/bundler/copyFiles.ts - Add
react/jsx-runtimeandreact/jsx-dev-runtimeto externals for React 19 compatibility - Add
eslint.config.mjsscaffolding header and update README with flat config example - Add
mise.tomlfor Node.js version pinning (24.14.1) - Add AGENTS instructions, e2e testing guide, and build/validate skills
- Change
grafanaDependencyto>=10.0.0with no upper limit
CI
- Replace reusable
grafana/plugin-ci-workflows@v7with inline workflow (build, lint, typecheck, unit tests, Playwright e2e with Grafana version matrix) - Enable Playwright report artifact uploading
- Bump
grafana/plugin-actions/build-pluginv1.0.2 → v1.2.0 - Bump
grafana/plugin-actions/e2e-versionv1.1.2 → v1.2.1 - Bump
magefile/mage-actionv3.1.0 → v4.0.0 - Bump
actions/upload-artifactv6 → v7,actions/download-artifactv7 → v8 - Bump
actions/github-scriptv8.0.0 → v9.0.0 - Bump
tj-actions/changed-filesv47 → v47.0.6 inpr-files.yml - Include
grafana-devimage in the e2e version matrix (skip-grafana-dev-image: falseinci.yml) - Remove
masterbranch references, pin actions to version tags - Clean up scaffolding comments in release.yml
- Replace Dependabot with Renovate: add
renovate.jsonwith weekly Monday schedule, grouped non-major dev/prod bumps, vulnerability alerts,lockFileMaintenance, a rule blocking@grafana/**@13.x(pendinggrafanaDependencyupper-bound bump), and a rule pinning@types/nodebelow v25 to matchengines.node >= 24 - Remove
.github/dependabot.yml(superseded by Renovate) - Add
.github/workflows/lint-actions.yml— runsactionlintandzizmoron PRs and pushes tomainthat touch.github/workflows/** - Grant
security-events: writeandactions: readto thezizmorjob inlint-actions.ymlsozizmorcore/zizmor-actioncan upload its SARIF report viagithub/codeql-action/upload-sarif(previously failed onmainwith "Resource not accessible by integration") - Fix actionlint findings surfaced by the new workflow:
- Quote
$GITHUB_OUTPUT,$PWD, and metadata vars inci.yml(SC2086); drop uselesscatand consolidate>>redirects in theGet plugin metadatastep (SC2002, SC2129, SC2155) - Quote
$GITHUB_OUTPUTinis-compatible.ymland collapse the folded-scalarrun:into a plain block - Replace
ubuntu-x64-smallrunner label withubuntu-latestinversion-bump-changelog.yml(scaffolding leftover; this repo is not on Grafana Labs self-hosted runners)
- Quote
- Pin all third-party GitHub Actions to full-length commit SHAs with a
trailing version comment (required by
zizmor). Covers everyuses:acrossci.yml,bundle-stats.yml,coverage.yml,cp-update.yml,is-compatible.yml,pr-files.yml,release-please.yml,release.yml, andversion-bump-changelog.yml
Docs
- Update
AGENTS.mdAction Pinning rule: require full-length commit SHAs with a trailing version comment (was: version tags). Reflects thezizmor-enforced policy. - Restructure
AGENTS.mdaround the TheRealSeanDonahoe/agents-md template. Sections 0–9 (non-negotiables, simplicity, surgical changes, goal-driven execution, tool use, session hygiene, communication style, ask-vs-proceed, self-improvement) and sections 11–12 follow upstream; all prior project-specific content (stack, commands, layout, conventions, forbidden) now lives under Section 10. Every line now wraps at 120 chars, so the repo's.markdownlint.yamlrule applies cleanly (no per-fileMD013disable needed). cspell.config.json: add proper names and tool names referenced in the new template (Andrej,Cherny,Donahoe,IJFW,Karpathy,cking,importme,negotiables,zizmor).- Add an E2E targeting subsection to
AGENTS.md§10 Testing:- Ours →
data-testid. - Grafana option builder ≥ 11.0.0 →
selectors.components.PanelEditor.OptionsPane.fieldInput(<label>)via@grafana/plugin-e2e. - Grafana option builder ≥ 12.0.0 → also
label[for="<plugin-id>-<option-path>"]with.first(). Do not use this below Grafana 12 — confirmed failing on 10.0.13 / 10.2.9 / 11.1.13 / 11.5.10 in PR #173 CI. - Always gate edit-mode interaction tests on a
grafanaVersionfloor viatest.skipin a describe-levelbeforeEach— panel-editor chrome diverges across majors. This repo's current floor is 12.0.0. - Always verify on the matrix floor (not just
pnpm server's default image) before declaring a locator stable.
- Ours →
New Features
- Add
computeTickSpacingutility that calculates human-friendly ("nice number") tick intervals for any value range - Auto-fill tick spacing when min/max values change in the panel editor, only when the new range would exceed the 100-tick limit (preserves user-configured spacing otherwise)
- Show warning icon with tooltip when tick count is clamped, including suggested spacing values
- Use
@grafana/uiInputcomponent inRangeEditorfor theme consistency - Sync
RangeEditorlocal state when external value prop changes (undo/reset) - Add "Show Value on Gauge" toggle to hide/show the numeric value display (fixes #101)
- Add "Show Tick Labels" toggle to hide/show the tick mark labels (fixes #101)
- Add "Wrap Values to Range" option under Limits for compass-style gauges; normalizes out-of-range values using modulo arithmetic (e.g., -90 becomes 270 for a 0-360 range) (related to #13)
- Remove hardcoded decimals default of 2; now uses Grafana's auto
- Add provisioned compass dashboard for testing
- Add "Format Tick Labels with Unit" option under Gauge Readings; formats tick labels using the configured unit and decimals (e.g., 100000000 displays as "100 MB/s") (related to #57)
Panel Editor UX
- Rename "Show title" to "Show Display Name on Gauge" and move above Stat in Standard options
- Rename "Title Font/Size" to "Display Name Font/Size"
- Rename "Title Y-Offset" to "Display Name Y-Offset (Vertical)"
- Rename "Value Y-Offset" to "Value Y-Offset (Vertical)"
- Reorder font settings: Display Name, Value, Tick Label
- Add inline description to Tick Maps editor section
- Fix
needleCrossLimitDegreesdefault (10 → 5) to match description - Increase vertical spacing between display name and value labels
Testing Infrastructure
- Suppress jsdom SVG tag warnings (
<path>,<marker>,<defs>) in test output viajest-setup.jsconsole filter - Suppress i18next promotional banner in test output
E2E Fixes
- Rewrite
tests/grafana-version.spec.tsto read the Grafana version from thegrafanaVersionfixture in@grafana/plugin-e2e(which readswindow.grafanaBootData.settings.buildInfo.version) instead of clicking the Help toolbar button. Avoids the Grafana 13.x / React 19 preview portal overlay that intercepted the click and timed out the test (fixes #164). - Add plugin-level smoke test
tests/gauge-smoke.spec.tsplus a provisioned dashboardprovisioning/dashboards/dashboards/D3Gauge-Smoke.json. The test navigates to the provisionedSmoke Gaugepanel (uidbriangann-gauge-smoke), waits for the gauge SVG to become visible, and asserts the render output (multiple<path>elements and at least one<text>label). The panel is located viagetPanelById(1)and the gauge SVG is disambiguated from the panel-header icon by itsviewBox="0,0,…"attribute. - Add panel-level interaction test
tests/gauge-interactions.spec.tscovering three edit-mode flows:Show Value on Gaugetoggle — text-element count drops when the value label is hidden and returns when toggled back on.Show Threshold Band On Gaugetoggle — path-element count drops when the three bands are hidden and returns when toggled back on.- Tick maps — clicking
Add Tick Map, entering value50+ textHALF, and asserting the gauge renders a<text>withHALFin place of the50tick label. Tests skip on Grafana<12.0.0— the panel-editor chrome (options group aria-labels, option-idlabel[for]attributes) only stabilizes around Grafana 12. Thegauge-smoke.spec.tsrender check keeps coverage for 10.x / 11.x.
Testing (interaction coverage)
- Add
data-testid="tickmap-add-button"on theAdd Tick Mapbutton inTickMapEditoranddata-testid="tickmap-value-input-<order>"/data-testid="tickmap-text-input-<order>"on the Value and Text inputs inTickMapItem, so the tick-maps interaction test can target them without relying on Grafana-generated class names.
E2E Testing
- Add Playwright config with
@grafana/plugin-e2eauth and Chromium project - Add
tests/grafana-version.spec.tssmoke test - Replace Cypress e2e scripts with
playwright test - Add
@playwright/testand@grafana/plugin-e2edev dependencies
Docker & Provisioning
- Rewrite
docker-compose.yamlwith healthcheck, port mapping, volume mounts - Add provisioning dashboards, datasource, and provider configs
Plugin Compatibility
- Bump
grafanaDependencyfrom>=9.3.16to>=10 <=13.0 - Remove deprecated
grafanaVersionfield
Dependencies
@testing-library/react14.0.0 → 15.0.7 (fixesReactDOMTestUtils.actwarnings)@grafana/eslint-config8.2.0 → 9.0.0@stylistic/eslint-plugin-ts2.13.0 → 4.4.1@types/node20.19.37 → 24.x (pinned to matchengines.node >= 24; do not drift to 25 while the engine floor is 24)cspell7.3.8 → 10.0.0eslint-config-prettier8.10.2 → 10.1.8eslint-plugin-jsdoc51.4.1 → 62.9.0eslint-plugin-react-hooks5.2.0 → 7.0.1 (held at 7.0.1 via~range; 7.1.x addsreact-hooks/immutabilityrule that requires code changes inGaugePanel.tsx, tracked separately)glob10.5.0 → 13.0.6@grafana/plugin-e2e3.4.12 → 3.5.1@swc/core1.15.24 → 1.15.30@typescript-eslint/eslint-plugin8.58.1 → 8.59.0@typescript-eslint/parser8.58.1 → 8.59.0webpack5.106.0 → 5.106.2uuid13.0.0 → 14.0.0 (drops Node 18 support, expects globalcrypto; safe underengines.node >= 24)- Remove deprecated
@types/glob(glob 13 ships own types)
Refactor
- Replace needle
useRefwithuseId()+ DOM id lookup (fixesreact-hooks/refslint error fromeslint-plugin-react-hooks@7, gives each gauge instance a unique needle id for multi-panel dashboards)
v2.0.4 (unreleased)
Bug Fixes
- Fixed needle animation jumping instead of smoothly transitioning between values
- Replaced two-effect state-based animation with single-effect ref-based pattern
- Clamped values now animate to the limit instead of snapping instantly
- Needle stays buried when consecutive values exceed limits, animates back when value returns in range
- Removed deprecated
collapsibleandheadingprops from TickMaps editor - Fixed
getNeedleAngleMaximumto usemaxNeedleAngleinstead ofmaxTickAnglefor non-buried needle clamping - Fixed
renderThresholdBandscrash when thresholds are undefined - Fixed browser hard-lock when using fractional or zero tick spacing values (#114)
- Added safety cap of 500 maximum ticks to prevent runaway computation
- Fixed floating-point comparison for minor/major tick overlap detection
Performance
- Share a single memoized
valueScale(d3scaleLinear) across hooks instead of creating three independent instances - Reuse d3
line()generator instead of recreating per tick - Pre-compute tick path strings in
useTickComputations(skip recomputation on value-only updates) - Memoize metrics computation, SVG dimensions, and font size calculations in GaugePanel
- Memoize all SVG creation functions (circles, ticks, labels, needle, thresholds) in Gauge
- Add stable React keys for tick mark elements
- Narrow
useEffectdependency arrays to prevent unnecessary re-renders - Memoize
createNeedleMarkersin Gauge to avoid recreating SVG defs on every render - Memoize
gaugeRadiusCalcand inline dimension styles in GaugePanel
Features
- Allow fractional tick spacing (e.g., 0.1 Hz) in panel editor for minor and major ticks (#114)
Refactoring
- Extract render functions to
gauge_render.tsx, styles togauge_styles.ts - Extract custom hooks:
useNeedleAnimation,useTickComputations,useGaugeDimensions - Remove all
eslint-disable react-hooks/exhaustive-depscomments from Gauge component - Simplify GaugePanel: remove dead code, use prop spread, extract styles
- Organize Gauge files into dedicated
src/components/Gauge/folder - Remove unused
marginstate variable - Consolidate
useGaugeDimensionsfrom useState+useEffect to single useMemo - Type all
TickMapItemPropscallbacks (removeanytypes) and remove unusedenabled/contextprops - Rewrite
TickMapItemas a controlled component (remove duplicate local state) - Consolidate
TickMapEditorstate: merge parallelisOpenarray intoTickMapItemTracker - Replace in-place
arrayMovemutation with immutableswapItems/reorderhelpers - Wrap all
TickMapEditorcallbacks inuseCallback
Tests
- Added unit tests for
utils.tsx,gauge_render.tsx,useGaugeDimensions,useNeedleAnimation,useTickComputations,GaugePanel,Gauge,TickMapItem, andTickMapEditor - Restructured
renderThresholdBandstests with nested describes for early returns, 2-step, 3+ step, and Infinity threshold scenarios - Added edge case tests for
needle_utilscross-limit clamping branches - 181 tests across 12 suites
v2.0.3 - 2026-04-01
- Updated pnpm/action-setup from v4 to v5
- Updated magefile/mage-action from v3.1.0 to v4.0.0
- Aligned release workflow Node version to 24
- Changed release workflow Go version to use go.mod instead of hardcoded v1.21
- Upgraded @grafana/data, i18n, runtime, schema, ui from 12.4.1 to 12.4.2
- Upgraded minor/patch dependencies (@babel/core, @swc/core, @swc/helpers, @swc/jest, swc-loader, @types/lodash, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, css-loader, eslint-config-prettier, eslint-webpack-plugin, glob, semver, terser-webpack-plugin, webpack)
- Upgraded sass from 1.63.2 to 1.98.0
- Upgraded sass-loader from 13.3.1 to 13.3.3
- Upgraded typescript from 5.5.4 to 5.9.3
- Upgraded uuid from 9.x to 13.0.0, removed @types/uuid (types now bundled)
v2.0.2 - 2026-03-16
- Removed suggestions supplier
- Upgraded GitHub Actions to latest versions across all workflows
- Renamed CLAUDE.md to AGENTS.md
- Upgraded minor/patch dependencies (@emotion/css, tslib, d3, @testing-library/jest-dom, @types/d3-scale, @grafana packages)
v2.0.1 - 2023-11-13
- Fix font sizing during migrations
- Autoscales font according to gauge size
v2.0.0 - 2023-10-20
- Rewritten from Angular to React
- NEW: Needle Width can now be specified
- NEW: Thresholds now use the standard Grafana threshold mechanics
- NEW: Needle can optionally exceed the tick mark (min and max) to show values that are outside of limits
- NEW: Needle Center can use all marker types, with arrow-inverse added to options
- Switched to
pnpm
v0.0.9 - 2021-04-21
- Add option to display needle arrow
- Update packages
v0.0.8 - 2020-10-26
- Signed Plugin!
- Updated build process
v0.0.7 - 2020-04-18
- Fixes
- Update to typescript and using standardized build process.
- Simplified value display
v0.0.1
- Initial commit






