File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -881,13 +881,14 @@ function createSpikelines(hoverData, opts) {
881
881
xEndSpike = c0 . xa . spikemode . indexOf ( 'across' ) !== - 1 ?
882
882
( ySide === 'left' ? xBase + xLength : xBase - xLength ) :
883
883
xPoint ,
884
- yEndSpike = c0 . ya . spikemode . indexOf ( 'across' ) !== - 1 ? yBase - yLength : yPoint ;
884
+ yEndSpike = c0 . ya . spikemode . indexOf ( 'across' ) !== - 1 ?
885
+ ( xSide === 'bottom' ? yBase - yLength : yBase + yLength ) :
886
+ yPoint ;
885
887
886
888
// Remove old spikeline items
887
889
container . selectAll ( 'line.spikeline' ) . remove ( ) ;
888
890
container . selectAll ( 'circle.spikeline' ) . remove ( ) ;
889
891
890
-
891
892
if ( c0 . ya . showspikes ) {
892
893
if ( ySpikeLine ) {
893
894
// Background horizontal Line (to y-axis)
@@ -966,7 +967,7 @@ function createSpikelines(hoverData, opts) {
966
967
container . append ( 'circle' )
967
968
. attr ( {
968
969
'cx' : xPoint ,
969
- 'cy' : yAnchoredBase - xThickness ,
970
+ 'cy' : yAnchoredBase - ( xSide !== 'top' ? xThickness : - xThickness ) ,
970
971
'r' : xThickness ,
971
972
'fill' : xColor
972
973
} )
You can’t perform that action at this time.
0 commit comments