nesticot commited on
Commit
4278763
·
verified ·
1 Parent(s): 1c5040c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -315,8 +315,16 @@ def server(input, output, session):
315
  "delay_type": "throttle",
316
  "clip": True, # This helps constrain the brush to the plot area
317
  "fill": "#00000033", # Optional: sets a semi-transparent fill
318
- "stroke": "#000000", # Optional: sets the brush border color
319
-
 
 
 
 
 
 
 
 
320
  }
321
 
322
 
 
315
  "delay_type": "throttle",
316
  "clip": True, # This helps constrain the brush to the plot area
317
  "fill": "#00000033", # Optional: sets a semi-transparent fill
318
+ "stroke": "#000000", # Resets brush when new data is loaded
319
+ # Add bounds for the brush
320
+ "brushOpts": {
321
+ "bounds": {
322
+ "x": [-25, 25], # Match your plot x-limits
323
+ "y": [-25, 25] # Match your plot y-limits
324
+ },
325
+ "constrainToWindow": True, # Constrain to window bounds
326
+ "clampToData": True # Ensure brush stays within data range
327
+ }
328
  }
329
 
330