Jump to content
Software FX Community

Assign event to Data Point


ryanlcs
 Share

Recommended Posts

 Try the following.

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms" TagPrefix="chartfx7" %><%@ Register Assembly="ChartFX.WebForms.Adornments" Namespace="ChartFX.WebForms.Adornments"   TagPrefix="chartfxadornments" %><%@ Register Assembly="ChartFX.WebForms" Namespace="ChartFX.WebForms.Galleries" TagPrefix="chartfx7galleries" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server">   <title>Untitled Page</title>   <script lang="JavaScript" for="Chart1" event="MouseDoubleClick(obj, args)">   if(args.HitType == 4)   alert('Point ' + args.Point + ' of Series ' + args.Series + ' was clicked.');   </script></head><body>   <form id="form1" runat="server">   <chartfx7:Chart ID="Chart1" runat="server" RenderFormat=".NET">   <Series>   <chartfx7:SeriesAttributes />   <chartfx7:SeriesAttributes />   <chartfx7:SeriesAttributes />   </Series>   </chartfx7:Chart>     </form></body></html>

 

Here is a list of the HitTypes in a chart.

None = 0,   Background = 1,   InsideArea = 2,   Between = 3,   Point = 4,   Axis = 5,   Title = 6,   CustomGridLine = 7,   Drag = 8,   Crosshair = 9,   Zoom = 10,   Scroll = 11,   LegendBox = 12,   DataGrid = 13,   Other = 14,   AxisSection = 15,

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.

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

 Share

×
×
  • Create New...