File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -59,8 +59,8 @@ class WithTooltip extends React.PureComponent {
5959 }
6060
6161 this . props . showTooltip ( {
62- tooltipLeft : coords . x + 10 ,
63- tooltipTop : coords . y + 10 ,
62+ tooltipLeft : coords . x ,
63+ tooltipTop : coords . y ,
6464 tooltipData : {
6565 event,
6666 datum,
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ class XYChart extends React.PureComponent {
9595
9696 React . Children . forEach ( children , ( Child ) => { // Child-specific scales or adjustments here
9797 const name = componentName ( Child ) ;
98- if ( isBarSeries ( name ) && xScale . type !== 'band' ) {
98+ if ( isBarSeries ( name ) && xScaleObject . type !== 'band' ) {
9999 const dummyBand = getScaleForAccessor ( {
100100 allData,
101101 minAccessor : xString ,
@@ -104,7 +104,7 @@ class XYChart extends React.PureComponent {
104104 rangeRound : [ 0 , innerWidth ] ,
105105 paddingOuter : 1 ,
106106 } ) ;
107-
107+
108108 const offset = dummyBand . bandwidth ( ) / 2 ;
109109 xScale . range ( [ offset , innerWidth - offset ] ) ;
110110 xScale . barWidth = dummyBand . bandwidth ( ) ;
Original file line number Diff line number Diff line change @@ -45,10 +45,10 @@ const defaultProps = {
4545 onMouseLeave : null ,
4646} ;
4747
48- const x = d => d . x ;
49- const getY = d => d . y ;
50- const getY0 = d => d . y0 ;
51- const getY1 = d => d . y1 ;
48+ const x = d => d && d . x ;
49+ const getY = d => d && d . y ;
50+ const getY0 = d => d && d . y0 ;
51+ const getY1 = d => d && d . y1 ;
5252const definedClosed = d => isDefined ( getY ( d ) ) ;
5353const definedOpen = d => isDefined ( getY0 ( d ) ) && isDefined ( getY1 ( d ) ) ;
5454const noEventsStyles = { pointerEvents : 'none' } ;
Original file line number Diff line number Diff line change @@ -42,9 +42,9 @@ const defaultProps = {
4242 onMouseLeave : null ,
4343} ;
4444
45- const x = d => d . x ;
46- const y0 = d => d [ 0 ] ;
47- const y1 = d => d [ 1 ] ;
45+ const x = d => d && d . x ;
46+ const y0 = d => d && d [ 0 ] ;
47+ const y1 = d => d && d [ 1 ] ;
4848const defined = d => isDefined ( d [ 0 ] ) && isDefined ( d [ 1 ] ) ;
4949const noEventsStyles = { pointerEvents : 'none' } ;
5050
You can’t perform that action at this time.
0 commit comments