@@ -61,18 +61,22 @@ export class Row extends ChildProperty<Row> {
6161 public nearSizes : number [ ] = [ ] ;
6262 /** @private */
6363 public farSizes : number [ ] = [ ] ;
64+ /** @private */
65+ public insideFarSizes : number [ ] = [ ] ;
66+ /** @private */
67+ public insideNearSizes : number [ ] = [ ] ;
6468 /**
6569 * Measure the row size
6670 *
6771 * @returns {void }
6872 * @private
6973 */
70- public computeSize ( axis : Axis , scrollBarHeight : number ) : void {
74+ public computeSize ( axis : Axis , scrollBarHeight : number , definition : Row | Column ) : void {
7175 let width : number = 0 ;
7276 const innerPadding : number = 5 ;
7377 if ( axis . visible && axis . internalVisibility ) {
7478 width += ( axis . findTickSize ( axis . crossInAxis ) + scrollBarHeight +
75- axis . findLabelSize ( axis . crossInAxis , innerPadding ) + axis . lineStyle . width * 0.5 ) ;
79+ axis . findLabelSize ( axis . crossInAxis , innerPadding , definition ) + axis . lineStyle . width * 0.5 ) ;
7680 }
7781
7882 if ( axis . isAxisOpposedPosition ) {
@@ -116,6 +120,10 @@ export class Column extends ChildProperty<Column> {
116120 /** @private */
117121 public farSizes : number [ ] = [ ] ;
118122 /** @private */
123+ public insideFarSizes : number [ ] = [ ] ;
124+ /** @private */
125+ public insideNearSizes : number [ ] = [ ] ;
126+ /** @private */
119127 private padding : number = 0 ;
120128
121129 /**
@@ -125,12 +133,12 @@ export class Column extends ChildProperty<Column> {
125133 * @private
126134 */
127135
128- public computeSize ( axis : Axis , scrollBarHeight : number ) : void {
136+ public computeSize ( axis : Axis , scrollBarHeight : number , definition : Row | Column ) : void {
129137 let height : number = 0 ;
130138 const innerPadding : number = 5 ;
131139 if ( axis . visible && axis . internalVisibility ) {
132140 height += ( axis . findTickSize ( axis . crossInAxis ) + scrollBarHeight +
133- axis . findLabelSize ( axis . crossInAxis , innerPadding ) + axis . lineStyle . width * 0.5 ) ;
141+ axis . findLabelSize ( axis . crossInAxis , innerPadding , definition ) + axis . lineStyle . width * 0.5 ) ;
134142 }
135143 if ( axis . isAxisOpposedPosition ) {
136144 this . farSizes . push ( height ) ;
@@ -1045,7 +1053,7 @@ export class Axis extends ChildProperty<Axis> {
10451053 * @returns {number } labelSize
10461054 * @private
10471055 */
1048- public findLabelSize ( crossAxis : Axis , innerPadding : number ) : number {
1056+ public findLabelSize ( crossAxis : Axis , innerPadding : number , definition : Row | Column ) : number {
10491057 let titleSize : number = 0 ; const isHorizontal : boolean = this . orientation === 'Horizontal' ;
10501058 if ( this . title ) {
10511059 this . titleSize = measureText ( this . title , this . titleStyle ) ;
@@ -1056,9 +1064,6 @@ export class Axis extends ChildProperty<Axis> {
10561064 titleSize = ( titleSize * this . titleCollection . length ) ;
10571065 }
10581066 }
1059- if ( this . labelPosition === 'Inside' ) {
1060- return titleSize + innerPadding ;
1061- }
10621067 let diff : number ;
10631068 let value : number ;
10641069 let labelSize : number = titleSize + innerPadding + this . titlePadding + this . labelPadding +
@@ -1075,6 +1080,15 @@ export class Axis extends ChildProperty<Axis> {
10751080 labelSize = ( diff < labelSize ) ? ( labelSize - diff ) : 0 ;
10761081 }
10771082 }
1083+ if ( this . isAxisOpposedPosition ) {
1084+ definition . insideFarSizes . push ( labelSize ) ;
1085+ }
1086+ else {
1087+ definition . insideNearSizes . push ( labelSize ) ;
1088+ }
1089+ if ( this . labelPosition === 'Inside' ) {
1090+ return titleSize + innerPadding ;
1091+ }
10781092 return labelSize ;
10791093 }
10801094 /**
0 commit comments