jquery creating stacked bar chart with flot?

Posted by KittyYoung on Stack Overflow See other posts from Stack Overflow or by KittyYoung
Published on 2010-04-07T01:14:57Z Indexed on 2010/04/07 1:23 UTC
Read the original article Hit count: 249

Filed under:
|
|

I'm using jquery flot and I'm trying to create a stacked bar chart, but I'm having some syntax issues... I'll post my code at the end of this, but I'm quite certain it's wrong. I do get a stacked bar chart, but there's only three columns...

Basically, here is the data that I'm working with and what I want to accomplish... The first group (Focus Group 1) on each line is the bottom bar of the stacked bar, the second group (Focus Group 2) is the second, and the third group (Focus Group 3) is the top group. The "Responses" are what I want to use on the x-axis, the first number in each set is x, and the second number is y.

Response1, [0, 0], [0,0], [0,9]
Response2, [1, 5], [1,5], [1,11]
Response3, [2, 2], [2,0], [2,8]
Response4, [3, 1], [3,2], [3,6]
Response5, [4, 0], [4,0], [4,7]

I should also mention, that I'm not sure if a stacked chart is the best way to go... Admittedly, I'm not a very visual person, and generally find charts annoying... If there's a better way to present this data, then I am so totally open to suggestions...

Essentially...

I have a series of questions. Each of these questions were presented to three focus groups. Members of the focus groups selected a response. I'm trying to present the count per response, per focus group, for each question. I thought that a stacked chart would be the best way to go, but again, I'm open to other ways of doing this. The only thing is, I definitely need a visual representation of the data....

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about flot