The gt_plt_bar() function takes an existing GT object and adds horizontal bar charts to specified columns. Each cell value is represented as a horizontal bar with length proportional to the cell’s numeric value relative to the column’s maximum value.
Parameters
gt:GT
A GT object to modify.
columns:SelectExpr=None
The columns to target. Can be a single column name or a list of column names. If None, the bar plot is applied to all numeric columns.
fill:str='purple'
The fill color for the bars.
bar_height:int=20
The height of each individual bar in pixels.
height:int=30
The height of the bar plot in pixels.
width:int=60
The width of the maximum bar in pixels
stroke_color:str | None='black'
The color of the vertical axis on the left side of the bar. The default is black, but if None is passed no stroke will be drawn.