@@ -39,12 +39,12 @@ function group1(x = identity, {domain, normalize, ...options} = {}) {
3939 return [
4040 {
4141 ...options ,
42- transform : maybeTransform ( options , ( data , index ) => {
42+ transform : maybeTransform ( options , ( data , facets ) => {
4343 const X = valueof ( data , x ) ;
4444 const Z = valueof ( data , z ) ;
4545 const F = valueof ( data , vfill ) ;
4646 const S = valueof ( data , vstroke ) ;
47- const groupIndex = [ ] ;
47+ const groupFacets = [ ] ;
4848 const groupData = [ ] ;
4949 const G = Z || F || S ;
5050 const BX = setX ( [ ] ) ;
@@ -54,7 +54,7 @@ function group1(x = identity, {domain, normalize, ...options} = {}) {
5454 const BS = S && setS ( [ ] ) ;
5555 const n = data . length ;
5656 let i = 0 ;
57- for ( const facet of index ) {
57+ for ( const facet of facets ) {
5858 const groupFacet = [ ] ;
5959 for ( const I of G ? grouper ( facet , i => G [ i ] ) . values ( ) : [ facet ] ) {
6060 for ( const [ x , f ] of sort ( grouper ( I , i => X [ i ] ) , first ) ) {
@@ -69,9 +69,9 @@ function group1(x = identity, {domain, normalize, ...options} = {}) {
6969 if ( S ) BS . push ( S [ f [ 0 ] ] ) ;
7070 }
7171 }
72- groupIndex . push ( groupFacet ) ;
72+ groupFacets . push ( groupFacet ) ;
7373 }
74- return { data : groupData , index : groupIndex } ;
74+ return { data : groupData , facets : groupFacets } ;
7575 } )
7676 } ,
7777 X ,
@@ -101,13 +101,13 @@ function group2(xv, yv, {domain, normalize, ...options} = {}) {
101101 return [
102102 {
103103 ...options ,
104- transform : maybeTransform ( options , ( data , index ) => {
104+ transform : maybeTransform ( options , ( data , facets ) => {
105105 const X = valueof ( data , x ) ;
106106 const Y = valueof ( data , y ) ;
107107 const Z = valueof ( data , z ) ;
108108 const F = valueof ( data , vfill ) ;
109109 const S = valueof ( data , vstroke ) ;
110- const groupIndex = [ ] ;
110+ const groupFacets = [ ] ;
111111 const groupData = [ ] ;
112112 const G = Z || F || S ;
113113 const BX = setX ( [ ] ) ;
@@ -118,7 +118,7 @@ function group2(xv, yv, {domain, normalize, ...options} = {}) {
118118 const BS = S && setS ( [ ] ) ;
119119 const n = data . length ;
120120 let i = 0 ;
121- for ( const facet of index ) {
121+ for ( const facet of facets ) {
122122 const groupFacet = [ ] ;
123123 for ( const I of G ? grouper ( facet , i => G [ i ] ) . values ( ) : [ facet ] ) {
124124 for ( const [ y , fy ] of sort ( grouper ( I , i => Y [ i ] ) , first ) ) {
@@ -137,9 +137,9 @@ function group2(xv, yv, {domain, normalize, ...options} = {}) {
137137 }
138138 }
139139 }
140- groupIndex . push ( groupFacet ) ;
140+ groupFacets . push ( groupFacet ) ;
141141 }
142- return { data : groupData , index : groupIndex } ;
142+ return { data : groupData , facets : groupFacets } ;
143143 } )
144144 } ,
145145 X ,
0 commit comments