You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds a plot to the graph. Can be called multiple times to add multiple plots. The `id` for the plot is passed to the `dataSource` delegate when requesting data.
47
-
48
-
```swift
49
-
funcremovePlot(id: String)
50
-
```
51
-
52
-
Removes a plot from the graph for a given id.
44
+
Adds a plot to the graph. Can be called multiple times to add multiple plots. The `identifier` for the plot is passed to the `dataSource` delegate when requesting data.
53
45
54
46
## Adding Reference Lines to the Graph
55
47
@@ -62,7 +54,7 @@ Adds an instance of ReferenceLines to the graph. Multiple calls will override th
62
54
## Giving the Graph Data
63
55
64
56
```swift
65
-
var dataSource: GraphViewDataSource
57
+
var dataSource: ScrollableGraphViewDataSource
66
58
```
67
59
68
60
The data source delegate which provides the graph data. This object must conform to the `GraphViewDataSource` protocol by implementing the following three methods.
@@ -71,17 +63,9 @@ The data source delegate which provides the graph data. This object must conform
71
63
funcreload()
72
64
```
73
65
74
-
Causes the graph to recall the delegate functions, to refetch the data. The delegate method `numberOfPoints` will also be called. This is used when points have been added/removed from the plot.
75
-
76
-
## Using Configuration Files
77
-
78
-
```swift
79
-
var configurationFilePath: String
80
-
```
81
-
82
-
Path to the JSON configuration file.
66
+
Causes the graph to recall the delegate functions, to refetch the data.
83
67
84
-
# Proposed API - ScrollableGraphViewDataSource Protocol
@@ -101,7 +85,7 @@ func numberOfPoints(forPlot plot: Plot) -> Int
101
85
102
86
Provides the number of points for each each plot.
103
87
104
-
# Proposed API - ReferenceLines Class
88
+
# API - ReferenceLines Class
105
89
106
90
## New Customisation Options for Reference Lines
107
91
@@ -123,108 +107,13 @@ var absolutePositions: [Double]
123
107
124
108
An array of positions specified in absolute values where the reference lines will be rendered.
125
109
126
-
# Proposed API - Encapsulating Customisation Settings
110
+
# API - Encapsulating Customisation Settings
127
111
128
112
Refactoring is required to organise the customisation settings. The `PlotConfiguration` and `GraphConfiguration` classes will encapsulate the settings for the plot and graph respectively. These data structures are then passed to the graph via the `setConfiguration` and `addPlot` methods.
129
113
130
-
#Proposed API - Configuration Files
114
+
## Example Usage
131
115
132
-
In addition to the `PlotConfiguration` and `GraphConfiguration` classes, an alternative method of using JSON configuration files to specify the appearance of the graph will be provided.
0 commit comments