'use strict' ; import type ScatterPoint from '../Series/Scatter/ScatterPoint' ; import type ScatterSeries from '../Series/Scatter/ScatterSeries' ; import type SVGAttributes from '../Core/Renderer/SVG/SVGAttributes' ; import H from '../Core/Globals.js' ; const { noop , seriesTypes } = H ; import Point from '../Core/Series/Point.js' ; import U from '../Core/Utilities.js' ; const { defined , addEvent } = U ; declare module '../Core/Series/PointLike' { interface PointLike { dataLabelOnNull ? : boolean ; } } addEvent ( Point , 'afterSetState' , function ( e ? ) : void { const point = this as ColorMapMixin . ColorMapPoint ; if ( point . moveToTopOnHover && point . graphic ) { point . graphic . attr ( { zIndex : e && e . state === 'hover' ? 1 : 0 } ) ; } } ) ; private mixin const PointMixin = { dataLabelOnNull : true , moveToTopOnHover : true , private isValid : function ( this ) : boolean { return ( this . value !== null && this . value !== Infinity && this . value !== - Infinity ) ; } } ; private mixin const SeriesMixin = { pointArrayMap : [ 'value' ] , axisTypes : [ 'xAxis' , 'yAxis' , 'colorAxis' ] , trackerGroups : [ 'group' , 'markerGroup' , 'dataLabelsGroup' ] , getSymbol : noop , parallelArrays : [ 'x' , 'y' , 'value' ] , colorKey : 'value' , pointAttribs : seriesTypes . column . prototype . pointAttribs , private function param { Highcharts . Point } point return { Highcharts . SVGAttributes } colorAttribs : function ( this , point ) : SVGAttributes { const ret = { } ; if ( defined ( point . color ) && ( ! point . state || point . state === 'normal' ) ) { ( ret as any ) [ this . colorProp || 'fill' ] = point . color ; } return ret ; } } ; namespace ColorMapMixin { export interface ColorMapPoint extends ScatterPoint { dataLabelOnNull ? : boolean ; moveToTopOnHover ? : boolean ; series : ColorMapSeries ; value : ( number | null ) ; isValid ( ) : boolean ; } export interface ColorMapSeries extends ScatterSeries { colorProp ? : string ; data : Array < ColorMapPoint > ; parallelArrays : Array < string > ; pointArrayMap : Array < string > ; points : Array < ColorMapPoint > ; trackerGroups : Array < string > ; colorAttribs ( point ) : SVGAttributes ; } } const ColorMapMixin = { PointMixin , SeriesMixin } ; export default ColorMapMixin ;