'use strict' ; import SeriesRegistry from '../../Core/Series/SeriesRegistry.js' ; const { series : Series } = SeriesRegistry ; import TreemapUtilities from './TreemapUtilities.js' ; import U from '../../Core/Utilities.js' ; const { addEvent , extend } = U ; let treemapAxisDefaultValues = false ; addEvent ( Series , 'afterBindAxes' , function ( ) : void { let series = this , xAxis = series . xAxis , yAxis = series . yAxis , treeAxis ; if ( xAxis && yAxis ) { if ( series . is ( 'treemap' ) ) { treeAxis = { endOnTick : false , gridLineWidth : 0 , lineWidth : 0 , min : 0 , minPadding : 0 , max : TreemapUtilities . AXIS_MAX , maxPadding : 0 , startOnTick : false , title : void 0 , tickPositions : [ ] } ; extend ( yAxis . options , treeAxis ) ; extend ( xAxis . options , treeAxis ) ; treemapAxisDefaultValues = true ; } else if ( treemapAxisDefaultValues ) { yAxis . setOptions ( yAxis . userOptions ) ; xAxis . setOptions ( xAxis . userOptions ) ; treemapAxisDefaultValues = false ; } } } ) ;