Frame

public struct Frame : Encodable

TODO.

  • An identifier that specifies the group to which the frame belongs, used by animate to select a subset of frames.

    Declaration

    Swift

    public var group: String?
  • A label by which to identify the frame

    Declaration

    Swift

    public var name: String?
  • A list of trace indices that identify the respective traces in the data attribute

    Declaration

    Swift

    public var traces: Anything?
  • The name of the frame into which this frame’s properties are merged before applying.

    This is used to unify properties and avoid needing to specify the same values for the same properties in multiple frames.

    Declaration

    Swift

    public var baseFrame: String?
  • A list of traces this frame modifies.

    The format is identical to the normal trace definition.

    Declaration

    Swift

    public var data: [Trace]
  • Layout properties which this frame modifies.

    The format is identical to the normal layout definition.

    Declaration

    Swift

    public var layout: Layout?
  • Creates Frame object with specified properties.

    Declaration

    Swift

    public init(group: String? = nil, name: String? = nil, traces: Anything? = nil, baseFrame:
            String? = nil, data: [Trace] = [], layout: Layout? = nil)

    Parameters

    group

    An identifier that specifies the group to which the frame belongs, used by animate to select a subset of frames.

    name

    A label by which to identify the frame

    traces

    A list of trace indices that identify the respective traces in the data attribute

    baseFrame

    The name of the frame into which this frame’s properties are merged before applying.

    data

    A list of traces this frame modifies.

    layout

    Layout properties which this frame modifies.

  • Encodes the object in a format compatible with Plotly.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws