Legend
jbrown15 opened this issue · comments
Is there a way to add a legend for the color scale of the heatmap? Im using leaf.heat which is based on this.
You set the gradient with an object of the form {<stop>: <color>}
where stop
ranges from 0
to 1
. You can use the same object to generate a legend manually.
// set gradient colors as {<stop>: '<color>'}, e.g. {0.4: 'blue', 0.65: 'lime', 1: 'red'}
heat.gradient(grad);