Creating bar charts with Danfo.js
A bar chart presents categorical data with rectangular bars where the lengths are proportional to the values that they represent.
The bar
function can also be called on the plot
namespace and various configuration options can also be applied. In the following sections, we'll demonstrate how to create bar charts from a Series as well as a DataFrame with multiple columns.
Creating a bar chart from a Series
To make a simple bar chart from a Series, you can do the following:
var layout = { title: "A simple bar chart on a series", } var config = { layout } new_df["AAPL.Volume"].plot(this_div()).bar(config)
Running the preceding code cell gives the following output:
Looking at the preceding figure, you'll notice that we have a large number of bars. This is because the AAPL...