A 3D Trend Space for Three Coupled Electrolytes
Refeeding syndrome moves phosphate, potassium, and magnesium together through a shared insulin-driven mechanism, but each electrolyte follows its own distinct trajectory. Instead of three separate 2D trend lines, this companion plots the three values as one point moving through a 3D "electrolyte space" — phosphate on the X axis, potassium on Y, magnesium on Z — so a diverging electrolyte visibly peels the trajectory off the diagonal toward its own corner of the cube rather than being compared line-by-line.
- 3 axes: Phosphate (X), potassium (Y), magnesium (Z), each normalized 0–1 against baseline
- Reference band: A translucent cube marks the broad "expected" zone all three coordinates should stay within during a normal course
- Day-by-day path: A tube trajectory connects each day's 3-electrolyte position, with the newest day highlighted and pulsing
- Flag detection: A concerning trajectory turns the tube red and adds a pulsing ring at the current position, visible from any camera angle
Why plot electrolytes against each other instead of against time
A conventional trend chart plots each electrolyte's value against time on separate or overlaid lines. That is useful for reading a single value's slope, but it makes the relationship between electrolytes — whether they are moving together or one is diverging — something the viewer has to reconstruct mentally by comparing line shapes. Plotting phosphate, potassium and magnesium directly against each other in a 3D coordinate space turns that relationship into a single geometric fact: an expected course keeps the trajectory near the diagonal through the reference cube, while a divergent electrolyte visibly pulls the path off-diagonal toward its own axis, in a way that is easy to see from any rotation of the scene.
Reading the trajectory
Drag to orbit the trend space and scroll or pinch to zoom. Move the day slider to extend the trajectory day by day, toggle the trend pattern to compare an expected bounded course against a concerning steep or divergent one, and use auto-play to watch the point trace its path through the refeeding course at a chosen speed. The origin-anchored drop lines at the current day help read the exact coordinate on each axis without losing the 3D context.