Sha256: 108eefa9e7f38fe2641040e4f92a34ad73d0bb3a2786c81217c071ba53bb5187

Contents?: true

Size: 1.1 KB

Versions: 12

Compression:

Stored size: 1.1 KB

Contents

(function (Highcharts) {
	var seriesTypes = Highcharts.seriesTypes,
		each = Highcharts.each;
	
	seriesTypes.heatmap = Highcharts.extendClass(seriesTypes.map, {
		colorKey: 'z',
		useMapGeometry: false,
		pointArrayMap: ['y', 'z'],
		translate: function () {
			var series = this,
				options = series.options,
				dataMin = Number.MAX_VALUE,
				dataMax = Number.MIN_VALUE;

			series.generatePoints();
	
			each(series.data, function (point) {
				var x = point.x,
					y = point.y,
					value = point.z,
					xPad = (options.colsize || 1) / 2,
					yPad = (options.rowsize || 1) / 2;

				point.path = [
					'M', x - xPad, y - yPad,
					'L', x + xPad, y - yPad,
					'L', x + xPad, y + yPad,
					'L', x - xPad, y + yPad,
					'Z'
				];
				
				point.shapeType = 'path';
				point.shapeArgs = {
					d: series.translatePath(point.path)
				};
				
				if (typeof value === 'number') {
					if (value > dataMax) {
						dataMax = value;
					} else if (value < dataMin) {
						dataMin = value;
					}
				}
			});
			
			series.translateColors(dataMin, dataMax);
		},
		
		getBox: function () {}
			
	});
	
}(Highcharts));

Version data entries

12 entries across 12 versions & 4 rubygems

Version Path
activeadmin_ueditor-0.2.0 public/assets/ueditor/third-party/highcharts/modules/heatmap.src.js
neditor_rails-0.1.0 vendor/assets/javascripts/neditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails5-0.3.1 app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails5-0.3.0 app/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.2.3 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.2.2 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.2.1 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.2.0 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.1.0 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.0.5 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.0.4 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js
baidu_ueditor_rails-0.0.3 vendor/assets/javascripts/ueditor/third-party/highcharts/modules/heatmap.src.js