Visualforce charts are highly customizable; colors, markers, line widths, highlighting, legends, labels, and more are under the control of the developer.
In this recipe, we will create a Visualforce page containing a bar chart displaying the total value of won opportunities per month for the last year.
The chart will be customized to display horizontal bars in a custom dark blue color that do not highlight when the user hovers over a bar. Finally, a legend will be displayed to show the user what the bars represent.
This recipe relies on the custom controller from the Creating a bar chart recipe in this chapter. If you have already completed that recipe, you can skip this section.
Navigate to the Apex Classes setup page by clicking on Your Name | Setup | Develop | Apex Classes.
Click on the New button.
Paste the contents of the
BarChartController.cls
Apex class from the code download into the Apex Class area.Click on the Save button.