Giter Site home page Giter Site logo

Comments (4)

dnschnur avatar dnschnur commented on September 20, 2024

From olau%[email protected] on January 17, 2008 10:34:14
Do you have an example page to speed up reproducing the problem?

from flot.

dnschnur avatar dnschnur commented on September 20, 2024

From olau%[email protected] on September 08, 2008 10:32:36
I haven't been able to reproduce this so I'm going to close the bug. If you can
provide an example page that shows the problem, please reopen.

from flot.

dnschnur avatar dnschnur commented on September 20, 2024

From [email protected] on October 15, 2008 20:47:49
I do get the same symptom, but I think the problem is the legend. I've been fighting
with it for a few hours now! I'm specifying a container in the options and sending
that in a json string to flot. The error is
Error: options.legend.container.html is not a function
Source File: ....scripts/jquery.flot.js Line: 1505

I tried to make sure that the object is actually there in DOM and it is there, but
setting its html fails in jquery. Any idea why? I'm accssing the object via its id.
example of json options:

"options":{"grid":{"autoHighlight":true,"hoverable":true,"backgroundColor":"#fafafa"},"legend":{"container":"$("#153079005_389397849_legend")"},"xaxis":{"ticks":0},"bars":{"fill":0.7}}}

from flot.

dnschnur avatar dnschnur commented on September 20, 2024

From [email protected] on October 16, 2008 08:27:12
It looks to me like you're passing in a string as container, a string containing a
Javascript expression, but nevertheless just a string. You need to evaluate the
expression inside the string somehow, Flot won't work with a string, it needs the
jQuery object.

If you send over the id of the container, you could find the element before passing
it to Flot, something like

options.legend.container = $("#" + theContainerId);
$.plot($("#placeholder"), data, options);

Actually, it could make sense to extend Flot to support passing in a jQuery query
string, so you could specify "#myid" instead of $("#myid"). A patch is welcome. :)

from flot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.