App exemplo utilizando o gráfico de barras

Overview

Gráfico de Barras (Exemplo)

Repositório com app exemplo para o uso do gráfico de Barras.

O gráfico de barras é um gráfico com barras retangulares e comprimento proporcional aos valores que ele apresenta.

Alguns gráficos de barra apresentam barras agrupadas em grupos (gráficos de barras agrupadas) e outros mostram as barras divididas em sub-partes para mostrar efeito acumulativo. Um eixo do gráfico mostra especificamente o que está sendo comparado enquanto o outro eixo representa valores discretos.

11-04 13_55_10-Window 5-Window 2021-11-04 13_55_56-Window

Exemplo de Gráficos de Barras por nosso app:

140558057-de48cbc5-4b87-4e6f-8c0e-b810305f97e3

Passos

1. Criando uma estrutura básica para a utilização do Framework

Exemplo com Barras Únicas

Screen Shot 2021-11-05 at 14 39 54

Exemplo com Barras empilhadas

Screen Shot 2021-11-05 at 14 31 09

Exemplo com Barras lado-a-lado

Screen Shot 2021-11-05 at 14 36 48

2. Alterando a altura e os valores no topo das barras

Onde alterar?

Altura da Barra: var barValuesOne: [CGFloat] = [50, 60, 70, 80, 90] Valores escritos: var labelValuesOne: [String] = ["A", "B", "C", "D", "E"]

Primordialmente, cada gráfico de barras deve possuir um valor no seu topo, pois é uma representação de quantidades de alguma coisa. Para alterar esses valores, no gráfico de barras únicas alteramos esses parâmetros visualizados na imagem abaixo:

Screen Shot 2021-11-05 at 15 00 25

⚠️ Não necessariamente os valores das alturas devem ser os mesmos daqueles escritos, o importante é que a proporção seja respeitada. Se num gráfico de barras, uma delas possui valor 500 e a outra de 50, a proporção é de 10:1 e portanto colocar como valores de altura 5 e 50 produzirá o mesmo aspecto
⚠️ Para alterar os gráficos de Barras Empilhadas e o de Barras lado-a-lado,

3. Personalizando o gráfico

Título e Descrição

⚠️ Para trocar o título e a descrição, altere os valores contidos abaixo:

Screen Shot 2021-11-05 at 15 27 20

Cor e Largura das Barras

⚠️ Para alterar a cor e a largura das barras, altere os parâmetros como demonstrado na figura abaixo:

Screen Shot 2021-11-05 at 15 26 38

You might also like...
Stocks-App - App that allows the user to track stocks of their choice
Stocks-App - App that allows the user to track stocks of their choice

Stocks-App App that allows the user to track stocks of their choice (Coming soon

NetFun-ios-app - iOS app using BFF service to display processed data.
NetFun-ios-app - iOS app using BFF service to display processed data.

NetFun-ios-app iOS app using BFF service to display processed data. The iOS demo developed in SwiftUI and it uses BFF service to show expected UI comp

An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.
An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.

SpotifyClone An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and

IOS-Quiz-App- - A trivia quiz app built with Swift using MVC structure

Quiz App A trivia quiz app built with Swift using MVC structure. Default Quiz

 Quotes App - quotes browsing app which is built with Quotable Free API completely in UIKit
Quotes App - quotes browsing app which is built with Quotable Free API completely in UIKit

Quotes App is quotes browsing app which is built with Quotable Free API completely in UIKit

Weather-app - Created a simple weather app on Xcode using SwiftUI, only shows one location

weather-app Created a simple weather app on Xcode using SwiftUI, only shows one

Ios-weather-app - A simple weather app with swift
Ios-weather-app - A simple weather app with swift

AHOY Assignment Weather app Main Screen Settings Architecture The Architecture u

YTS-App - Repository for the official Yeshivat Torat Shraga App

Yeshivat-Torat-Shraga Official repository for the Yeshivat Torat Shraga app. Wha

Owner
null
Projeto utilizando Flutter para desenvolver uma aplicação com o objetivo de gerenciar uma lista de livros, como se fosse uma biblioteca, sendo possível adicionar, editar e excluir livros.

todo_list_flutter A new Flutter application. Getting Started This project is a starting point for a Flutter application. A few resources to get you st

César Vargas Júnior 0 Nov 4, 2021
In this mini app covered the concepts like basics of SwiftUI and Navigations and Animations and List with CRUD functions and MVVM and App Launch and App icons adding and also applied persistence using UserDefaults Concept.

TodoList In this application used the concepts from the beginner level project of SwiftUI_Evolve_1 The following concepts covered in this mini app Swi

Sivaram Yadav 2 Dec 4, 2021
Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController.

Todo Todo is an iOS App written in Swift. This app is used for an online video training course. This app demonstrates how to use UITableViewController

Jake Lin 273 Dec 29, 2022
Porting the example app from our Advanced iOS App Architecture book from UIKit to SwiftUI.

SwiftUI example app: Koober We're porting the example app from our Advanced iOS App Architecture book from UIKit to SwiftUI and we are sharing the cod

raywenderlich 55 Dec 19, 2022
Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI.

Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI. You can watch the whole journey of building this

Dheeraj Kumar Sharma 32 Nov 22, 2022
SwiftUI App to view the App Activity Record from iOS 15

App Activity Viewer A viewer for the iOS 15 "Record App Activity" export. FAQ How do I create an App Activity Report? Go to the "Settings" app of your

Jannik Arndt 13 Nov 16, 2022
iOS app for Ribbit, Broker API Reference App

Ribbit Reference Implementation (iOS) The reference implementation for designing the iOS user interface of a broker-dealer trading application with th

Alpaca 23 Dec 14, 2022
The app provides additional actions for the Shortcuts app on macOS and iOS.

Actions Supercharge your shortcuts The app provides additional actions for the Shortcuts app on macOS and iOS. Submit action idea (Submit an issue bef

Sindre Sorhus 1.2k Dec 29, 2022
A todo list iOS app developed with swift5 and coredata to persist data, this app help people organise their tasks on categories.

A todo list iOS app developed with swift5 and coredata to persist data, this app help people organise their tasks on categories. The app is simple, intuitive, and easy to use and update tasks informations.

null 1 Oct 10, 2022
The app demonstrates how to use Firebase in a SwiftUI iOS app

Firebase SwiftUIDemo app This app demonstrates how to use Firebase in a SwiftUI iOS app. Firebase Setup Go to firebase.com Click new project. Copy app

Andrew Gholson 0 Nov 28, 2021