We've worked with a variety of different chart types so far: column, bar, pie, and spline, to name a few. What if we could make our own chart type? As daunting as that may sound, this recipe looks at how we might make our own chart type, picto, which is like a column chart but uses images for bars.
Note
Much of how this recipe has been prepared depends on specifics of the Highcharts source code. This recipe was written assuming that Highcharts Version 3.0.7 is used. The information provided here may change depending on the version of Highcharts or the chart type.
To make changes to other chart types, refer to the existing series types in the Highcharts source code.
To get started, perform the following steps:
Create an immediate function that takes Highcharts as an argument as shown in the following code:
(function(H) { // Future code goes here }(Highcharts));
Create a wrapper function for
Highcharts.Renderer.prototype.image
as shown in the following...