devanshukumar / flot

Automatically exported from code.google.com/p/flot
0 stars 0 forks source link

Problem creating charts with bars #16

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi!

I tried to find out the best way to create a chart with bars.

I use the following statement to declare the data:

{data: [[0,28], [0,28]],label: “label goes here”,bars: {show: true } },

I think it is a little bit redundant to specify [0,28] twice, but if I try
something like
{data: [[0,28]],label: “label goes here”,bars: {show: true } },
only the legend is shown, but no bars. What am I doing wrong?

(maybe it is a stupid question because it works if I use the first
statement, but it seems to me that even the bars are painted twice, so the
colors (originally pastel colors) are much darker.

Best regards! 

Original issue reported on code.google.com by sdsf...@gmail.com on 16 Dec 2007 at 11:43

GoogleCodeExporter commented 8 years ago
If you edit the jquery.flot.js file around line 850 in the drawSeriesBar 
function and
remove the data.length requirement (lines 852-3) it fixes the problem. At least 
in my
app. I've tested it in IE7 and FF3B1. Its in there for a reason, I'm sure, but I
haven't found a place where it brakes my app yet. I'm using flot 0.3 for line 
references.

I've done this edit in the pack file too, works the same.

I'm not using tick marks on the x axis so I don't know how that is affected if 
at all.

Original comment by travis.g...@gmail.com on 17 Dec 2007 at 10:30

GoogleCodeExporter commented 8 years ago
Fixed in SVN. I'll make a release soon. Sorry that it took so long, it was 
trivial,
indeed.

Original comment by olau%iol...@gtempaccount.com on 5 Mar 2008 at 6:58