-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathlabel_keyvalue.Rd
36 lines (30 loc) · 1.43 KB
/
label_keyvalue.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/utils.R
\name{label_keyvalue}
\alias{label_keyvalue}
\title{Label function to add label to element of the chart}
\usage{
label_keyvalue(string1 = "", string2 = "(", string3 = ")",
keymap = NULL, valuemap = "percent")
}
\arguments{
\item{string1}{first string}
\item{string2}{second string}
\item{string3}{theird string}
\item{keymap}{how to map key to label. If key is NULL (default), then original
value is used. If key is NA, then empty string is used. If key is a string vectror,
then we assume key is integer 1:n and vector[key] is used for label. This is useful
when we convert a factor to numeric to reduce data traffic. We can first convert
factor variabel to numeric, 1 to number of levels, and its level can be used as keymap.}
\item{valuemap}{how to map value to label. If value is NULL, then original value is used.
If value is NA, then empty string is used. If value is "percent" (default), then percentage
over sum of all values is used.}
\item{id}{chart id}
}
\description{
It typically works with label or title argument in charts like pieChart,
rowChart, bubbleChart. The label is created as string1 + key + string2 +
value + string3. key and value can be mapped in a way specified in keymap
and valuemap. By default, the label is shown as key(value percent), for example
if a slice with key 'name' has 40\% of total value, then it shows as name(40\%).
}