This is a demo tutorial. While there is no step-by-step commentary available (yet), the live demo below is fully functional. Feel free to open it for full source code.
This demo shows, how we can add a scale to a Heat Legend by pushing regular ValueAxis
into it.
Code
let heatAxis = heatLegend.children.push(am5xy.ValueAxis.new(root, { strictMinMax: true, renderer: am5xy.AxisRendererX.new(root, { inversed: true }) })); heatAxis.adapters.add("min", function() { return series.getPrivate("valueLow"); }); heatAxis.adapters.add("max", function() { return series.getPrivate("valueHigh") });
var heatAxis = heatLegend.children.push(am5xy.ValueAxis.new(root, { strictMinMax: true, renderer: am5xy.AxisRendererX.new(root, { inversed: true }) })); heatAxis.adapters.add("min", function() { return series.getPrivate("valueLow"); }); heatAxis.adapters.add("max", function() { return series.getPrivate("valueHigh") });
Demo
See the Pen
Heat legend with scale by amCharts team (@amcharts)
on CodePen.0