Skip to content

support history with limit > 100 #15

Description

@rkerr

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions