In each of the previous chapters, we have looked at new chart types or plugins that augmented the functionality of our charts. In this chapter, we will look at how to style the grid and create themed charts. We will also create reusable functions to simplify the building of our charts. In this chapter, we will cover the following topics:
Change the background color of the grid and remove all the grid lines
Discuss how the
canvas
element in HTML works and the proper way to style itCreate a line chart using the second
xaxis
and smoothing linesCreate a waterfall chart and set the negative colors to match our company's color scheme
Create functions to build plot objects with default options for a bar chart
Use our newly-created functions to build bar charts with less code