Skip to content

doobox/Benchmark

Repository files navigation

Benchmark

A light weight gauge view written in SwiftUI.

gaugePreview

Installation

Xcode 11 and iOS 15 or MacOS 10.15 is required.

Swift Package Manager

Manually

Drag Benchmark.swift into your project.

Usage

Import.

Import the Benchmark in the file you would like to use it:

import Benchmark

Instantiate view

Benchmark(progress: 45, maxValue: 180, label: "Label", color1: .red, color2: .green, counterColor: .primary, labelColor: .secondary, minMaxColor: .primary, showLabel: true, showMinMax: true)
    .frame(width: 300)

Arguments

Argument Type Description
progress CGFloat Value for the current gauge position.
maxValue CGFloat The maximum value of the gauge.
label String The text label in the gauge.
color1 Color The left gauge color.
color2 Color The right gauge color.
counterColor Color The gauge value text color.
labelColor Color The label color.
minMaxColor Color The min and max values color.
showLabel Bool Show or hide the label.
showMinMax Bool Show or hide the min max gauge values.

License

Benchmark is distributed under the terms and conditions of the MIT license.

Credits

Benchmark is brought to you by Doobox Software. If you're using Benchmark in your project, attribution would be very appreciated.

About

Circular flexible gauge view.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages