@@ -2,7 +2,7 @@ import {ascending} from "d3";
2
2
import { create } from "d3" ;
3
3
import { filter } from "../defined.js" ;
4
4
import { 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" ;
6
6
7
7
export class RuleX extends Mark {
8
8
constructor (
@@ -51,7 +51,7 @@ export class RuleX extends Mark {
51
51
. attr ( "x2" , X ? i => X [ i ] : ( marginLeft + width - marginRight ) / 2 )
52
52
. attr ( "y1" , Y1 ? i => Y1 [ i ] : marginTop )
53
53
. 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 ] ) )
55
55
. call ( title ( L ) ) )
56
56
. node ( ) ;
57
57
}
@@ -104,7 +104,7 @@ export class RuleY extends Mark {
104
104
. attr ( "x2" , X2 ? ( x . bandwidth ? i => X2 [ i ] + x . bandwidth ( ) : i => X2 [ i ] ) : width - marginRight )
105
105
. attr ( "y1" , Y ? i => Y [ i ] : ( marginTop + height - marginBottom ) / 2 )
106
106
. 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 ] ) )
108
108
. call ( title ( L ) ) )
109
109
. node ( ) ;
110
110
}
0 commit comments