# `PhoenixKitProjects.GanttDisplay`
[🔗](https://github.com/BeamLabEU/phoenix_kit_projects/blob/v0.15.0/lib/phoenix_kit_projects/gantt_display.ex#L1)

Global display settings for the projects Gantt/Timeline chart.

Stored as plain `PhoenixKit.Settings` key/values and read back as the attr map
`PhoenixLiveGantt.gantt/1` takes (bar labels, what to show, bar sizing, and
dependency-arrow routing). Configured on `/admin/settings/projects` (with a
live demo) and consumed by `PhoenixKitProjects.Web.ProjectGanttLive`.

All settings are presentation-only and validated on the way in (enums against
an allowed set, ratios/ints clamped to range), so a malformed or unconfigured
install always resolves to safe defaults that match the behavior that shipped
before this was configurable.

# `attach_modes`

```elixir
@spec attach_modes() :: [String.t()]
```

# `min_bar_max`

```elixir
@spec min_bar_max() :: pos_integer()
```

Upper bound (px) for the `min_bar_px` setting; used to clamp the slider.

# `overflows`

```elixir
@spec overflows() :: [String.t()]
```

# `positions`

```elixir
@spec positions() :: [String.t()]
```

Allowed string values for each enum field (used to build the settings form).

# `put`

```elixir
@spec put(String.t(), String.t()) :: term()
```

Persist one setting from its string form. The field name matches `read/0`'s
keys (`"label_position"`, `"label_fit_ratio"`, …). Enums must be in the allowed
set and ratios are clamped to `0.0..1.0`; anything else is ignored (returns
`:ignore`) so a stray form field can't write garbage.

# `put_flag`

```elixir
@spec put_flag(String.t(), boolean()) :: term()
```

Persist one boolean display toggle (`"show_progress"`, `"show_connectors"`,
`"show_today"`, `"tiny_markers"`, `"avoid_collisions"`). Anything else is ignored.

# `read`

```elixir
@spec read() :: %{
  label_position: atom(),
  label_side: atom(),
  label_overflow: atom(),
  label_fit_ratio: float(),
  label_watermark_opacity: float(),
  show_progress: boolean(),
  show_connectors: boolean(),
  show_today: boolean(),
  tiny_markers: boolean(),
  tiny_bar_px: non_neg_integer(),
  min_bar_px: non_neg_integer(),
  row_height_choice: atom(),
  row_height: String.t(),
  avoid_collisions: boolean(),
  bus_attach_mode: atom()
}
```

All label settings as the attr map `PhoenixLiveGantt.gantt/1` takes
(`label_position` etc., as atoms/floats).

# `reset`

```elixir
@spec reset() :: :ok
```

Restore every Gantt display setting to its default.

# `row_heights`

```elixir
@spec row_heights() :: [String.t()]
```

# `sides`

```elixir
@spec sides() :: [String.t()]
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
