$(function() { // Highchart全体設定 Highcharts.setOptions({ global: { // グローバルオプション useUTC: false // GMTではなくJSTを使う }, lang: { // 言語設定 rangeSelectorZoom: '表示範囲:', resetZoom: '表示期間をリセット', resetZoomTitle: '表示期間をリセット', rangeSelectorFrom: '表示期間:', rangeSelectorTo: '〜', months: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'], weekdays: ['日', '月', '火', '水', '木', '金', '土'], numericSymbols: null // 1000を1kと表示しない } }); $.getJSON('http://nogizaka46-dc.com/inc/do/json.php?id=41', function(data){ window.chart = new Highcharts.StockChart({ chart: { renderTo: 'comment-graph' }, rangeSelector: { inputDateFormat: '%Y-%m-%d' }, xAxis: { dateTimeLabelFormats: { day: '%Y年
%m月%d日' } }, yAxis: { min: 0 }, tooltip: { xDateFormat: '%Y年%m月%d日 %H:%M:%S', pointFormat: '{point.title}: {point.y}' }, credits: { enabled: false }, title: { text: '' }, series: [{ color: '#7a62d3', data: data, events: { click: function(res){ window.open(res.point.url); } } }] }, function(chart) { setTimeout(function(){ $('input.highcharts-range-selector', $('#' + chart.options.chart.renderTo)).datepicker({ format: 'yyyy-mm-dd' }) }, 0) }); }); });