Created
March 4, 2014 08:59
-
-
Save ckazu/9342749 to your computer and use it in GitHub Desktop.
HRForecast のデータを Highcharts で手軽に描画する ref: http://qiita.com/ckazu/items/734226078721c5d0e20e
This file contains hidden or 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
!!! 5 | |
%html{lang: 'ja'} | |
%head | |
%meta{charset: 'utf-8'} | |
%script{src: '//code.jquery.com/jquery-1.11.0.min.js'} | |
%script{src: '//code.highcharts.com/highcharts.js'} | |
%script{src: '//code.highcharts.com/modules/data.js'} # CSV などを読み込んで良い感じにしてくれるモジュール | |
%body | |
#graph | |
:coffeescript | |
$.get 'http://path/to/hrf/csv_complex/service/section/graph?t=m', (data) -> | |
$('#graph').highcharts | |
data: | |
csv: data |
This file contains hidden or 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
!!! 5 | |
%html{lang: 'ja'} | |
%head | |
%meta{charset: 'utf-8'} | |
%script{src: '//code.jquery.com/jquery-1.11.0.min.js'} | |
%script{src: '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js'} | |
%script{src: '//code.highcharts.com/highcharts.js'} | |
%script{src: '//code.highcharts.com/modules/data.js'} | |
%body | |
#graph | |
:coffeescript | |
$.get 'http://path/to/hrf/csv_complex/service/section/graph?t=m', (data) -> | |
$('#graph').highcharts | |
data: | |
csv: data | |
parseDate: (val) -> moment(val).unix() * 1000 |
This file contains hidden or 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
!!! 5 | |
%html{lang: 'ja'} | |
%head | |
%meta{charset: 'utf-8'} | |
%script{src: '//code.jquery.com/jquery-1.11.0.min.js'} | |
%script{src: '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js'} | |
%script{src: '//code.highcharts.com/highcharts.js'} | |
%script{src: '//code.highcharts.com/modules/data.js'} | |
%body | |
#graph | |
:coffeescript | |
$.get 'http://path/to/hrf/csv_complex/service/section/graph?t=m', (data) -> | |
$('#graph').highcharts | |
data: | |
csv: data | |
parseDate: (val) -> moment(val).unix() * 1000 |
This file contains hidden or 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
!!! 5 | |
%html{lang: 'ja'} | |
%head | |
%meta{charset: 'utf-8'} | |
%script{src: '//code.jquery.com/jquery-1.11.0.min.js'} | |
%script{src: '//cdnjs.cloudflare.com/ajax/libs/moment.js/2.5.1/moment.min.js'} | |
%script{src: '//code.highcharts.com/highcharts.js'} | |
%script{src: '//code.highcharts.com/modules/data.js'} | |
%body | |
#graph | |
:coffeescript | |
$.get 'http://path/to/hrf/csv_complex/service/section/graph?t=m', (data) -> | |
$('#graph').highcharts | |
data: | |
csv: data | |
parseDate: (val) -> moment(val).unix() * 1000 | |
chart: | |
type: 'area' | |
zoomType: 'x' | |
rangeSelector: | |
enabled: true | |
plotOptions: | |
series: | |
stacking: true | |
marker: | |
radius: 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment