Javascript amcharts5 heat map heat legend add gradient color

I am sorry this question may not be smooth using a translator.

I using amcharts5.
I’d like to add some color to the gradients.
The only thing found was to specify start color and end color.
The other gradation demo was not to have a smooth color, but to specify a color for each value.

https://www.amcharts.com/demos/heat-map-with-legend/

When using code, you can specify only two colors.

https://www.amcharts.com/docs/v5/tutorials/a-custom-heat-legend-using-a-gradient/

This demo wasn’t the gradient addition I wanted.
I want to add the desired color and designate offset for each color so that it connects naturally.

color: [
‘#313695’, ‘#00a31b’, ‘#f0d800’, ‘#f06c00’, ‘#f00000’, ‘#cc0055’
]

I hope the color will be designated and it will continue smoothly.

enter image description here

I want to add colors to make a legend like the image.