我正在使用PubNub EON图表,我想使用历史记录功能填充。但是,当我设置history:true
时,图表永远不会填充任何内容。当我设置history:false
时,它的效果很好。这是宣言:
<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
}
}
}
});