Chapter 15. Highcharts Online Services and Plugins

In the previous chapter, you learned how to run Highcharts on the server side. This enables Highcharts to expand its reach to online services. We will visit these services in this chapter and explore what benefits we can gain from them. As well as that, we examine how we can extend Highcharts with plugins. In this chapter, we will cover the following topics:

  • What service export.highcharts.com provides
  • A step-by-step exercise to create an online chart from the new cloud service—cloud.highcharts.com
  • What a Highcharts plugin is
  • Two plugin examples – regression and draggable points
  • Creating a new user experience by interoperating both plugins
  • How to write a plugin – extend existing methods, export a new method, and handle events

Highcharts export server – export.highcharts.com

In the last chapter, we looked into running Highcharts on the server side. However, some users may not want to set up their own server operations. This is where export.highcharts.com comes in. Originally, it was only set up for the exporting module so that users running Highcharts on the Internet could export their charts freely. Later, the URL was expanded to support online services. This let users enter their own Highcharts configuration and download the resulting chart images.

The following is part of the export.highcharts.com web page:

Highcharts export server – export.highcharts.com

As we can see, the user input indeed corresponds to the parameters of the server-side script, highcharts_convert.js, which we covered in a previous chapter. Both the web interface and server process are implemented in Java, which deliver the user's options to the PhantomJS/highcharts_convert.js process and exports it into SVG. Once the Java server receives the SVG result, it launches Batik to format into image files. The source for the whole web service solution is available in the exporting-server/java/highcharts-export directory.

The downside to the online export service is that it is not WYSIWYG, and so can be unintuitive to use. For this reason, a new web service with much richer user experience was born— Highcharts Cloud Service. We will take a ride in the next section and see what difference it brings.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.162.49