html/scripts/highchart/modules/heatmap.src.js
function () {
		var axis = this,
			chart = this.chart,
			legendItems = this.legendItems,
			legendOptions = chart.options.legend,
			valueDecimals = legendOptions.valueDecimals,
			valueSuffix = legendOptions.valueSuffix || '',
			name;

		if (!legendItems.length) {
			each(this.dataClasses, function (dataClass, i) {
				var vis = true,
					from = dataClass.from,
					to = dataClass.to;
				
				// Assemble the default name. This can be overridden by legend.options.labelFormatter
				name = '';
				if (from === UNDEFINED) {
					name = '< ';
				} else if (to === UNDEFINED) {
					name = '> ';
				}
				if (from !== UNDEFINED) {
					name += Highcharts.numberFormat(from, valueDecimals) + valueSuffix;
				}
				if (from !== UNDEFINED && to !== UNDEFINED) {
					name += ' - ';
				}
				if (to !== UNDEFINED) {
					name += Highcharts.numberFormat(to, valueDecimals) + valueSuffix;
				}
				
				// Add a mock object to the legend items
				legendItems.push(extend({
					chart: chart,
					name: name,
					options: {},
					drawLegendSymbol: LegendSymbolMixin.drawRectangle,
					visible: true,
					setState: noop,
					setVisible: function () {
						vis = this.visible = !vis;
						each(axis.series, function (series) {
							each(series.points, function (point) {
								if (point.dataClass === i) {
									point.setVisible(vis);
								}
							});
						});
						
						chart.legend.colorizeItem(this, vis);
					}
				}, dataClass));
			});
		}
		return legendItems;
	}
function () {
		var axis = this,
			chart = this.chart,
			legendItems = this.legendItems,
			legendOptions = chart.options.legend,
			valueDecimals = legendOptions.valueDecimals,
			valueSuffix = legendOptions.valueSuffix || '',
			name;

		if (!legendItems.length) {
			each(this.dataClasses, function (dataClass, i) {
				var vis = true,
					from = dataClass.from,
					to = dataClass.to;
				
				// Assemble the default name. This can be overridden by legend.options.labelFormatter
				name = '';
				if (from === UNDEFINED) {
					name = '< ';
				} else if (to === UNDEFINED) {
					name = '> ';
				}
				if (from !== UNDEFINED) {
					name += Highcharts.numberFormat(from, valueDecimals) + valueSuffix;
				}
				if (from !== UNDEFINED && to !== UNDEFINED) {
					name += ' - ';
				}
				if (to !== UNDEFINED) {
					name += Highcharts.numberFormat(to, valueDecimals) + valueSuffix;
				}
				
				// Add a mock object to the legend items
				legendItems.push(extend({
					chart: chart,
					name: name,
					options: {},
					drawLegendSymbol: LegendSymbolMixin.drawRectangle,
					visible: true,
					setState: noop,
					setVisible: function () {
						vis = this.visible = !vis;
						each(axis.series, function (series) {
							each(series.points, function (point) {
								if (point.dataClass === i) {
									point.setVisible(vis);
								}
							});
						});
						
						chart.legend.colorizeItem(this, vis);
					}
				}, dataClass));
			});
		}
		return legendItems;
	}
function ( ) { var axis = this , chart = this . chart , legendItems = this . legendItems , legendOptions = chart . options . legend , valueDecimals = legendOptions . valueDecimals , valueSuffix = legendOptions . valueSuffix || '' , name ; if ( ! legendItems . length ) { each ( this . dataClasses , function ( dataClass , i ) { var vis = true , from = dataClass . from , to = dataClass . to ; // Assemble the default name. This can be overridden by legend.options.labelFormatter name = '' ; if ( from === UNDEFINED ) { name = '< ' ; } else if ( to === UNDEFINED ) { name = '> ' ; } if ( from !== UNDEFINED ) { name += Highcharts . numberFormat ( from , valueDecimals ) + valueSuffix ; } if ( from !== UNDEFINED && to !== UNDEFINED ) { name += ' - ' ; } if ( to !== UNDEFINED ) { name += Highcharts . numberFormat ( to , valueDecimals ) + valueSuffix ; } // Add a mock object to the legend items legendItems . push ( extend ( { chart : chart , name : name , options : { } , drawLegendSymbol : LegendSymbolMixin . drawRectangle , visible : true , setState : noop , setVisible : function ( ) { vis = this . visible = ! vis ; each ( axis . series , function ( series ) { each ( series . points , function ( point ) { if ( point . dataClass === i ) { point . setVisible ( vis ) ; } } ) ; } ) ; chart . legend . colorizeItem ( this , vis ) ; } } , dataClass ) ) ; } ) ; } return legendItems ; }
Get the legend item symbols for data classes
Get the legend item symbols for data classes