Updating sql query with multiple tags

I have a chart with a sql binding that relies on three things:

Line, Startup Time, End Time

I have a dropdown menu for line, which in turn tells my duration dropdown (where I get my startup and end times) where to look in the start/stop table. The question that I have is that every time I change the line I’m looking at, it pulls up new start and end times from the database, and the graph queries the database twice.


“I’m a graph. I show info about a line between a certain time. Oh look, a different line, let’s go check out the database. Oh, a different timeframe, let’s go check out the database.”

Is there any way to make that graph query the whole thing at once? Also, I need to be able to change start and stop times without changing the line (look at yesterday).


Well, somehow you’ll need to buffer up the changes so they’re delivered to the chart at once.

The easiest way to do this would be to add some sort of “apply” button. Construct the query as a String property, and have the apply button latch the query over into another property, that the chart uses as its query. This way the query can change multiple times but it won’t affect the chart until they hit the apply button.