Adding multiple series
In the previous recipes in this chapter, each chart contained a single series. Visualforce charts are not limited to this and can plot multiple sets of data, regardless of whether there is a relationship between the data sets.
In this recipe, we will create a Visualforce page containing a chart that plots two series against the month for the last year. The first is a bar series of the number of opportunities lost in the month, while the second is a line series of the number of opportunities won in the month. This allows a sales director to see if the won/lost ratio is improving over time.
Getting ready
This recipe makes use of a custom controller, so this must be present before the Visualforce page can be created.
How to do ...
Get Visualforce Development Cookbook - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.