@@ -2,7 +2,7 @@ import {ascending} from "d3";
22import { create } from "d3" ;
33import { filter } from "../defined.js" ;
44import { Mark , identity , maybeColor , zero , title } from "../mark.js" ;
5- import { Style , applyDirectStyles , applyIndirectStyles , applyTransform } from "../style.js" ;
5+ import { Style , applyDirectStyles , applyIndirectStyles , applyTransform , applyAttr } from "../style.js" ;
66
77export class RuleX extends Mark {
88 constructor (
@@ -51,7 +51,7 @@ export class RuleX extends Mark {
5151 . attr ( "x2" , X ? i => X [ i ] : ( marginLeft + width - marginRight ) / 2 )
5252 . attr ( "y1" , Y1 ? i => Y1 [ i ] : marginTop )
5353 . attr ( "y2" , Y2 ? ( y . bandwidth ? i => Y2 [ i ] + y . bandwidth ( ) : i => Y2 [ i ] ) : height - marginBottom )
54- . attr ( "stroke" , S && ( i => S [ i ] ) )
54+ . call ( applyAttr , "stroke" , S && ( i => S [ i ] ) )
5555 . call ( title ( L ) ) )
5656 . node ( ) ;
5757 }
@@ -104,7 +104,7 @@ export class RuleY extends Mark {
104104 . attr ( "x2" , X2 ? ( x . bandwidth ? i => X2 [ i ] + x . bandwidth ( ) : i => X2 [ i ] ) : width - marginRight )
105105 . attr ( "y1" , Y ? i => Y [ i ] : ( marginTop + height - marginBottom ) / 2 )
106106 . attr ( "y2" , Y ? i => Y [ i ] : ( marginTop + height - marginBottom ) / 2 )
107- . attr ( "stroke" , S && ( i => S [ i ] ) )
107+ . call ( applyAttr , "stroke" , S && ( i => S [ i ] ) )
108108 . call ( title ( L ) ) )
109109 . node ( ) ;
110110 }
0 commit comments