Chartisan provides ways to customize the chart by using hooks. Hooks allow to modify how the chart data is formatted and can be used to customize the output to the core of the library used. Keep in mind you have to understand what you're doing when using hooks. Since there are a lot of features that are common when creating a chart, Chartisan provides some hooks already built-in depending on the library that you are willing to use. This makes customization easier for those who just want some basic styling, while allowing full control of the chart for more advanced usages.
You can apply hooks by passing a hooks instance to the
hooks property on the Chartisan's constructor. The hooks instance can be created by using the global variable named
ChartisanHooks or by importing it from the package in case you're using a module bundler. Once the instance is created, you then have access to all the built-in hooks of your selected library by calling their methods or you may create your own using the methods
custom(). Both methods will allow you to append hooks to the chart a part from the built-ins. You can learn more about hooks at the front-end section.
As it can be seen, the result is now styled by calling some simple chained methods on the hooks instance. This allows for quick easy chart tweaking.