Book Image

Learning Highcharts 4

By : Joe Kuan
Book Image

Learning Highcharts 4

By: Joe Kuan

Overview of this book

Table of Contents (23 chapters)
Learning Highcharts 4
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

The Highcharts extension


In this section, we will examine how simple it is to create a Highcharts component in Ext JS. We do this by importing from an existing Highcharts configuration. Let's continue from the previous JsonStore example and incorporate it within the extension.

Step 1 – removing some of the Highcharts options

Let's assume that we already have a working independent Highcharts configuration, as follows:

var myConfig = {
      chart: {
            renderTo: 'container',
            width: 350,
            height: 300,
            ....
      },
      series: [{
          type: 'column',
          data: [ 126633683, 55840235, .... ]
      }],
      xAxis: { 
          categories: [ "192.168.200.145", 
                        "192.168.200.99", ... ],
          ....
      },
      yAxis: { .... },
      title: { .... },
      ....
};

The first step is to remove all the fields that the extension will handle internally and pass them to Highcharts. For this reason, we need to remove chart...