← All glossary terms
Glossary

State machine

GlossaryBy OpenCharts TeamPublished

A state machine (or state diagram) is a diagram that shows the discrete states an object can be in and the transitions that move it between states, often with conditions or events on each transition.

In depth

State machines are foundational to anything that has lifecycle: an order (created → paid → fulfilled → returned), a UI component (idle → loading → success/error), or a hardware device (off → standby → running). Formally, a state machine is a 5-tuple of states, alphabet, transitions, initial state, and accept states.

Common variants include finite state machines (FSM), hierarchical state machines (Statecharts), and pushdown automata. Modern frontend tools like XState model UI as state machines for testability.

OpenCharts supports state-diagram-style nodes (state, initial pseudo-state, final pseudo-state, transition) with labeled arrows.

Also known as

state diagramFSMStatechart

Want to put this concept to work in OpenCharts?

Build a state diagram

Related terms

Related use cases