Book Image

Highcharts Essentials

By : Bilal Shahid
Book Image

Highcharts Essentials

By: Bilal Shahid

Overview of this book

Table of Contents (16 chapters)
Highcharts Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adjusting ticks and other chart elements


We can adjust the interval between the ticks that appear on the y axis by using the tickInterval property:

  1. Modify the yAxis component from the previous example to set a difference of 1 between each tick:

    yAxis: {
      title: {
        text: 'Revenue (in U.S. billion dollars)'
      },
      tickInterval: 1
    }
  2. We can also include HTML in our titles and other text properties by enabling the useHTML property. Let's point to the actual data source in our subtitle:

    subtitle: {
      text: 'Source: <a href="http://www.npd.com" title="NPD Group">NPD Group</a>; AFJV',
      useHTML: true
    }
  3. Now, add a bit of CSS styling by using the style property:

    style: {
      color: '#000000',
      textDecoration: 'underline'
    }

The resulting chart from the previous modification will be like the following screenshot: