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

AddEntry issue in ChartData #173

Closed
wizzardchao opened this issue Jun 24, 2015 · 2 comments
Closed

AddEntry issue in ChartData #173

wizzardchao opened this issue Jun 24, 2015 · 2 comments

Comments

@wizzardchao
Copy link

I find entriesForXIndex uses binary search for xIndex, which means the entries are ordered by xIndex.
But the addEntry method doesn't do extra to maintain the order, just append the new entry.

Thus, I'm wondering if it means the new added entry should have a larger xIndex which should be noticed by user?

@danielgindi
Copy link
Collaborator

Actually it is, but we should add extra checking to automatically insert in
the correct position. Thanks for the pointer

@danielgindi
Copy link
Collaborator

Well after further investigation, it looks like we may be supporting other kinds of charts where xIndexes has an additional dimension. It's a bit foggy right now. Specifically a case where lines will be drawn between values - in the xIndex order.

But I still think this is an important functionality, so it's definitely going to be a different function name.

danielgindi added a commit that referenced this issue Jul 9, 2015
…#173)

addEntry is unordered, and currently assumes that it is the last entry.
In the future when we will have charts with optionally unordered data, addEntry will be useful, while not addEntryOrdered is useful when adding entries in the middle of the dataset.
danielgindi added a commit that referenced this issue Jul 9, 2015
…#173)

addEntry is unordered, and currently assumes that it is the last entry.
In the future when we will have charts with optionally unordered data, addEntry will be useful, while not addEntryOrdered is useful when adding entries in the middle of the dataset.
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

2 participants