Show only first and last labels on Gauge Chart

This quick tutorial will explain how you can limit your Gauge chart axis to showing only its first and last labels.

Normally, a Gauge chart axis will show a number of intermediate labels.

See the Pen amCharts 4: Gauge chart showing only first and last label by amCharts team (@amcharts) on CodePen.0

But what if we want to show only the first and last one?

There's a trick: set axis renderer's minGridDistance to some large value.

axis.renderer.minGridDistance = 10000;
axis.renderer.minGridDistance = 10000;
{
// ...
"series": [{
// ...
"renderer": {
"minGridDistance": 1000
}
}]
}

That's it.

See the Pen amCharts 4: Gauge chart showing only first and last label by amCharts team (@amcharts) on CodePen.0