This repository contains official documentation for SciChart.iOS & macOS: High Performance Realtime iOS & macOS Chart Library.
SciChart.iOS & macOS Chart Examples are provided in Swift & Objective-C. If you are looking for other platforms then please see here:
- Android Charts (Java / Kotlin)
- WPF Charts (C# / WPF)
- Xamarin Charts (C#)
Here you can also find Examples and Tutorials used in documentation articles:
-
Jazzy - CLI tool that generates documentation for
SwiftorObjective-C. On Mac it can be installed from rubygems: [sudo]gem install jazzyLatest stable version at the moment of writing was v0.14.2. -
SourceKitten - CLI tool for interacting with SourceKit. On mac is installed via
Homebrew-brew install sourcekitten
- The main configuration is stored at
.jazzy.yaml. - The homepage is generated from
index.mdfile - Primary table of content (TOC), that descibes main categories lies in
.jazzy.yml - Documentation articles are stored at
sectionsandguidesfolders. - Images used by articles should be stored at
scichart-theme/assets/img/**folder - Style and template overrides for documentation website can be found is at
scichart-themefolder
Run one of the following commands from the build/build_docs.sh script:
| Command | Description |
|---|---|
| generate-api-docs | generates API documentation from pre-built `SciChart.framework` or `SciChart.xcframework`. |
| generate-site | generates full documentation site from `.md` articles and `SourceKit` API docs metadata. |
| build | build full documentation from `.md` articles and SciChart.iOS API docs comments. |
e.g sh build/build_docs.sh generate-site
-
To build documentation at first we need to prepare library headers to extract API documentation. Those can be extract from
SciChart.framework. -
We also need to resolve common jazzy problem, when your directory structure does not reflect the include/import statements, e.g. you have
#import <MyFile/MyFile.h>but the directory containingMyFile.his calledSources/Headers. Then whatever-I,pathpair you pass the compile fails complaining about not finding files.
Since there's no neat solution we are manually create folder filled with headers from SciChart.framework required by umbrella in needed place to run jazzy against.
More informatiion about workarounds:
Long story short - SciChart.h must be on the same level, that it's headers SciChart/*.h
.jazzy.yaml should contain the following lines:
framework_root: path_to_headers/
umbrella_header: path_to_headers/SciChart.h- (Optional). You can cache your SourceKit
.jsonto speed up iterative documentation generation. With theSciChart.hand other headers inSciChart/*.hin place, you can run the following:
sourcekitten doc --objc "SciChart.h" -- -x objective-c \
-isysroot $(xcrun --sdk iphonesimulator --show-sdk-path) \
-I "./" > api/scichart-sourcekit-api-docsThis will output your API documentation .json in api/scichart-sourcekit-api-docs file.
From here you just need to specify where to get prepared the above .json in .jazzy.yaml:
sourcekitten_sourcefile: api/scichart-sourcekit-api-docs- Then to build documentation (assuming you have your
.jazzy.yamlin place) you just use
jazzyThis will build documentation and place it in the root directory
- Create
*.mdfile atsectionsfolder, to create a new section, e.gSciChart iOS v4 SDK User Manual.md. - Or create
*.mdfile atguidesfolder, to create separate article, e.g.SciChart-iOS-v4-SDK-User-Manual/Installation and System Requirements.md. - Edit
.jazzy.yamlfile add new item(s), that has name that is used in tree and path to*.mdfile:
custom_categories:
- name: SciChart iOS v4 SDK User Manual
children:
- Installation and System Requirements