2016-05-11 6 views
1

私はPubNub EONチャートを使用しています。履歴からの読み込み機能を使用したいと思います。しかし、history:trueを設定すると、グラフに何も入力されません。私はhistory:falseを設定すると素晴らしいです。 PubNub Admin Dashboard履歴からのEONチャートの埋め込み

<script> 
    var pubnub = PUBNUB.init({ 
     subscribe_key: '------------------------------------', 
     ssl: true 
    }); 
    eon.chart({ 
     pubnub: pubnub, 
     history: false, 
     channel: 'tempTime', 
     limit: 2880, 
     ssl: true, 
     debug: false, 
     generate: { 
      transition: { 
       duration: 3 
      }, 
      bindto: '#TimeSeries', 
      point: { 
       show: false 
      }, 
      data: { 
       x: 'x' 
      }, 
      subchart: { 
       show: true, 
       tick: { 
         count: 12, 
         format: '%H:%M', 
         culling: { 
          max: 12 // the number of tick texts will be adjusted to less than this value 
         } 
        } 
      }, 
      zoom: { 
       enabled: false 
      }, 
      axis: { 
       x: { 
        type: 'timeseries', 
        tick: { 
         count: 24, 
         format: '%H:%M', 
         culling: { 
          max: 12 // the number of tick texts will be adjusted to less than this value 
         } 
        } 
       } 
      } 
     }, 
     transform: function(tempTime) { 
      return { 
       eon: { 
        'Ice Tank Outlet': tempTime.T0, 
        'Load Outlet': tempTime.T1, 
        'Ice RC to Water RC': tempTime.T4, 
        'Column Inlet': tempTime.T5, 
        'Condenser Dist.': tempTime.T6, 
        'Brine RC to Ice Tank': tempTime.T7, 
        'Ice Tank Inlet': tempTime.T8, 
        'Dist. Water': tempTime.T9, 
        'Chilled Water': tempTime.T11, 
        'Distillate': tempTime.T13, 
        'Chilled Coolant': tempTime.T16, 
        'RC Coolant': tempTime.T18, 
        'Warm Coolant': tempTime.T19, 
        'Brine RC to Column': tempTime.T20, 
        'Water RC to Column': tempTime.T21, 
        'Ambient': tempTime.T22 
       } 
      } 
     } 
    }); 
+1

完全なeon.charオブジェクト宣言コードを表示してください。 –

+0

私はそれを上記に加えました。助けてくれてありがとう! – Murenrb

+1

APIキーに「ストレージと再生」機能が有効になっていますか?これを追加するには、アカウントにログインする(https://admin.pubnub.com/ – PubNub

答えて

1
+0

これは間違いなく正しい答えです。私はしかし、後続の質問があります。現在、新しいグラフを読み込むと、履歴値からのデータが機能しています!それは幾分神秘的な数のポイントに値をつけます。私のデータはまだ一貫していないのですが、EON宣言で指定された上限を満たしている必要があるので、私には伝えにくいですか?私は1日に設定されたストレージと再生を持っていますが、それはわずか数百のデータポイントを投入しているようです。上書きできるデフォルト値があるかどうか疑問です。 – Murenrb

+0

あなたのストレージは1日間の保存期間に設定されており、1日以上経過したメッセージを保存します。あなたが設定している 'limit'パラメータはEONにチャンネルからその数のメッセージまでメッセージをフェッチするよう指示します。しかし、おそらく、それほど多くはありません。あなたはしかし、ストレージの保持を増やすことができます。 –

関連する問題