简体   繁体   中英

jquery flot, horizontal side by side and stacked chart not correctly working

As shown in this fiddle I almost have a working example of a horizontal side by side and stacked chart. Whats wrong with it? Does it have something to do with the way the data is formatted?

data: [
    [10, 1],
    [20, 2],
    [30, 3],
    [40, 4],
    [50, 5],
    [60, 6]
]

Change the order of how you include the flot plugins. orderBars changes the x values of the points so it must jitter the values before they get stacked.

 <script type='text/javascript' src="jquery.flot.js"></script>   
 <script type='text/javascript' src="jquery.flot.orderBars.js"></script>
 <script type='text/javascript' src="jquery.flot.stack.js"></script>

Updated and fixed fiddle .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM