Highcharts Demo

author(s): Torstein Hønsi

by J. Albert Bowden

HTML

<script src="https://code.highcharts.com/highcharts.js"></script>

<div id="container" style="height: 400px"></div>

JavaScript

$(function () {
    $('#container').highcharts({
        chart: {
            type: 'scatter',
        },
        plotOptions: {
            scatter: {
				lineWidth:1,
                marker: {
                    radius: 1,
					symbol:'circle',
					fillColor: '#800000',
                    states: {
                        hover: {
                            enabled: true,
							radius:0,
							radiusPlus:2,
							lineColor: '#ff0000',
							fillColor: '#ff0000'
                        }
                    }
                },
               // states: {
               //     hover: {
			   //		halo:false,
				//		lineWidthPlus:2,
				//	}
                //}
                
                events: {
                    mouseOver: function () {
                        
                        this.chart.series[this.index].update({
                        	color: 'red'
                        });
                    },
                    mouseOut: function () {
                        
                        this.chart.series[this.index].update({
                        	color: "#b0b0b0"
                        });                           
                    }
                }
            }
        },
        series: [{
            name: 'A',
            color: "#b0b0b0",
            data: [[38,42],[39,39],[35,45],[35,54],{x:36,y:35,marker:{radius:8,symbol:'circle'}}
            ]
        }, {
            name: 'B',
            color: "#b0b0b0",
            data: [[46,56],[47,67],[48,69],[50,55],{x:52,y:57,marker:{radius:8,symbol:'circle'}}
            ]
        }]
    });
});