over different periods:
eg user "shocks" US interest rates 0.50% points above base during 201202-201304 (ie 2012 Quarter2-2013 Quarter4)
User may then add another "shock" to same variable:
US interest rates .75 % points above base during 201301-201404 (ie 2013 Quarter1-2014 Quarter4)
User may then add "shock" to different variable:
JAPAN interest rates (RSH_j) 1.00 % points above base during 201201-201404 (ie 2012 Quarter1-2014 Quarter4)
I have generated a Select area (ShockVarPlot) that concatenates the required component data from DD boxes for charting:
- RSH_u,201202-201304,+0.50
RSH_u,201301-201404,+0.75
RSH_j,201301-201404,+1.00
event to trigger the Chart Plot too)
For EACH particular variable being shocked (eg RSH_u, RSH_j) I would like to instantly plot the entire profile of each
shock. Subsequent shocks to the SAME variable may simply
append to earlier shocks or may (partially) overwrite depending if the time period chosen overlaps.
But once a NEW shock variable is chosen (eg RSH_j) , the previous plot (of RSH_u) simple gets overwritten in the common plot area.
The x-axis scale width can be hard-coded; say 201004-202104.
Charting Requirement (for common plot area) ----
"Add Shock" button=> First Plot - Plot RSH_u +0.50 above base over 201202-201304.......
"Add Shock" button=> ....then (partially) overwrite/append with +0.75 over 201301-201404
"Add Shock" button=> Second Plot - Delete above plot & Plot RSH_j +1.00 above base over 201301-201404
Chartplot needs to display the variable legend being charted eg "RSH_u"or "RSH_j"
Logic Requirement ----
If new shock => plot this magnitude over selected period within 201001-202104
If new shock (same variable) => plot this as above but this shock overwrites previous if any time-period overlap
If new shock (new variable) => delete first plot & plot this magnitude over selected period within 201001-202104
Question --------------
Is there a simple Javascript method to achieve this real-time plotting/appending on clicking "Add Shock" ?
I have seen things like FLOT charting but not sure how to read/chart my Listbox output in ShockVarPlot above
Any thoughts ?


