2013-03-06 61 views
0

在燭臺圖表上,我在分鐘rsolution中有oclh值。設置數據分組

我希望能夠以編程方式設置分組範圍(1min,5min,15min,30min,1h,2h,4h,8h,12h,1w,1m,1y)。

可以直接使用highcharts嗎?或者我應該依靠一個操作庫,是否有這樣一個庫?

+0

http://api.highcharts.com/highstock#plotOptions.series.dataGrouping – 2013-03-06 19:37:23

+0

謝謝,但不是很明確......我應該強制和設置所需的分組作爲單位數組的唯一選項? – Samy 2013-03-07 10:21:57

回答

1

是的,可以通過rangeSelector格式化系列範圍。

定義的時間跨度,就可以了,「年初至今」(年初至今)「毫秒」,「第二」,「分」,「天」,「周」,「月」之一, '年'和'全部'。

count

定義要使用的定義類型的單位數。

text

該按鈕本身的文本。

用法
rangeSelector: { 
     enabled: true, 
     buttons: [{ 
      type: 'minute', 
      count: 1, 
      text: '1min' 
     }, { 
      type: 'minute', 
      count: 5, 
      text: '5min' 
     }, { 
      type: 'minute', 
      count: 60, 
      text: '1hr' 
     }, { 
      type: 'week', 
      count: 1, 
      text: '1w' 
     }, { 
      type: 'month', 
      count: 1, 
      text: '1m' 
     }, { 
      type: 'year', 
      count: 1, 
      text: '1y' 
     }, { 
      type: 'all', 
      text: 'All' 
     }] 
    } 

Fiddled例子。

希望這會有所幫助。 :)

+0

謝謝,但我不是在尋找範圍操縱...而是數據點分組。例如:我有盤中價值(每分鐘)以及通過5分鐘,10分鐘,15分鐘或1小時的團隊合併的內容。 – Samy 2013-03-07 10:24:56