Skip to content

Instantly share code, notes, and snippets.

@olivermt
Created December 29, 2011 20:59
Show Gist options
  • Select an option

  • Save olivermt/1536168 to your computer and use it in GitHub Desktop.

Select an option

Save olivermt/1536168 to your computer and use it in GitHub Desktop.
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 21 + '-chart',
defaultSeriesType: 'scatter',
zoomType: 'xy'
},
title:{
text: 'Scatter plot - width vs thickness'
},
xAxis:{
min:0,
title:{
enabled:true,
text: 'width'
},
startOnTick: true,
endOnTick: true,
showLastLabel: true
},
yAxis:{
min:0,
title:{
text: 'thickness'
},
tooltip: {
formatter: function() {
return ''+ this.x + this.y;
}
},
legend: {
layout: 'vertical',
align: 'right',
verticalAlign: 'top',
x: 100,
y: 70,
floating: true,
backgroundColor: '#FFFFFF',
borderWidth: 1
},
plotOptions: {
scatter: {
marker: {
radius: 5,
states: {
hover: {
enabled: true,
lineColor: 'rgb(100,100,100)'
}
}
},
states: {
hover: {
marker: {
enabled: false
}
}
}
}
},
series: [{name: "Escanilla-Olson", data: [[24.71, 6.78], [33.62, 5.63]]},{name: "Nine Mile Canyon (Green River Fm.)", data: [[65.44, 6.35], [37.44, 3.65], [52.68, 4.57], [64.37, 7.95], [61.67, 3.98], [55.27, 7.3], [93.39, 4.48], [70.98, 6.18]]}]
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment