Create a bar chart with scores per criteria cluster for every alternative in a decision

scoreBarchart_criteriaCluster_by_alternative(
  multiEstimateDf,
  estimateCol,
  criteria,
  decision_id,
  alternativeValueRegex = ".*",
  parentCriterionOrder = unique(weightedEstimates$parentCriterion_id),
  parentCriterionLabels = parentCriterion_ids,
  decisionLabels = NULL,
  alternativeLabels = NULL,
  wrapLabels = 30,
  scoreRange = NULL,
  strokeColor = "black",
  strokeSize = 0.1,
  title = "MDMCDA criteria cluster bar chart by alternative",
  xLab = "Alternatives",
  yLab = estimateCol,
  theme = ggplot2::theme_minimal(base_size = mdmcda::opts$get("ggBaseSize")),
  guides = ggplot2::guide_legend(nrow = 1),
  legend.position = "top"
)

Arguments

multiEstimateDf

A `multiEstimateDf` data frame.

estimateCol

The column name with the estimates to use.

criteria

A `criteria` object.

decision_id

The identifier of the decision to show.

alternativeValueRegex

Regex to select alternative values to include.

parentCriterionOrder

The parent criteria to use, and their order.

decisionLabels

The labels for the decisions (a named vector).

alternativeLabels

The labels for the alternatives (a list of named vectors).

wrapLabels

Where to wrap labels (`NULL` to not wrap).

strokeColor, strokeSize

The color and pen width of the stroke.

title, xLab, yLab

The title and x and y axis labels.

theme

The `ggplot2` theme to use.

guides

A guides argument to tweak the legend.

legend.position, legend.box.margin

The position and spacing for the legend.

parentCriterion_labels

The labels for the parent criteria (a named vector).

Value

A `ggplot2` plot.