
上QQ阅读APP看书,第一时间看更新
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:
- 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 }
- 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 }
- 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:
