FMChart is a charting framework that utilizes Metal API on A7+ iOS devices running iOS 8 or later.
- thin & light
- flexible & customizable
- fast
- low CPU loads
- explicit
In FMChart, a chart consists of :
- Data space
- Data series (in above space)
- Projections (Data Space -> View)
- Data Renderers (series+projection -> lines/points)
- Attachment (Axis, label, plot area, etc)
- Chart (container for above elements, view delegate)
You need to allocate them, configure their properties and
relationships in order to fully manipulate a chart.
(You can use the utilities to omit conventional lines, though)
See HealthKit sample. The view controller queries all systolic/diastolic blood pressures, weights and daily step counts from HealthKit, and then show them simultaneously.
- Put a chart view (FMMetalView) on your storyboards / xibs.
- Create chart (and configurator if needed, configure view/delegate otherwise)
- Create dimensions, range filters, projection(range) updaters
- Create space by combining above dimensions
- Create data containers (series), insert data points if ready
- Create data renderers(FMRenderable) that hold the containers
- Create attachments (axis, labels, gridlines, plot area)
- Manage attributes(FMUniformXXXAttributes) and configurations
- Add renderers/attachments to chart (if not using configurator)
- (Re)Load data if necessary
Note that a FMChartConfigurator instance can perform almost all object allocations and initial settings.
See
If you are not using FMChartConfigurator, you should follow :
- Create FMSurfaceConfiguration instance FMEngine instance
- Configure using [FMChartConfigurator configureMetalChart: view: preferredFps].
- Set engine.device to view.device
- Set chart as view.delegate
- Create FMAnimator and FMGestureDispatcher, set relations
See
See
Prefer using FMExclusiveAxis to FMSharedAxis when possible. You can share a range through dimension and updater even if you have multiple charts, space, axes and axis labels instances.
See
FMAxisLabel requires Core Text and Core Graphics.
You can perform additional action to context before each text line rendering, and modify ranges of valid render cache (e.g. invalidate 3 labels from left side)
See
A grid line instance can be used without an axis (in this case you should manage configurations manually).
This software is released under the MIT License.