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

I don't want to apply ordering. But, it applies automatically #277

Open
mgolshan opened this issue Jun 27, 2017 · 3 comments
Open

I don't want to apply ordering. But, it applies automatically #277

mgolshan opened this issue Jun 27, 2017 · 3 comments

Comments

@mgolshan
Copy link

Hello.
This is my data:

data": [
    {
        "month": "2017-Jan",
        "redemption": "0.07",
        "issuance": "0.40"
    },
    {
        "month": "2017-Feb",
        "redemption": "0.18",
        "issuance": "9.52"
    },
    {
        "month": "2017-Mar",
        "redemption": "2.69",
        "issuance": "0.92"
    },
    {
        "month": "2017-Apr",
        "redemption": "0.18",
        "issuance": "0.33"
    },
    {
        "month": "2017-May",
        "redemption": "0.51",
        "issuance": "12.81"
    },
    {
        "month": "2017-Jun",
        "redemption": "0.09",
        "issuance": "0.27"
    }
]

The X axis is "month". I want to show in the same ordering I get the data. I do not apply any addOrderRule to the x axis. But, it is showing mis-ordered chart by this ordering:
2017-Mar , 2017-May , 2017-Apr , 2017-Feb , 2017-Jun , 2017-Jan

How may I prevent that?
Thanks in advance

@welshjs
Copy link

welshjs commented Jun 27, 2017 via email

@mgolshan
Copy link
Author

Thanks @welshjs.
But, I don't see it in alpha order. If it was based on alpha, Apr should be the first one.
However, my question is how to show in the main order I get in the response? I don't want to change any ordering.
Thanks.

@Rolok
Copy link

Rolok commented Jun 28, 2017

I don't have an answer for you, but I do notice that it is ordered by 'redemption' in descending order.

You could provide yourself an additional value that you could use addOrderRule on?

With sorting dates (which I know you don't want), I have also noticed differing behavior between Chrome and Firefox. I wanted my data in order by dates, and I resorted to providing the data in YYYY-MM-DD format in all numbers. Chrome sorted the dates with MON correctly, but Firefox did not.

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

3 participants