ryanlcs Posted July 23, 2009 Report Share Posted July 23, 2009 Hi.. I have a line chart, there is data point on the chart, how can I assign On double click event onto the data point? Upon double click, it will prompt a new window. Thanks. Quote Link to comment Share on other sites More sharing options...
AndreG Posted July 23, 2009 Report Share Posted July 23, 2009 How are you rendering the chart? As .NET or as an image? Quote Link to comment Share on other sites More sharing options...
ryanlcs Posted July 23, 2009 Author Report Share Posted July 23, 2009 Hi.. The chart is rendered as .Net. Quote Link to comment Share on other sites More sharing options...
AndreG Posted July 24, 2009 Report Share Posted July 24, 2009 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, Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.