Book Image

Sencha Charts Essentials

By : Ajit Kumar
Book Image

Sencha Charts Essentials

By: Ajit Kumar

Overview of this book

Table of Contents (16 chapters)
Sencha Charts Essentials
About the Author
About the Reviewers

Using built-in interactions

Here is a list of the built-in interactions:

  • Crosshair: This interaction helps the user to get precise x and y values for a specific point on a chart. Because of this, it is applicable to cartesian charts only. The x and y values are obtained by single-touch dragging on the chart.

    The interaction also offers additional configs:

    • axes: This can be used to provide label text and label rectangle configs on a per axis basis using left, right, top, and bottom configs or a single config applying to all the axes. If the axes config is not specified, the axis label value is shown as the text and the rectangle will be filled with white color.

    • lines: The interaction draws horizontal and vertical lines through the point on the chart. Line sprite attributes can be passed using horizontal or vertical configs.

      For example, we configure the following crosshair interaction on a CandleStick chart:

      interactions: [{
           type: 'crosshair',
           axes: {
               left: {