Add axes multiple with ajax example. #1192

Closed
wants to merge 1 commit into from

2 participants

@DavidePastore

One of the biggest problems that I could encounter is precisely how to do this thing. Now everyone will know how to do it.

@dnschnur
Flot member

Thank you very much for submitting this. I'm uncertain as to whether I should merge it, though. The goal of the examples is to present a single concept in a simple form that has as few distractions as possible. Once people understand these building blocks they can combine them in different ways.

AJAX applies to any plot, and there isn't really anything special about multiple axes. So if we add this, should we also add AJAX + pie, AJAX + stacking, AJAX + redraw, etc? I think that would just lead to confusion. If it's unclear how to combine AJAX with multiple axes, then to me it seems like the individual AJAX and multiple axes examples are not good enough and we should focus on improving them instead.

I'm leaving this open to hear your thoughts, and those of anyone else who would like to comment.

@DavidePastore

Yes, maybe we can improve the existing AJAX example and add a button to fetch multiple axes data from a file. Do you think this could go well or is it too specific?
Thanks for your time.

@dnschnur
Flot member

That's basically the same as the stand-alone example; anyone viewing the source will have to read twice as much code.

Multiple axes involves providing the xaxes and yaxes options. AJAX involves adding a callback to re-plot as new data arrives. What problems are there when combining these two ideas?

@DavidePastore

The problem that I found to combining these two ideas is that AJAX example doesn't say that you need to delete brackets from data = [ series ]; when you receive data.

@dnschnur
Flot member

It sounds like the AJAX plugin could use some clarification; I've opened issue #1197 to cover that.

@dnschnur dnschnur closed this Nov 20, 2013
@DavidePastore DavidePastore deleted the DavidePastore:add-example-multiple-axes-updating-with-ajax branch Nov 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment