-
-
Flipping coordinates can be done by using type = "bar"
:
+
+
Flipping coordinates can be done by using type = "bar"
:
apex(data = mpg, type = "bar", mapping = aes(x = manufacturer))
-
-
To create a dodge bar charts, use aesthetic fill
:
+
+
To create a dodge bar charts, use aesthetic fill
:
apex(data = mpg, type = "column", mapping = aes(x = manufacturer, fill = year))
-
-
For stacked bar charts, specify option stacked
in ax_chart
:
+
+
For stacked bar charts, specify option stacked
in ax_chart
:
apex(data = mpg, type = "column", mapping = aes(x = manufacturer, fill = year)) %>%
ax_chart(stacked = TRUE)
-
-
+
+
data("economics_long")
apex(data = economics_long, type = "line", mapping = aes(x = date, y = value01, group = variable)) %>%
ax_yaxis(decimalsInFloat = 2) # number of decimals to keep
apex(data = economics_long, type = "area", mapping = aes(x = date, y = value01, fill = variable)) %>%
ax_yaxis(decimalsInFloat = 2) %>% # number of decimals to keep
ax_chart(stacked = TRUE) %>%
ax_yaxis(max = 4, tickAmount = 4)