HitTest on Chart control?

Posted by: raleigh on 8 November 2017, 9:32 pm EST

    • Post Options:
    • Link

    Posted 8 November 2017, 9:32 pm EST

    Is there any native method in AR 11 that can be used to detect what area/series/data point on a Chart has received a mouse click( or other event )?

    I’d like to be able to determine which chart area is clicked and perform associated actions.

    i’ve noticed the HitTest class in the documentation. But not clear as to how to make use of this: http://help.grapecity.com/activereports/webhelp/AR11/index.html#GrapeCity.ActiveReports.Chart.v11~GrapeCity.ActiveReports.Chart.HitTest_members.html

    Thanks.

  • Posted 9 November 2017, 6:19 am EST

    Hello,

    Can you please explain what you wish to accomplish with HitTest on chart? The chart control offers a drill-through feature which can be used to jump to another report or url depending on the data value. Please refer to the following documentation link for details on this - http://help.grapecity.com/activereports/webhelp/AR11/index.html#ChartDataDialog.html

    Kindly look under the ‘Series Values Page’ > Action topic

  • Posted 9 November 2017, 11:30 am EST

    Thank you for your reply.

    For example: Using a Bar Chart that displays sales dollars for each of 12 months in a year. When there is a ‘click’ on any Bar, i’d like to determine which Bar is ‘clicked’ on, and the property values associated with that Bar…such as what Series it is and the value of its .ValueMemberX. In essence, it would behave like the .HyperLink property of other AR controls.

    The values will be used in code to initiate navigation to another report, form or website.

    The doc you provided link to is relevant to Page/RDL report type. Currently, our Chart is being used in a section report.

  • Posted 13 November 2017, 3:07 pm EST

    I’ve asked the concerned team if using the HitTest class is possible in Chart control in SectionReport and will get back to you.

  • Posted 15 November 2017, 6:04 am EST

    Hello,

    The HitTest class is part of the legacy API and is not supported anymore. It is not possible to detect which area/series/datapoint the chart was clicked because the Chart is rendered as an image in the report.

    Sorry for the inconvenience.

  • Posted 15 November 2017, 12:19 pm EST

    Thank you for researching this.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels