Flot:使用多个堆叠条形图对整个屏幕中的条形堆叠进行排序

Flot: Order the stacking of the bars throughout screen with multiple stacked bar charts

搜索JSFIDDLE

问: 我需要对堆叠条形图进行排序,以便它在具有多个堆叠条形图的整个屏幕中保持一致。
例如,如果一个条具有从上到下 087、084、080、01-02、00 开始的堆叠标签,则该位置在所有其他图表中应该相同

我试过:

chartData.sort(function(a, b){ 
    return a.label.localeCompare(b.label);
});

但它似乎不适用于一栏中的堆叠标签。

当图表中的一个数据系列在特定 x 值处存在间隙时,堆叠会出现问题。例如图表 2 中的中间条(在 x = 2 处):

{
    label: "084",
    data: [
        [0, 3],
        [1, 12],
        [2, 0], // this was missing, after adding it, the stacking works
        [3, 53],
        [4, 13]
    ]
}