Jump to content
Software FX Community

Popup new window when click on ChartFX


Recommended Posts


  Below is my sample program, i would like the serial point to different URL, but the problem is when i click on the chart it return me the index for the point is "Point=-1". The serial able to know which i point to it, but the index for the point not able to recognize. Please advise~!


Output.  (This are the url return to me.)



' ****************************************************************************************************************************************************

  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

  ' Different URL for each serial
  'Page 1
  Dim myUrlS0 As String
  myUrlS0 = "TCU_Level_3R.aspx?sessionid=123&Point=%N&Series=%S"
  Chart1.Series(0).Link.Url = myUrlS0
  Chart1.Series(0).Link.Target = "_blank"

  'Page 2
  Dim myUrlS1 As String
  myUrlS1 = "TCU_Level_2.aspx?sessionid=123&Point=%N&Series=%S"
  Chart1.Series(1).Link.Url = myUrlS1
  Chart1.Series(1).Link.Target = "_blank"

  'Chart1.AllSeries.Link.Url = myUrl

  End Sub

  Protected Sub Chart1_Click(ByVal sender As Object, ByVal e As ChartFX.WebForms.HitTestEventArgs) Handles Chart1.Click  

' Part 1
  If e.Series = 0 Then
  Chart1.Series(0).Link.Url = "TCU_Level_3R.aspx?sessionid=123&Point=%N&Series=%S"
  Chart1.Series(0).Link.Target = "_blank"

  ElseIf e.Series = 1 Then 'Part 2

  Chart1.Series(1).Link.Url = "TCU_Level_2.aspx?sessionid=123&Point=%N&Series=%S"
  Chart1.Series(1).Link.Target = "_blank"

  End If

  End Sub





Link to comment
Share on other sites

I see.

 The problem is that if you are using a Series Url, you will not get information about the point.

You have two choices:

1) Assign a global url, like in my posting and then redirect from there to the apropriate page.

2) Assign a Url per point by doing:

chart.Point[0,i] = url

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...