@@ -59,7 +59,7 @@ class IntervalBrushFilter implements AxisBrushFilter {
5959 lower : number ,
6060 upper : number ,
6161 lowerOpen : boolean ,
62- upperOpen : boolean
62+ upperOpen : boolean ,
6363 ) {
6464 this . _lower = lower ;
6565 this . _upper = upper ;
@@ -121,7 +121,7 @@ export class Axis {
121121 svgProps : tf_hparams_parallel_coords_plot_interaction_manager . SVGProperties ,
122122 schema : Schema ,
123123 interactionManager : tf_hparams_parallel_coords_plot_interaction_manager . InteractionManager ,
124- colIndex : number
124+ colIndex : number ,
125125 ) {
126126 this . _svgProps = svgProps ;
127127 this . _schema = schema ;
@@ -152,7 +152,7 @@ export class Axis {
152152 this . _brushFilter = this . _buildBrushFilter (
153153 this . brushSelection ( ) ! ,
154154 this . scaleType ( ) ! ,
155- this . yScale ( )
155+ this . yScale ( ) ,
156156 ) ;
157157 }
158158 /**
@@ -165,7 +165,7 @@ export class Axis {
165165 // Pass a copy since createAxisScale may permute the domainValues array.
166166 domainValues . slice ( ) ,
167167 this . _svgProps . height ,
168- this . scaleType ( )
168+ this . scaleType ( ) ,
169169 ) ;
170170 // TODO(erez): Try to modify the brush selection so that it selects
171171 // the same subset of the axis domain which was selected before
@@ -216,7 +216,7 @@ export class Axis {
216216 . style ( 'text-anchor' , 'middle' )
217217 . attr ( 'y' , - 9 )
218218 . text ( ( colIndex ) =>
219- tf_hparams_utils . schemaColumnName ( this . _schema , colIndex )
219+ tf_hparams_utils . schemaColumnName ( this . _schema , colIndex ) ,
220220 ) ;
221221 // Add dragging event handlers.
222222 axisParentSel . call (
@@ -233,7 +233,7 @@ export class Axis {
233233 . on ( 'end' , ( ) => {
234234 this . _interactionManager . onDragEnd ( ) ;
235235 axisParent . removeAttribute ( 'is-dragging' ) ;
236- } )
236+ } ) ,
237237 ) ;
238238 // Add the brush.
239239 const d3Brush = d3
@@ -259,7 +259,7 @@ export class Axis {
259259 axisParent . setAttribute ( 'is-brushing' , '' ) ;
260260 this . _interactionManager . onBrushChanged (
261261 this . colIndex ( ) ,
262- d3 . event . selection
262+ d3 . event . selection ,
263263 ) ;
264264 } )
265265 . on ( 'brush' , ( ) => {
@@ -268,7 +268,7 @@ export class Axis {
268268 }
269269 this . _interactionManager . onBrushChanged (
270270 this . colIndex ( ) ,
271- d3 . event . selection
271+ d3 . event . selection ,
272272 ) ;
273273 } )
274274 . on ( 'end' , ( ) => {
@@ -277,7 +277,7 @@ export class Axis {
277277 }
278278 this . _interactionManager . onBrushChanged (
279279 this . colIndex ( ) ,
280- d3 . event . selection
280+ d3 . event . selection ,
281281 ) ;
282282 axisParent . removeAttribute ( 'is-brushing' ) ;
283283 } ) ;
@@ -301,15 +301,15 @@ export class Axis {
301301 private _buildBrushFilter (
302302 brushSelection : d3 . BrushSelection ,
303303 scaleType : ScaleType ,
304- yScale : any /* D3 scale */
304+ yScale : any /* D3 scale */ ,
305305 ) {
306306 if ( brushSelection === null ) {
307307 return new AlwaysPassingBrushFilter ( ) ;
308308 }
309309 if ( scaleType === null ) {
310310 console . error (
311311 "Scale type is null, but brushSelection isn't: " ,
312- brushSelection
312+ brushSelection ,
313313 ) ;
314314 return new AlwaysPassingBrushFilter ( ) ;
315315 }
@@ -321,36 +321,36 @@ export class Axis {
321321 tf_hparams_parallel_coords_plot_utils . continuousScaleInverseImage (
322322 yScale ,
323323 brushSelection [ 0 ] ,
324- brushSelection [ 1 ]
324+ brushSelection [ 1 ] ,
325325 ) ;
326326 return new IntervalBrushFilter (
327327 lower ,
328328 upper ,
329329 /*lowerOpen=*/ false ,
330- /*upperOpen=*/ false
330+ /*upperOpen=*/ false ,
331331 ) ;
332332 }
333333 case ScaleType . QUANTILE : {
334334 const [ lower , upper ] =
335335 tf_hparams_parallel_coords_plot_utils . quantileScaleInverseImage (
336336 yScale ,
337337 brushSelection [ 0 ] ,
338- brushSelection [ 1 ]
338+ brushSelection [ 1 ] ,
339339 ) ;
340340 return new IntervalBrushFilter (
341341 lower as number ,
342342 upper as number ,
343343 /*lowerOpen=*/ false ,
344- /*upperOpen=*/ true
344+ /*upperOpen=*/ true ,
345345 ) ;
346346 }
347347 case ScaleType . NON_NUMERIC :
348348 return new SetBrushFilter (
349349 tf_hparams_parallel_coords_plot_utils . pointScaleInverseImage (
350350 yScale ,
351351 brushSelection [ 0 ] ,
352- brushSelection [ 1 ]
353- )
352+ brushSelection [ 1 ] ,
353+ ) ,
354354 ) ;
355355 }
356356 console . error ( 'Unknown scale type: ' , scaleType ) ;
@@ -375,7 +375,7 @@ export class AxesCollection {
375375 public constructor (
376376 svgProps : tf_hparams_parallel_coords_plot_interaction_manager . SVGProperties ,
377377 schema : Schema ,
378- interactionManager : tf_hparams_parallel_coords_plot_interaction_manager . InteractionManager
378+ interactionManager : tf_hparams_parallel_coords_plot_interaction_manager . InteractionManager ,
379379 ) {
380380 this . _svgProps = svgProps ;
381381 this . _schema = schema ;
@@ -396,7 +396,7 @@ export class AxesCollection {
396396 */
397397 public updateAxes (
398398 options : any ,
399- sessionGroups : tf_hparams_api . SessionGroup [ ]
399+ sessionGroups : tf_hparams_api . SessionGroup [ ] ,
400400 ) {
401401 console . assert ( ! this . isAxisDragging ( ) ) ;
402402 // Traverse options.columns, and update each corresponding axis.
@@ -406,7 +406,7 @@ export class AxesCollection {
406406 let axis = this . _axes [ colIndex ] ;
407407 axis . setDisplayed ( true ) ;
408408 const domainValues = sessionGroups . map ( ( sg ) =>
409- tf_hparams_utils . columnValueByIndex ( this . _schema , sg , colIndex )
409+ tf_hparams_utils . columnValueByIndex ( this . _schema , sg , colIndex ) ,
410410 ) ;
411411 axis . setDomainAndScale ( domainValues , column . scale ) ;
412412 visibleColIndices . add ( colIndex ) ;
@@ -421,7 +421,7 @@ export class AxesCollection {
421421 // Update the DOM.
422422 this . _parentsSel = this . _parentsSel . data (
423423 Array . from ( visibleColIndices ) ,
424- /*key=*/ ( colIndex ) => colIndex
424+ /*key=*/ ( colIndex ) => colIndex ,
425425 ) ;
426426 this . _parentsSel . exit ( ) . remove ( ) ;
427427 this . _parentsSel = this . _parentsSel
@@ -447,7 +447,7 @@ export class AxesCollection {
447447 return this . _stationaryAxesPositions
448448 . domain ( )
449449 . map ( ( colIndex ) =>
450- mapFunction ( this . getAxisPosition ( colIndex ) , this . _axes [ colIndex ] )
450+ mapFunction ( this . getAxisPosition ( colIndex ) , this . _axes [ colIndex ] ) ,
451451 ) ;
452452 }
453453 /**
@@ -456,12 +456,12 @@ export class AxesCollection {
456456 * the first time it returns false.
457457 */
458458 public allVisibleAxesSatisfy (
459- predicate : ( xPosition , axis ) => boolean
459+ predicate : ( xPosition , axis ) => boolean ,
460460 ) : boolean {
461461 return this . _stationaryAxesPositions
462462 . domain ( )
463463 . every ( ( colIndex ) =>
464- predicate ( this . getAxisPosition ( colIndex ) , this . _axes [ colIndex ] )
464+ predicate ( this . getAxisPosition ( colIndex ) , this . _axes [ colIndex ] ) ,
465465 ) ;
466466 }
467467 public getAxisForColIndex ( colIndex : number ) : Axis {
@@ -490,7 +490,7 @@ export class AxesCollection {
490490 this . _draggedAxisPosition = newX ;
491491 let visibleColIndices = this . _stationaryAxesPositions . domain ( ) ;
492492 visibleColIndices . sort (
493- ( ci1 , ci2 ) => this . getAxisPosition ( ci1 ) - this . getAxisPosition ( ci2 )
493+ ( ci1 , ci2 ) => this . getAxisPosition ( ci1 ) - this . getAxisPosition ( ci2 ) ,
494494 ) ;
495495 this . _stationaryAxesPositions . domain ( visibleColIndices ) ;
496496 this . _updateAxesPositionsInDOM ( this . _parentsSel ) ;
@@ -500,13 +500,13 @@ export class AxesCollection {
500500 this . _draggedAxisPosition = null ;
501501 this . _draggedAxis = null ;
502502 this . _updateAxesPositionsInDOM (
503- this . _parentsSel . transition ( ) . duration ( duration )
503+ this . _parentsSel . transition ( ) . duration ( duration ) ,
504504 ) ;
505505 }
506506 public isAxisDragging ( ) : boolean {
507507 return this . _draggedAxis !== null ;
508508 }
509- public getAxisPosition ( colIndex : number ) : number {
509+ public getAxisPosition ( colIndex : number ) : number | null {
510510 return this . _draggedAxis !== null &&
511511 this . _draggedAxis . colIndex ( ) === colIndex
512512 ? this . _draggedAxisPosition
@@ -531,13 +531,13 @@ export class AxesCollection {
531531 . domain ( )
532532 . filter ( ( colIndex ) => visibleColIndices . has ( colIndex ) ) ;
533533 const newDomain = Array . from (
534- new Set ( [ ...visibleDomain , ...Array . from ( visibleColIndices ) ] )
534+ new Set ( [ ...visibleDomain , ...Array . from ( visibleColIndices ) ] ) ,
535535 ) ;
536536 this . _stationaryAxesPositions . domain ( newDomain ) ;
537537 }
538538 private _updateAxesPositionsInDOM ( selectionOrTransition ) {
539539 selectionOrTransition . attr ( 'transform' , ( colIndex ) =>
540- tf_hparams_utils . translateStr ( this . getAxisPosition ( colIndex ) )
540+ tf_hparams_utils . translateStr ( this . getAxisPosition ( colIndex ) ) ,
541541 ) ;
542542 }
543543 private _createAxes (
@@ -547,7 +547,7 @@ export class AxesCollection {
547547 . range ( tf_hparams_utils . numColumns ( this . _schema ) )
548548 . map (
549549 ( colIndex ) =>
550- new Axis ( this . _svgProps , this . _schema , interactionManager , colIndex )
550+ new Axis ( this . _svgProps , this . _schema , interactionManager , colIndex ) ,
551551 ) ;
552552 }
553553 private _svgProps : tf_hparams_parallel_coords_plot_interaction_manager . SVGProperties ;
0 commit comments