Jump to content
Software FX Community

Popup new window when click on ChartFX


lewis_leeheng

Recommended Posts

Hi,

  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.)

http://localhost:1074/WebSite/TCU_Level_3R.aspx?sessionid=123&Point=-1&Series=0

 

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

  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

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

 

Regards

Lewis 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...