html/scripts/highchart/modules/treemap.src.js
function () {
			var series = this,
				points = series.points,
				options,
				level,
				dataLabelsGroup = this.dataLabelsGroup,
				dataLabels;
			each(points, function (point) {
				if (point.node.isVisible) {
					level = series.levelMap[point.level];
					if (!point.isLeaf || level) {
						options = undefined;
						// If not a leaf, then label should be disabled as default
						if (!point.isLeaf) {
							options = {enabled: false};
						}
						if (level) {
							dataLabels = level.dataLabels;
							if (dataLabels) {
								options = merge(options, dataLabels);
								series._hasPointLabels = true;
							}
						}
						options = merge(options, point.options.dataLabels);
						point.dlOptions = options;
					} else {
						delete point.dlOptions;
					}
				}
			});
			this.dataLabelsGroup = this.group;
			Series.prototype.drawDataLabels.call(this);
			this.dataLabelsGroup = dataLabelsGroup;
		}
function () {
			var series = this,
				points = series.points,
				options,
				level,
				dataLabelsGroup = this.dataLabelsGroup,
				dataLabels;
			each(points, function (point) {
				if (point.node.isVisible) {
					level = series.levelMap[point.level];
					if (!point.isLeaf || level) {
						options = undefined;
						// If not a leaf, then label should be disabled as default
						if (!point.isLeaf) {
							options = {enabled: false};
						}
						if (level) {
							dataLabels = level.dataLabels;
							if (dataLabels) {
								options = merge(options, dataLabels);
								series._hasPointLabels = true;
							}
						}
						options = merge(options, point.options.dataLabels);
						point.dlOptions = options;
					} else {
						delete point.dlOptions;
					}
				}
			});
			this.dataLabelsGroup = this.group;
			Series.prototype.drawDataLabels.call(this);
			this.dataLabelsGroup = dataLabelsGroup;
		}
function ( ) { var series = this , points = series . points , options , level , dataLabelsGroup = this . dataLabelsGroup , dataLabels ; each ( points , function ( point ) { if ( point . node . isVisible ) { level = series . levelMap [ point . level ] ; if ( ! point . isLeaf || level ) { options = undefined ; // If not a leaf, then label should be disabled as default if ( ! point . isLeaf ) { options = { enabled : false } ; } if ( level ) { dataLabels = level . dataLabels ; if ( dataLabels ) { options = merge ( options , dataLabels ) ; series . _hasPointLabels = true ; } } options = merge ( options , point . options . dataLabels ) ; point . dlOptions = options ; } else { delete point . dlOptions ; } } } ) ; this . dataLabelsGroup = this . group ; Series . prototype . drawDataLabels . call ( this ) ; this . dataLabelsGroup = dataLabelsGroup ; }
Extend drawDataLabels with logic to handle the levels option
Extend drawDataLabels with logic to handle the levels option