Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.4%) to scientific vocabulary
Repository
Demo Swift Charts
Basic Info
- Host: GitHub
- Owner: joelparkerhenderson
- Language: Swift
- Default Branch: master
- Size: 71.3 MB
Statistics
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Demo Swift Charts

This demonstration shows:
This README describes how to create the demo.
This work is thanks to the excellent Appcode iOS charts API tutorial
To learn more about iOS Charts and MPAndriod Charts, see the official sites:
If you like iOS Charts and MPAndroid Charts, please consider making a donation to the authors.
Start
To use this demo, you can clone this repo, or you can use this README to create your own project.
If you clone this repo, then be aware that there are multiple git branches, so pick the one you want.
swift-4-xcode-9: Swift version 4, Xcode version 9, iOS version 11.
swift-3-xcode-8: Swift version 3, Xcode version 8, iOS version 10.
Create the project
Launch Xcode and create a new Xcode project.
Use iOS template "Single View Application" and Product Name "Demo Swift Charts".
Add Charts to the project. We suggest using Carthage, or Cocoapods, or Swift Package Manager.
Carthage
Cartfilefor Swift 3 and Xcode 8:github "danielgindi/Charts" "v3.0.3"Carthage
Cartfilefor Swift 4 and Xcode 9:github "danielgindi/Charts" "v3.0.4"Carthage command:
shell carthage build --no-skip-current && carthage archive Charts.
Create a view
Open the view:
For example, edit
Main.storyboard→View Controller Scene→View Controller→View.In the right lower list of UI items, drag-and-drop a "View" item onto the storyboard.
Add contraints to make the the "View" item as big as you want.
Set the class:
Select the View.
Go to the Identity Inspector.
Edit the "Custom Class" area.
- Class: BarChartView
- Module: Charts
Create an outlet:
For example, edit
Main.storyboard→View Controller Scene→View Controller→View.Open the Assistant Editor and edit
ViewController.swift.Control-drag the view to the class. This creates the outlet. Name the outlet
demoBarChartView.At the top of the class, add
import Charts
Edit the code to be like this:
```swift import UIKit import Charts
class ViewController: UIViewController {
@IBOutlet weak var demoBarChartView: BarChartView!
override func viewDidLoad() { super.viewDidLoad() demoBarChartView.noDataText = "This is the chart ready for data." }
override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() }
} ```
Run
Run the project.
The Simulator screen shows the text "This is the chart ready for data."
If you don't see the text, then look in Xcode for any error messages, and also verify that you set the custom class correctly.
Congratulations, you're successful!
Tracking
- Package: demoswiftcharts
- Version: 3.0.0
- Created: 2016-04-09
- Updated: 2017-09-22
- License: BSD, GPL, MIT
- Contact: Joel Parker Henderson (http://joelparkerhenderson.com)
Owner
- Name: Joel Parker Henderson
- Login: joelparkerhenderson
- Kind: user
- Location: California
- Website: http://www.joelparkerhenderson.com
- Repositories: 319
- Profile: https://github.com/joelparkerhenderson
Software developer. Technology consultant. Creator of GitAlias.com, NumCommand.com, SixArm.com, and many open source projects.
Citation (CITATION.cff)
cff-version: 1.2.0
title: Demo Swift Charts
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Joel Parker
family-names: Henderson
email: joel@joelparkerhenderson.com
affiliation: joelparkerhenderson.com
orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
- type: url
value: 'https://github.com/joelparkerhenderson/demo-swift-charts/'
description: Demo Swift Charts
repository-code: 'https://github.com/joelparkerhenderson/demo-swift-charts/'
abstract: >-
Demo Swift Charts
license: See license file
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Joel Parker Henderson | j****l@j****m | 18 |