Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Added the plot function as a chainable property. #953
This implements a long-standing enhancement of being able to create a plot like this:
This form supports standard jQuery chaining, making it quite convenient when the placeholder is the result of a stream of jQuery calls, or when additional calls need to be made after the plot is created.
The disadvantage of this form is that it provides no way to return the plot object. This isn't a big deal, though, since users can easily retrieve it via the 'plot' data key, like this:
var plot = $("#placeholder").plot(data, options).data("plot");