Create a horizontal bar chart
horzBarChart(
data,
label,
value,
fill = "crimson",
sort = "none",
paddingWidth = 0.1,
stroke = NULL,
strokeWidth = 1,
bgcol = "#CAD0D3",
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
)
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'.
Optional. Takes the following arguments: 'none', 'ascending' or 'descending', default to 'none'
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 color of the background, default to: '#CAD0D3'
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.
A SVG horizontal bar chart.