Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support history with limit > 100 #15

Open
rkerr opened this issue Apr 24, 2017 · 0 comments
Open

support history with limit > 100 #15

rkerr opened this issue Apr 24, 2017 · 0 comments

Comments

@rkerr
Copy link

rkerr commented Apr 24, 2017

Setting history: true with limit > 100 returns a chart with a maximum of 100 data points.

The pubnub API will only return 100 history at a time; after that one must make multiple requests for paged results. There appears to be some code in eon to handle paging (around line 213 of pubnub-c3.js) but this code does not have help when limit > 100. Looking at the javascript storage and playback docs:

https://www.pubnub.com/docs/web-javascript/storage-and-history

When paging we should "set the start attribute to start timetoken value, and request again" but the eon code instead seems to set the end attribute to the end timetoken value. Swapping end for start at lines 172 and 214 seems to get eon behaving as I would expect for limit > 100 but I don't know if it has some unintended side affect for other cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant