FLOT: Order the y axis by minimum date

2019-07-16 12:52发布

问题:

The ticks I am passing is the following:

ticks:
    0: [3, Tender Period, 2014-03-11]
    1: [1, Pre-Contract Preparation, 2014-03-17]
    2: [2, Contract Period, 2014-06-10]

But in my chart, its started with [3, Tender Period] then why my second object is [2 Contact Period] Period rather than [1 Pre-Contract Preparation]?

I don't have any idea why it is changed when it comes to the chart!

回答1:

It's not the order but the number (first argument i.e. [3,1,2]) of the tick that gives the order. You need to renumber so you get a higher number for the earlier bar.