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:
canvas
element in HTML works and the proper way to style itxaxis
and smoothing linesWe get into the office around 9 o'clock and head to the conference room for our meeting with Roshan. A few minutes later he and Calvin arrive. "Thanks for joining us this morning," Roshan begins. "I think we've settled on the charts we want on the dashboard. We've decided we want two versions: one for vice presidents that give a company-wide view and one for managers to keep abreast of their divisions."
Roshan continues, "I think the next step for you two will be to modify the charts to match our brand standards. For the company-wide charts, we want to use the company's purple color scheme. For each division, we want the red, green, and blue color schemes. Is there any way we can use a different color for the background of the charts? If so, let's make it a lighter version of the standard color. The tan or off-white color is just bland. Beyond changing the background color, we'll leave it to you to find other ways to put some polish on the charts."
The meeting wraps up and we gather our things. Calvin speaks up, "I forgot to bring the list of which charts go with which report. I'll e-mail that over when I get back to my office." We head back to our office and work through our e-mails from the weekend. About 10 minutes later, we get an e-mail from Calvin. It lists the following charts for the company-wide report:
Thankfully, we already have a working version of each chart. We just need to clean them up and style them.
3.15.206.25