Bar Chart Documentation

importBarChartfrom"https://deno.land/x/d3nodata@v0.1.3.1/charts.ts"

Prop Name Type Default Value Required Description
datasets {label: string, color: string, data: {x: string, y: string} [] } [] N/A No This format is used to have multiple bars for each x-axis unit. Each bar is customizable for what is listed in the types
barColor string #BFE4A3 No The color of the bars
barHoverColor string #90BE6D No The color of the bars when you over over each bar with the mouse
paddingTop,
paddingLeft,
paddingRight,
paddingBottom
number 60 No The padding to the Top, Left, Right, and Bottom of the chart, respectively
width number 700 No Set the width of the chart
height number 700 No Set the height of the chart
addAxesLabel boolean false No A switch to flip if you want labels on your axes
xAxisLabel string x label No The text you want your x label to be labeled as
yAxisLabel string y label No The text you want your y label to be labeled as
axesColor string #4D908E No The color for the axes of the chart
axesLabelColor string #4D908E No The color for both axes labels
animation boolean true No A switch as to whether you want animation to your chart upon initial load
animationDuration number 800 No Time (in ms) for each bar of the chart to reach the desired height
animationDelay number 100 No Time (in ms) for each bar in the chart to wait before animating
toolTip boolean true No A switch to determine if you want information to show up on mouse over
fontFamily string Verdana No Font for all text in your chart
addTitle boolean false No A switch to add a title to your chart
setTitle string N/A No The title for your chart
setTitleSize string 1.5em No Set font size for the chart's title (in em)
setTitleColor string #277DA1 No Set the color of the chart's title
setTitlePaddingTop number 40 No Set the distance from the top of the chart to where the title is
addLegend boolean true No This toggles the presence of a legend