AGProLabs · Dashboard Contract Lab
Interactive engineering example · No installation

Make the data rules visible.

A polished dashboard needs more than attractive cells. Its ordering and invalid states should be predictable. Change the inputs below to explore two small JavaScript contracts that run entirely in your browser.

Synthetic data, independent example. These rows are invented fixtures. Scores are not market data or probabilities. This lab does not reproduce Crypto Setup Planner's proprietary Pine logic, evaluate trading opportunities, or validate health calculations.
01 / Stable ordering

Equal scores need a tie rule.

Rows sort by the raw score descending, then the normalized identity ascending. Rearranging the incoming rows should leave the result unchanged.

Use finite scores from 0 to 100. Clearing a field creates an invalid input; a blank is never treated as zero.

Validated ranking · raw and rounded scores
RankIdentityRawDisplay

For the actual product panel, see the Crypto Setup Planner dashboard guide. A score and a quality gate answer different questions; this lab only demonstrates ordering.

02 / Explicit validation

A result needs its unit.

Convert centimetres or millimetres while keeping the original value and unit visible. Invalid input produces a named state instead of a misleading result.

Zero is valid. The maximum input of 1,000,000 is an illustrative application boundary. A negative, blank or non-finite input is invalid.

Try 12.5 cm → 125 mm, switch to mm, then clear the field. The original pair and result state should tell the same story.

I also maintain an educational calculator directory. This converter is an independent length example and does not establish medical accuracy or the validity of those website tools.

What to look for

1. Validate at the boundary

rankRows rejects duplicate or malformed identities and scores outside its domain. An interface must also handle blank and invalid number fields before calling a calculation.

2. Preserve raw meaning

84.04 and 84.03 both display as 84.0 here. Sorting uses the original values. The unit converter keeps its original value/unit pair rather than showing a number without context.

3. Keep the failure visible

A rejected score clears the ranking instead of presenting stale rows as current. Length errors remove the previous output. Status messages remain available to screen readers.