Learn R Programming

SveltePlots (version 0.1.0)

create_configurations: Create Default Configuration for SveltePlot Charts

Description

Initializes a list of default configuration settings for SveltePlot charts for internal use. It sets up parameters related to chart dimensions, appearance, axis properties, and more, to prepare for rendering. This function is not intended for direct use by API consumers.

Usage

create_configurations(
  id = "",
  data = NULL,
  header = "",
  height = 500,
  show_legend = TRUE,
  xaxis_ticks = 6,
  dx = "0em",
  dy = "0em",
  rotation_xaxis = 0,
  font_size_xaxis = 14,
  font_size_xticks = 12,
  scale_x = "linear",
  dominant_baseline_x_axis = "middle",
  text_anchor_x_axis = "middle",
  x_axis_type = NULL,
  x_label = NULL,
  format_xaxis = NULL,
  format_yaxis = ",.3r",
  yaxis_ticks = 6,
  font_size_yaxis = 14,
  font_size_yticks = 12,
  format_tooltip = ".2~f",
  y_label = NULL,
  tooltip = NULL,
  interval = NULL,
  time_interval = NULL,
  colors = c("#1F77B4", "#FF7F0E", "#2CA02C", "#D62728", "#9467BD", "#8C564B", "#E377C2",
    "#7F7F7F", "#BCBD22", "#17BECF")
)

Value

A list of configurations for a SveltePlot chart.

Arguments

id

Unique identifier for the chart.

data

Data frame containing the data to be plotted.

header

Chart title or header text.

height

Height of the chart in pixels.

show_legend

Logical; if TRUE, displays the chart legend.

xaxis_ticks

Suggested number of ticks on the x-axis.

dx

Horizontal shift for the x-axis labels, typically in em units.

dy

Vertical shift for the x-axis labels, typically in em units.

rotation_xaxis

Rotation angle for x-axis tick labels, in degrees.

font_size_xaxis

Font size for the x-axis label.

font_size_xticks

Font size for the x-axis tick labels.

scale_x

Scale type for the x-axis ("linear" or "log").

dominant_baseline_x_axis

Dominant baseline for x-axis labels.

text_anchor_x_axis

Text anchor point for x-axis labels.

x_axis_type

Type of x-axis, if applicable (e.g., "date").

x_label

Label for the x-axis.

format_xaxis

Format string for x-axis labels, following D3 format specifications.

format_yaxis

Format string for y-axis labels, following D3 format specifications.

yaxis_ticks

Suggested number of ticks on the y-axis.

font_size_yaxis

Font size for the y-axis label.

font_size_yticks

Font size for the y-axis tick labels.

format_tooltip

Tooltip format string, following D3 format specifications.

y_label

Label for the y-axis.

tooltip

Configuration for tooltips, if specified.

interval

Numeric; interval for the plotting, if applicable.

time_interval

Time interval for the x-axis, if using time series data.

colors

Vector of colors to use for the chart elements.

Examples

Run this code
if (FALSE) {
# This function is typically used internally within the SveltePlots package
# and not intended for direct use in scripts or applications.
}

Run the code above in your browser using DataLab