Created
January 28, 2016 10:47
-
-
Save pokotyamu/a5665e965b7d445ed8ad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$(document).ready(function() { | |
chart = new Highcharts.Chart({ | |
chart: { | |
renderTo: 'container1', | |
defaultSeriesType: 'scatter', | |
zoomType: 'xy' | |
}, | |
title: { | |
text: '施工時' | |
}, | |
xAxis: { | |
title: { | |
enabled: true, | |
text: '曲げ応力度検定比' | |
}, | |
startOnTick: true, | |
endOnTick: true, | |
showLastLabel: true | |
}, | |
yAxis: { | |
title: { | |
text: '床スラブの総重量(kN)' | |
} | |
}, | |
tooltip: { | |
formatter: function() { | |
return ''+ | |
this.x +', '+ this.y +' kN'; | |
} | |
}, | |
legend: { | |
layout: 'vertical', | |
align: 'right', | |
verticalAlign: 'top', | |
x: 300, | |
y: 300, | |
floating: true, | |
backgroundColor: Highcharts.theme.legendBackgroundColor || '#FFFFFF', | |
borderWidth: 1 | |
}, | |
plotOptions: { | |
scatter: { | |
marker: { | |
radius: 5, | |
states: { | |
hover: { | |
enabled: true, | |
lineColor: 'rgb(100,100,100)' | |
} | |
} | |
}, | |
states: { | |
hover: { | |
marker: { | |
enabled: false | |
} | |
} | |
} | |
}, | |
series: //seriesに対するオプションを設定する | |
{ | |
allowPointSelect: true, | |
point: // 頂点についてイベントを設定する | |
{ | |
events: | |
{ | |
} | |
}, | |
marker: { | |
enabled: true | |
} | |
} | |
}, | |
series: [{ | |
name:'Solutions', | |
color: 'rgba(223, 83, 83, .5)', | |
data: | |
<% | |
out.print("["); | |
for (int i = 0; i < sol.size(); i++) { | |
Solutions solution = (Solutions) sol.get(i); | |
out.print("{x: " + decimalFormat1.format(solution.getWorkminusbendstressratio()) + ", y: " + decimalFormat1.format(solution.getSlabweight() / 1000) + ", id: '" + solution.getDeckno() + "'}"); | |
if (i != sol.size()) { | |
out.print(", "); | |
} | |
} | |
out.print("]"); | |
%> | |
}] | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment