public/libraries.js
function (e, point) {
            if (!this.crosshair) { return; }// Do not draw crosshairs if you don't have too.

            if ((defined(point) || !pick(this.crosshair.snap, true)) === false) {
                this.hideCrosshair();
                return;
            }

            var path,
              options = this.crosshair,
              animation = options.animation,
              pos;

            // Get the path
            if (!pick(options.snap, true)) {
                pos = (this.horiz ? e.chartX - this.pos : this.len - e.chartY + this.pos);
            } else if (defined(point)) {
                /*jslint eqeq: true*/
                pos = (this.chart.inverted != this.horiz) ? point.plotX : this.len - point.plotY;
                /*jslint eqeq: false*/
            }

            if (this.isRadial) {
                path = this.getPlotLinePath(this.isXAxis ? point.x : pick(point.stackY, point.y));
            } else {
                path = this.getPlotLinePath(null, null, null, null, pos);
            }

            if (path === null) {
                this.hideCrosshair();
                return;
            }

            // Draw the cross
            if (this.cross) {
                this.cross
                  .attr({ visibility: VISIBLE })[animation ? 'animate' : 'attr']({ d: path }, animation);
            } else {
                var attribs = {
                    'stroke-width': options.width || 1,
                    stroke: options.color || '#C0C0C0',
                    zIndex: options.zIndex || 2
                };
                if (options.dashStyle) {
                    attribs.dashstyle = options.dashStyle;
                }
                this.cross = this.chart.renderer.path(path).attr(attribs).add();
            }
        }
function (e, point) {
            if (!this.crosshair) { return; }// Do not draw crosshairs if you don't have too.

            if ((defined(point) || !pick(this.crosshair.snap, true)) === false) {
                this.hideCrosshair();
                return;
            }

            var path,
              options = this.crosshair,
              animation = options.animation,
              pos;

            // Get the path
            if (!pick(options.snap, true)) {
                pos = (this.horiz ? e.chartX - this.pos : this.len - e.chartY + this.pos);
            } else if (defined(point)) {
                /*jslint eqeq: true*/
                pos = (this.chart.inverted != this.horiz) ? point.plotX : this.len - point.plotY;
                /*jslint eqeq: false*/
            }

            if (this.isRadial) {
                path = this.getPlotLinePath(this.isXAxis ? point.x : pick(point.stackY, point.y));
            } else {
                path = this.getPlotLinePath(null, null, null, null, pos);
            }

            if (path === null) {
                this.hideCrosshair();
                return;
            }

            // Draw the cross
            if (this.cross) {
                this.cross
                  .attr({ visibility: VISIBLE })[animation ? 'animate' : 'attr']({ d: path }, animation);
            } else {
                var attribs = {
                    'stroke-width': options.width || 1,
                    stroke: options.color || '#C0C0C0',
                    zIndex: options.zIndex || 2
                };
                if (options.dashStyle) {
                    attribs.dashstyle = options.dashStyle;
                }
                this.cross = this.chart.renderer.path(path).attr(attribs).add();
            }
        }
function ( e , point ) { if ( ! this . crosshair ) { return ; } // Do not draw crosshairs if you don't have too. if ( ( defined ( point ) || ! pick ( this . crosshair . snap , true ) ) === false ) { this . hideCrosshair ( ) ; return ; } var path , options = this . crosshair , animation = options . animation , pos ; // Get the path if ( ! pick ( options . snap , true ) ) { pos = ( this . horiz ? e . chartX - this . pos : this . len - e . chartY + this . pos ) ; } else if ( defined ( point ) ) { /*jslint eqeq: true*/ pos = ( this . chart . inverted != this . horiz ) ? point . plotX : this . len - point . plotY ; /*jslint eqeq: false*/ } if ( this . isRadial ) { path = this . getPlotLinePath ( this . isXAxis ? point . x : pick ( point . stackY , point . y ) ) ; } else { path = this . getPlotLinePath ( null , null , null , null , pos ) ; } if ( path === null ) { this . hideCrosshair ( ) ; return ; } // Draw the cross if ( this . cross ) { this . cross . attr ( { visibility : VISIBLE } ) [ animation ? 'animate' : 'attr' ] ( { d : path } , animation ) ; } else { var attribs = { 'stroke-width' : options . width || 1 , stroke : options . color || '#C0C0C0' , zIndex : options . zIndex || 2 } ; if ( options . dashStyle ) { attribs . dashstyle = options . dashStyle ; } this . cross = this . chart . renderer . path ( path ) . attr ( attribs ) . add ( ) ; } }
Draw the crosshair
Draw the crosshair