Open vojtamolda opened 4 years ago
Here's a few pieces of code that may be helpful to read before getting started:
WebView
to display debugging visualization:
Plotly/Extensions/Playground.swift
WebView
:
Examples/Playgrounds/
Here's a suggestted task list:
[x] 0. Make sure the project can be built for iOS/iPadOS.
[ ] 1. Convert the playground example to use UIKit instead of AppKit (i.e. iOS/iPadOS instead of macOS). This is needed because we eventually want to use Catalyst to support macOS.
[ ] 2. Start iterating on the design of PlotlyView
from the code converted in 1. The Xcode Playgrounds may be a good place to do it.
[ ] 3. Once the design of PlotlyView
makes sense from a user's perspective, try to build a sample iOS/iPadOS application that shows a very simple plot. This may eventually end up in the Examples/
folder as a demo.
[ ] 4. Attempt #7 to see how the design works in a larger project. The point of doing this is to reveal missing features and delegate callbacks.
To make the library easier to use on Apple devices (i.e. iOS/iPadOS/macOS) it would be nice to develop a generally reusable
UIView
. Such UI component can then be used as a "LEGO block" that displays a chart within a larger app.PlotlyView
should be a subclass ofWKWebView
and expose it's model as a settable property of typePlotly.Figure
. Simply setting the figure object should be everything one needs to display a chart.Here's an example use:
Developing
PlotlyView
helps a great deal with building the standalone viewer app per #7. For more details about the motivation and general background check out the discussion in #11.