% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/boxGrobs_boxPropGrob.R
\name{boxPropGrob}
\alias{boxPropGrob}
\title{Create a box with a color split}
\usage{
boxPropGrob(
  label,
  label_left,
  label_right,
  prop,
  y = unit(0.5, "npc"),
  x = unit(0.5, "npc"),
  width,
  height,
  just = "center",
  bjust = "center",
  txt_gp = getOption("boxPropGrobTxt", default = gpar(color = "black")),
  txt_left_gp = getOption("boxPropGrobLeftTxt", default = gpar(col = "black")),
  txt_right_gp = getOption("boxPropGrobRightTxt", default = gpar(col = "black")),
  box_left_gp = getOption("boxPropGrobLeft", default = gpar(fill = "#E6E8EF")),
  box_right_gp = getOption("boxPropGrobRight", default = gpar(fill = "#FFFDF6")),
  box_highlight_gp = getOption("boxPropGrobHighlight", default = gpar(fill = "#ffffff55",
    col = NA)),
  name = NULL
)
}
\arguments{
\item{label}{The label to print - should be a number, text or expression.}

\item{label_left}{The label for the left area}

\item{label_right}{The label for the right area}

\item{prop}{The proportion to split along}

\item{y}{The y position to put the box at. Can be either in \code{npc} (i.e. 0-1) or a \code{\link[grid]{unit}}.}

\item{x}{The x position to put the box at. Can be either in \code{npc} (i.e. 0-1) or a \code{\link[grid]{unit}}.}

\item{width}{The box automatically adapts the size but you can force by specifying the width}

\item{height}{The box automatically adapts the size but you can force by specifying the height}

\item{just}{The justification for the text: left, center or right.}

\item{bjust}{The justification for the box: left, center, right, top or bottom.
See the \code{just} option for the \code{\link[grid]{viewport}}}

\item{txt_gp}{The \code{\link[grid]{gpar}} style to apply to the text. Set \code{boxPropGrobTxt} option
if you want to customize all the boxes at once.}

\item{txt_left_gp}{The \code{\link[grid]{gpar}} style to apply to the left text. Set
\code{boxPropGrobLeftTxt} option if you want to customize all the boxes at once.}

\item{txt_right_gp}{The \code{\link[grid]{gpar}} style to apply to the right text. Set
\code{boxPropGrobRightTxt} option if you want to customize all the boxes at once.}

\item{box_left_gp}{The \code{\link[grid]{gpar}} style to apply to the left box. Set
\code{boxPropGrobLeft} option if you want to customize all the boxes at once.}

\item{box_right_gp}{The \code{\link[grid]{gpar}} style to apply to the right box. Set
\code{boxPropGrobRight} option if you want to customize all the boxes at once.}

\item{box_highlight_gp}{The \code{\link[grid]{gpar}} style to apply to the background
of the main label. Set \code{boxPropGrobHighlight} option if you want to customize
all the boxes at once.}

\item{name}{a character identifier for the \code{grob}. Used to find the \code{grob} on the display
list and/or as a child of another grob.}
}
\value{
A box grob
}
\description{
Creates a grob box with text inside it and a color split in the
horizontal axes that allow indicating different proportions. The
box can also have a title that spanse the two color areas and
that has its own background.
}
\examples{
library(grid)
grid::grid.newpage()
boxPropGrob("Main label", "Left text", "Right text", prop = .3)
}
\seealso{
Other flowchart components:
\code{\link[=align]{align()}},
\code{\link[=append]{append()}},
\code{\link[=boxGrob]{boxGrob()}},
\code{\link[=boxHeaderGrob]{boxHeaderGrob()}},
\code{\link{boxShapes}},
\code{\link[=connectGrob]{connectGrob()}},
\code{\link[=coords]{coords()}},
\code{\link[=distance]{distance()}},
\code{\link[=equalizeWidths]{equalizeWidths()}},
\code{\link[=flowchart]{flowchart()}},
\code{\link[=insert]{insert()}},
\code{\link[=move]{move()}},
\code{\link[=moveBox]{moveBox()}},
\code{\link[=spread]{spread()}}
}
\concept{flowchart components}
