As developers, we often deal with scenarios where some task needs to be accomplished programmatically. When speaking about Highcharts, these scenarios can be either inserting a new series into an already initialized chart, updating an axis, or destroying a chart on a user-generated event. This is where Highcharts APIs come in handy as they provide us with methods, properties, and events to have full control over our code.
We have used some of the API features in earlier chapters such as setting a theme via the Highcharts.setOptions()
method and using its properties on series to get values on x and y axes. In this chapter, we will examine Highcharts APIs more closely to arm ourselves with necessary skills that will prove useful when working with Highcharts.
However, before pressing on to Highcharts APIs and events, we shall first familiarize ourselves with the Highcharts class model as it's crucial to have a deep understanding of APIs. The class...