Skip to content

Add Gauge support #1022

Description

@Kyle-Ye

Summary

Add public Gauge support for displaying a value within a bounded range.

Scope

  • Add the public Gauge API and its common value-in-range initializers.
  • Support labels for the gauge, current value, minimum value, maximum value, and marked values where applicable.
  • Integrate GaugeStyle, style configuration, .gaugeStyle(_:), and baseline platform-appropriate presentations.
  • Normalize and update gauge values while preserving the supplied range and label content.
  • Add examples and focused coverage for simple and fully labeled gauges.

Acceptance criteria

  • A basic Gauge(value:in:label:) compiles and renders on supported hosts.
  • Current, minimum, and maximum value labels are available to gauge styles.
  • Applying a supported gauge style changes the presentation without changing the underlying value semantics.
  • Updating the value or range updates the rendered gauge while preserving view identity.

API reference

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: renderingDisplayList, render backends, renderer hosts, drawing, and effects.area: viewView APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior.type: featureNew API, behavior, platform support, or user-facing capability.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions