无法确定EON样条图表在加载时未加载历史记录的原因(是,启用了存储和播放功能)。图表将在数据进入时正确呈现数据,并且控制台中不会显示任何错误。关于可能发生的事情的任何线索?
eon.chart({
channel: channel,
history: true,
flow: true,
pubnub: pubnub,
debug: true,
generate: {
bindto: '#chart',
data: {
type: 'spline',
labels: false
}
},
transform: function(m) {
return { eon: {
'temp': m.temp
}}
}
});
以下是控制台的输出:
EON-CHART: PubNub: Subscribed to runtimewareiotchannel eon.js:7657 EON-CHART: Status: Restoring from history eon.js:7657 EON-CHART: History: Retrieving messages from undefined eon.js:7657 EON-CHART: Status: Chart Animation Enabled eon.js:7657 EON-CHART: History: 10 messages found eon.js:7657 EON-CHART: History: Complete... Rendering eon.js:7657 EON-CHART: History: Retrieving messages from 14689036992721526 eon.js:7657 EON-CHART: History: 1 messages found eon.js:7657 EON-CHART: History: Complete... Rendering
发布到PubNub的数据如下 - 非常简单:
{
"temp": 76.662498
}
谢谢! 德里克
答案 0 :(得分:1)
今天这是一个临时问题,应该得到解决。看这个例子: http://pubnub.github.io/eon-chart/examples/history.html