Chart.hitTest Method

Determines what data control element is represented at the specified position.
 

Parameters

offsetX

Type: Number
The position to test in pixels relative to the left edge of the chart.
offsetY

Type: Number
The position to test in pixels relative to the top edge of the chart.
element

Type: Element
The DOM element located at the position.

Return Value


Type: Object - May be null
If not null, a plain object with properties:
     annotationIndex     [type: Number, integer: true, mayBeNull: true]              - The index of the data point annotation if an annotation was found.
     annotationData      [type: String, mayBeNull: true]                             - The data to be displayed as an annotation.
     annotationText      [type: String, mayBeNull: true]                             - The annotation text as displayed.
     axis                [type: dundas.controls.ChartAxis, mayBeNull: true]          - The chart axis, if found.
     axisBounds          [type: dundas.Rect, mayBeNull: true]                        - The bounding rectangle of the axis and its sub-elements, if an axis was found.
     axisLabel           [type: Boolean, mayBeNull: true]                            - True if a label from the specified axis was found.
     axisLabelBounds     [type: dundas.Rect, mayBeNull: true]                        - The bounding rectangle of the axis label, if one was found.
     axisLabelExpander   [type: Boolean, mayBeNull: true]                            - True if the axis label was found by its expander button.
     axisLabelRow        [type: dundas.controls.ChartAxisLabelRow, mayBeNull: true]  - The axis label row the label corresponds to.
     axisLabelText       [type: String, mayBeNull: true]                             - The axis label text, if found.
     axisLabelValue      [type: Object, mayBeNull: true]                             - The axis label data value, if found.
     axisMajorGrid       [type: Boolean, mayBeNull: true]                            - True if a major grid line from the specified axis was found.
     axisMajorTick       [type: Boolean, mayBeNull: true]                            - True if a major tick mark from the specified axis was found.
     axisMinorGrid       [type: Boolean, mayBeNull: true]                            - True if a minor grid line from the specified axis was found.
     axisMinorTick       [type: Boolean, mayBeNull: true]                            - True if a minor tick mark from the specified axis was found.
     axisTitle           [type: Boolean, mayBeNull: true]                            - True if the title of the axis was found.
     dataLabelBounds     [type: dundas.Rect, mayBeNull: true]                        - The bounding rectangle of the data label, if a data label was found.
     point               [type: dundas.controls.ChartPoint, mayBeNull: true]         - The data point, if a data point or one of its labels was found.
     pointBounds         [type: dundas.Rect, mayBeNull: true]                        - The bounding rectangle of the data point, if a data point was found.
     pointLabelIndex     [type: Number, integer: true, mayBeNull: true]              - The index of the data point label if a data point label was found.
     seriesBounds        [type: dundas.Rect, mayBeNull: true]                        - The bounding rectangle of the data point's series, if a data point was found.
     seriesLabel         [type: Boolean, mayBeNull: true]                            - True if a series label was found, otherwise false if a data point label was found.
     scrollbarDimension  [type: dundas.controls.ChartAxisDimension, mayBeNull: true] - The axis dimension of the scrollbar, if applicable.
     scrollbarBounds     [type: dundas.Rect, mayBeNull: true]                        - The bounding rectangle of the scrollbar, if applicable.