Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to respond to ASP chart control click event

Posted on 2014-01-17
3
Medium Priority
?
1,617 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 2000 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
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:…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

719 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