I accidentally came across the same question as you for several days. After a short haircut, I realized that the commit to handle sorting legends was fairly recent (July 2012) and was not included in the version of jquery.flot.js that I used.
Checking the fleet resource on your Fiddle, it seems that this is true for you. If you upgrade your flot js file to one that includes a sorting algorithm , your problem will most likely be resolved, like mine. (Well, I manually fixed it, as I had other experimental changes.)
I am going to assume that you will encounter the same obstacle as mine, since the sort code, since it exists, is sorted only in alphabetical order or with a comparer that can only check the label text and color code. This was not enough for me - I wanted to assign a server of arbitrary sort order. To do this, I added a sort order line string for my serial labels:
label: '<a class="hiddenOrder">2</a>foo'
And then create those a blocks in the Flot placeholder to hide (edit: you also need a style to apply tooltips that are not contained in the Flot placeholder).
#flotPlaceholder a.hiddenOrder, #flotTooltip a.hiddenOrder {display:none;}
I forked your fiddle and included my ordering method so you can try, but unfortunately it looks like my links to GitHub resources arenβt working in fiddle. However, you must be able to ride it in place.
Good luck
source share