Github page - download (from github)
Call to legend method with default options
Call to legend method with options : customized text, callback function and 'distinct' mode. Decimal precision has been set to 2.
Call to legend method with options : 'discontinuous' mode, and descending order.
// getting the color ramp from chroma by passing min, max values and number of classes
var color_x = chroma.scale('RdYlGn').domain([serie7.min(),serie7.max()], 5).colors();
// setting colors into geostats
serie7.setColors(color_x);
// rendering the html legend with geostats
jQuery('#legend5').html(serie7.getHtmlLegend(null, null, 1));
// displaying map with openlayers
initChromaSample(color_x, class_x);