gmmoraesbr / flot

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

Flot does't work with jQuery 1.4.2 #357

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Im a flot user and I was working with flot+jquery 1.3.2 but the issue comes
when I've tried to update jQuery to 1.4.2 version and I discovered that
flot doesn't work with this jQuery version.

Any idea?

Original issue reported on code.google.com by rube...@gmail.com on 1 Jun 2010 at 3:53

GoogleCodeExporter commented 8 years ago
I am successfully using flot with jquery 1.4.2.

(I found this issue because things stopped working when I upgraded jquery, but 
it 
turns out I had switched to noConflict mode. So things are fine.)

Original comment by djazay...@gmail.com on 5 Jun 2010 at 1:08

GoogleCodeExporter commented 8 years ago
PS- Both flot 0.4 and 0.6 worked for me with jquery 1.4.2.

Original comment by djazay...@gmail.com on 5 Jun 2010 at 1:09

GoogleCodeExporter commented 8 years ago
Not all functions are broken; but some are.

examples\ajax.html - under 1.4.2 the buttons do not trigger a redraw.

I have not done a complete analysis, but just quickly tested some samples using 
1.4.2.

Original comment by geoff.co...@gmail.com on 11 Jun 2010 at 5:49

GoogleCodeExporter commented 8 years ago
The ajax examples are not working for me either with 1.4.2. Is this an issue 
with the example code or flot? It didn't look like there was anything 
deprecated in the ajax example, but I am too green to fully asset it.

Original comment by kellympa...@gmail.com on 10 Aug 2010 at 5:18

GoogleCodeExporter commented 8 years ago
The problem with the AJAX examples not working in 1.4.2 is that the JSON is 
invalid.

Fix the JSON and they'll work.  Try running them through jsonlint.

Original comment by honestbl...@gmail.com on 12 Aug 2010 at 3:21

GoogleCodeExporter commented 8 years ago
Yes, thanks for the answer honestbleeps, I can confirm that the issue lies with 
the JSON formatting.

Invalid JSON (not double quoted but used to work in jQuery 1.3.2):
{
    label: 'series 1',
    data: [
        [
            1281777552000,
            11412 
        ],
        [
            1281778820000,
            19268 
        ]
    ]
}

Valid JSON (properly double quoted):
{
    "label": "series 1",
    "data": [
        [
            1281777552000,
            19268 
        ],
        [
            1281778820000,
            19268 
        ]
    ]
}

Using the proper JSON format solves the issue with jQuery 1.4.2.

Original comment by bogda...@gmail.com on 14 Aug 2010 at 5:31

GoogleCodeExporter commented 8 years ago
Thank you for the answers!

I had the same problem "bogdanmd", and I checked the JSON format with JSONlink, 
I fixed all the double quoted problems and it works with 1.4.2!

:)

Original comment by rube...@gmail.com on 17 Aug 2010 at 4:38

GoogleCodeExporter commented 8 years ago
Grrrr. Simple hand-written Javascript objects out of the window

Thanks for the report and debug analysis people, I've fixed it in the 
development/SVN version.

Original comment by olau%iol...@gtempaccount.com on 13 Dec 2010 at 5:05