Change width or height. Source cells hold the values you write.
width
height
sheet hello { source width = 1920; source height = 1080; }
Enter a value outside 0-100 and watch level return to its domain.
level
sheet volume { source level: i32 = 50 filter 0..=100; }
Change width or height. The forced output area follows automatically.
area
sheet area_demo { source width = 10 filter 0..=100; source height = 20 filter 0..=100; out area := width * height; }
Edit either a or b. Watch the graph reverse its flow to preserve your edit.
a
b
sheet basic_relationship { cell a: f64 filter 0.0..=200.0; cell b = 2.0 filter 0.0..=100.0; relationship { a := b * 2.0; b := a / 2.0; } }
Move a to 100, then back to 0. The previous values of b and c return.
c
sheet inequality { cell a = 10 filter 0..=100; cell b = 20 filter 0..=100; cell c = 30 filter 0..=100; relationship { a := min(a, b); b := max(a, b); } relationship { b := min(b, c); c := max(b, c); } }
Enable constrain to link a and b; disable it to edit them independently.
constrain
sheet constrain { source constrain = false; cell a = 5 filter 1..=100; cell b = 10 filter 1..=100; conditional constrain { true => { relationship { a := b; b := a; } } } }
Enable constrain to force a to 42. Disable it to restore the source value.
When the value of a cell is forced, the widget is disabled.
sheet conditional_forced { source constrain = false; cell a = 5 filter 1..=100; conditional constrain { true => { relationship { a := 42; } } } }
The derived width exceeds its filter. Edit height to explore the diagnostic.
sheet filter_diagnostic { cell width: i32 filter 0..=100; cell height = 150 filter 0..=200; relationship { width := height; height := width; } }
Set width and height to 100. The output reports its violated requirement.
sheet area_demo { source width = 10 filter 1..=100; source height = 10 filter 1..=100; out area := width * height require { @not_too_big area <= 1000; }; }
sheet three_way { source ratio = 3.0 / 5.0; source resolution = 72.0; cell lock = false; cell width_pixels: f64; cell height_pixels: f64; cell width_inches = 3.0; cell height_inches = 5.0; relationship { width_pixels := width_inches * resolution; width_inches := width_pixels / resolution; } relationship { height_pixels := height_inches * resolution; height_inches := height_pixels / resolution; } conditional lock { true => { relationship { width_pixels := height_pixels * ratio; height_pixels := width_pixels / ratio; } } } }