Abstract base for every chart config. Subclasses override type with a
constant, which is the discriminator the published schema dispatches on.
Arguments
- type
Character: Chart type. Set by each subclass, not by the user.
- dat_path
Optional Character: Path to the data, read at draw time. The serializable alternative to passing
datatodraw().- title
Optional Character: Chart title. Declared here because it is the one property every chart type has;
paletteis not (four take acolormapinstead), and axis labels and margins are cartesian-only.- origin
Optional Named character {"user", "default", "derived"}: Where each value came from, one entry per settable property. Absent on an authored config; written by the interface that resolved it.
- writer
Optional Named character: Which interface wrote the config, as
nameandversion. Absent on an authored config.
Examples
# ChartConfig is abstract: build one of its subclasses.
config <- setup_ScatterConfig(x = "wt", y = "mpg")
S7::S7_inherits(config, ChartConfig)#> [1] TRUE