Solved

How to respond to ASP chart control click event

Posted on 2014-01-17
3
1,555 Views
Last Modified: 2014-01-26
I have a chart control that looks like the embedded picture.  What I need to do is click on the account description on the chart, and have it change the account combo box on the bottom or better yet get rid of the combo box and just click on the chart account description and have it update the data grid with the new data.  Just not sure how to capture which description was clicked if that's possible, so I can do the rest of the code to fill the grid.

thanks in advance


chart control sample
0
Comment
Question by:mgmhicks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 39790411
Hi,
assuming you use the .NET 3.5 chart control, you can set image maps onto the chart elements.
Some good examples are available on codeplex in the charting controls library:
http://archive.msdn.microsoft.com/mschart/Release/ProjectReleases.aspx?ReleaseId=1591

Run the sample web site and go to the interactivity section.

HTH
Rainer
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 39809876
Not sure if this is the way they do it in the samples, but this works for me:
    Private Sub Chart1_Customize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Chart1.Customize
        For Each lbl As CustomLabel In Chart1.ChartAreas(0).AxisX.CustomLabels
            lbl.PostBackValue = lbl.Text
        Next
    End Sub

    Private Sub Chart1_Click(sender As Object, e As System.Web.UI.WebControls.ImageMapEventArgs) Handles Chart1.Click
        DoSomethingWith(e.PostBackValue) ' the text of the label that was clicked
    End Sub

Open in new window

0
 

Author Closing Comment

by:mgmhicks
ID: 39810953
thanks, that will work
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question