Create a horizontal bar chart

horzBarChart(
data,
label,
value,
fill = "crimson",
sort = "none",
stroke = NULL,
strokeWidth = 1,
valueTicks = NULL,
valueFontSize = 10,
labelFontSize = 10,
valueTitle = NULL,
valueTitleFontSize = 14,
labelTitle = NULL,
labelTitleFontSize = 14,
font = "Verdana, Geneva, Tahoma, sans-serif",
title = NULL,
titleFontSize = 20,
opacity = 1,
axisCol = "black",
width = NULL,
height = NULL
)

## Arguments

data The data frame containing the variables to consider. The categorical variable to consider. Will be plotted on the y-axis. The numeric variable to consider. Will be plotted on the x-axis. The color of the bars. Defaults to 'crimson'. The distance between each bar. The value goes from 0 to 0.99 included. Defaults to 0.1. Optional. The color of the stroke of the bars. The width of the stroke of the bars. Defaults to 1 when the 'stroke' parameter is used. Optional. the number of x-axis ticks to consider. The font size of the x-axis values. Defaults to 10. The font size of the y-axis labels. Defaults to 10. Optional. The title of the x-axis. The font size of the x-axis title if specified. Defaults to 14. Optional. The title of the y-axis. The font size of the y-axis title. Defaults to 14. The font family of the text. Defaults to "Verdana, Geneva, Tahoma, sans-serif" Optional. The title of the overall graphic. The font size of the overall graphic's title when specified. The color opacity of the bars. Goes from 0 to 1. Defaults to 1. the color of the x and y axis. It includes the ticks, the labels and titles. Defaults to 'black'. Optional. The width of the SVG output. Optional. The height of the SVG output.

## Value

A SVG horizontal bar chart.

## Examples


library(ggplot2) # needed for the mpg data frame
library(dplyr) # needed for the data wrangling process

mpg %>% group_by(manufacturer) %>%
summarise(median_hwy = median(hwy)) %>%
horzBarChart(
label = "manufacturer",
value = "median_hwy",
sort = "ascending"
)