ParallelCategories

public struct ParallelCategories : Trace, DomainSubplot

Parallel categories diagram for multidimensional categorical data.

See also

Documentation for Python, JavaScript or R
  • Corresponding Plotly trace type.

    Declaration

    Swift

    public let type: String
  • Switch indicating whether the trace supports animation of its data.

    Declaration

    Swift

    public static var animatable: Bool { get }
  • Determines whether or not this trace is visible.

    If legendonly, the trace is not drawn, but can appear as a legend item (provided that the legend itself is visible).

    Declaration

    Swift

    public var visible: Visible?
  • Sets the trace name.

    The trace name appear as the legend item and on hover.

    Declaration

    Swift

    public var name: String?
  • uid

    Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.

    Declaration

    Swift

    public var uid: String?
  • Assigns extra meta information associated with this trace that can be used in various text attributes.

    Attributes such as trace name, graph, axis and colorbar title.text, annotation text rangeselector, updatemenues and sliders label text all support meta. To access the trace meta values in an attribute in the same trace, simply use %{meta[i]} where i is the index or key of the meta item in question. To access trace meta in layout attributes, use %{data[n[.meta[i]} where i is the index or key of the meta and n is the trace index.

    Declaration

    Swift

    public var meta: Data<Anything>?
  • Undocumented

    Declaration

    Swift

    public var stream: Stream?
  • Undocumented

    Declaration

    Swift

    public var transforms: [Transform]
  • Controls persistence of some user-driven changes to the trace: constraintrange in parcoords traces, as well as some editable: true modifications such as name and colorbar.title.

    Defaults to layout.uirevision. Note that other user-driven trace attribute changes are controlled by layout attributes: trace.visible is controlled by layout.legend.uirevision, selectedpoints is controlled by layout.selectionrevision, and colorbar.(x|y) (accessible with config: {editable: true}) is controlled by layout.editrevision. Trace changes are tracked by uid, which only falls back on trace index if no uid is provided. So if your app can add/remove traces before the end of the data array, such that the same trace has a different index, you can still preserve user-driven changes if you give each trace a uid that stays with it as it moves.

    Declaration

    Swift

    public var uiRevision: Anything?
  • Declaration

    Swift

    public var domain: Domain?
  • Determines which trace information appear on hover.

    If none or skip are set, no information is displayed upon hovering. But, if none is set, click and hover events are still fired.

    See more

    Declaration

    Swift

    public struct HoverInfo : OptionSet, Encodable
  • Determines which trace information appear on hover.

    If none or skip are set, no information is displayed upon hovering. But, if none is set, click and hover events are still fired.

    Declaration

    Swift

    public var hoverInfo: HoverInfo?
  • Sets the hover interaction mode for the parcats diagram.

    If category, hover interaction take place per category. If color, hover interactions take place per color per category. If dimension, hover interactions take place across all categories per dimension.

    See more

    Declaration

    Swift

    public enum HoverOn : String, Encodable
  • Sets the hover interaction mode for the parcats diagram.

    If category, hover interaction take place per category. If color, hover interactions take place per color per category. If dimension, hover interactions take place across all categories per dimension.

    Declaration

    Swift

    public var hoverOn: HoverOn?
  • Template string used for rendering the information that appear on hover box.

    Note that this will override hoverinfo. Variables are inserted using %{variable}, for example “y: %{y}”. Numbers are formatted using d3-format’s syntax %{variable:d3-format}, for example “Price: %{y:$.2f}”. https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_format for details on the formatting syntax. Dates are formatted using d3-time-format’s syntax %{variable|d3-time-format}, for example “Day: %{2019-01-01|%A}”. https://github.com/d3/d3-time-format#locale_format for details on the date formatting syntax. The variables available in hovertemplate are the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event-data. Additionally, every attributes that can be specified per-point (the ones that are arrayOk: true) are available. variables count, probability, category, categorycount, colorcount and bandcolorcount. Anything contained in tag <extra> is displayed in the secondary box, for example “{fullData.name}”. To hide the secondary box completely, use an empty tag <extra></extra>.

    Declaration

    Swift

    public var hoverTemplate: String?
  • Sets the drag interaction mode for categories and dimensions.

    If perpendicular, the categories can only move along a line perpendicular to the paths. If freeform, the categories can freely move on the plane. If fixed, the categories and dimensions are stationary.

    See more

    Declaration

    Swift

    public enum Arrangement : String, Encodable
  • Sets the drag interaction mode for categories and dimensions.

    If perpendicular, the categories can only move along a line perpendicular to the paths. If freeform, the categories can freely move on the plane. If fixed, the categories and dimensions are stationary.

    Declaration

    Swift

    public var arrangement: Arrangement?
  • Sort paths so that like colors are bundled together within each category.

    Declaration

    Swift

    public var bundleColors: Bool?
  • Sets the path sorting algorithm.

    If forward, sort paths based on dimension categories from left to right. If backward, sort paths based on dimensions categories from right to left.

    See more

    Declaration

    Swift

    public enum SortPaths : String, Encodable
  • Sets the path sorting algorithm.

    If forward, sort paths based on dimension categories from left to right. If backward, sort paths based on dimensions categories from right to left.

    Declaration

    Swift

    public var sortPaths: SortPaths?
  • Sets the font for the dimension labels.

    Declaration

    Swift

    public var labelFont: Font?
  • Sets the font for the category labels.

    Declaration

    Swift

    public var tickFont: Font?
  • The dimensions (variables) of the parallel categories diagram.

    See more

    Declaration

    Swift

    public struct Dimension : Encodable
  • Undocumented

    Declaration

    Swift

    public var dimensions: [Dimension]?
  • Undocumented

    See more

    Declaration

    Swift

    public struct ShapedMarkerLine : Encodable
  • Undocumented

    Declaration

    Swift

    public var line: ShapedMarkerLine?
  • The number of observations represented by each state.

    Defaults to 1 so that each state represents one observation

    Declaration

    Swift

    public var counts: Data<Double>?
  • Creates ParallelCategories object from the most frequently used properties.

    Declaration

    Swift

    public init(name: String? = nil, line: ShapedMarkerLine? = nil)

    Parameters

    name

    Sets the trace name.

    line

  • Creates ParallelCategories object with specified properties.

    Declaration

    Swift

    public init(visible: Visible? = nil, name: String? = nil, uid: String? = nil, meta:
            Data<Anything>? = nil, stream: Stream? = nil, transforms: [Transform] = [], uiRevision:
            Anything? = nil, domain: Domain? = nil, hoverInfo: HoverInfo? = nil, hoverOn: HoverOn? = nil,
            hoverTemplate: String? = nil, arrangement: Arrangement? = nil, bundleColors: Bool? = nil,
            sortPaths: SortPaths? = nil, labelFont: Font? = nil, tickFont: Font? = nil, dimensions:
            [Dimension]? = nil, line: ShapedMarkerLine? = nil, counts: Data<Double>? = nil)

    Parameters

    visible

    Determines whether or not this trace is visible.

    name

    Sets the trace name.

    uid

    Assign an id to this trace, Use this to provide object constancy between traces during animations and transitions.

    meta

    Assigns extra meta information associated with this trace that can be used in various text attributes.

    stream

    transforms

    uiRevision

    Controls persistence of some user-driven changes to the trace: constraintrange in parcoords traces, as well as some editable: true modifications such as name and colorbar.title.

    domain

    hoverInfo

    Determines which trace information appear on hover.

    hoverOn

    Sets the hover interaction mode for the parcats diagram.

    hoverTemplate

    Template string used for rendering the information that appear on hover box.

    arrangement

    Sets the drag interaction mode for categories and dimensions.

    bundleColors

    Sort paths so that like colors are bundled together within each category.

    sortPaths

    Sets the path sorting algorithm.

    labelFont

    Sets the font for the dimension labels.

    tickFont

    Sets the font for the category labels.

    dimensions

    line

    counts

    The number of observations represented by each state.

  • Encodes the object in a format compatible with Plotly.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws