add_title: Add IBCS compliant legend.

Description Usage Arguments Value Examples

View source: R/chart_utils.R

Description

Add IBCS compliant legend.

Usage

1
add_title(svg_string, line1, line2_measure, line2_rest, line3 = "")

Arguments

svg_string

one element character vector containing SVG graphic statements. Legend will be added to this plot.

line1

first line of title. Element(s) of the structure dimension represent the object of the report, typically a legal entity, an organization unit, or a line of business

line2_measure

First part of second line of the title. It will be in bold text. It should represent business measure being analyzed.

line2_rest

Second part of second line of the title. It should represent units of measure.

line3

Third line of the title, it should indicate time, scenarios, variances, etc

Value

object of class tidychart with a character vector containing SVG elements

Examples

1
2
3
4
5
6
df <- data.frame(x = 2010:2015, sales = rnorm(6,10, 2))
column_chart(df, df$x, 'sales') %>%
  add_title(line1 = 'Department of Big Computers',
    line2_measure = "Sales",
    line2_rest = "in mEUR",
    line3 = "2010..2015")

tidycharts documentation built on Jan. 18, 2022, 5:07 p.m.