<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Constant Line in Chart Control</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Chart Control : Constant Line in Chart Control]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 21 May 2026 05:35:59 +0000</pubDate>
  <lastBuildDate>Thu, 05 Jan 2012 12:16:59 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=19386</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Constant Line in Chart Control : I seem to be able to handle click...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=19386&amp;PID=67337&amp;title=constant-line-in-chart-control#67337</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=7197">maestro1914</a><br /><strong>Subject:</strong> 19386<br /><strong>Posted:</strong> 05 January 2012 at 12:16pm<br /><br />I seem to be able to handle click events and recognize which Chart Control component I am clicking. But, when ever I click the ConstantLine component I don't seem to be able to recognize it. I am using the below code to as a proof of concept in order to test being able to register a click on different components:<br /><br />void CLineView::OnChartClick(NMHDR* /*pNMHDR*/, LRESULT* /*pResult*/){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPoint cursorPoint;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetCursorPos(&cursorPoint);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m_wndChartControl.ScreenToClient(&cursorPoint);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;CXTPChartElement* chartElement = m_wndChartControl.HitTest(cursorPoint);<br />&nbsp;&nbsp;&nbsp;&nbsp;CXTPChartTitleCollection* titleCollection = m_wndChartControl.GetContent()-&gt;GetTitles();<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;CString text = "Default Text";<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if (titleCollection-&gt;GetCount() == 0)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; titleCollection-&gt;Add(new CXTPChartTitle());<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;if (DYNAMIC_DOWNCAST(CXTPChartSeries, chartElement)){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPChartSeries* series = (CXTPChartSeries*)chartElement;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text = series-&gt;GetName();<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} else if (DYNAMIC_DOWNCAST(CXTPChartAxisConstantLine, chartElement)){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPChartAxisConstantLine* trackLine = (CXTPChartAxisConstantLine*)chartElement;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text = "Success";<br />&nbsp;&nbsp;&nbsp;&nbsp;} else if (DYNAMIC_DOWNCAST(CXTPChartLegend, chartElement)){<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CXTPChartLegend* trackLine = (CXTPChartLegend*)chartElement;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text = "Legend";<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;titleCollection-&gt;GetAt(0)-&gt;SetText(text);<br />}<br /><br />My ultimate goal is to be able to register a click on the constant line and then be able to drag it across a chart in order to get the x,y values of a series at the constant line.<br />]]>
   </description>
   <pubDate>Thu, 05 Jan 2012 12:16:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=19386&amp;PID=67337&amp;title=constant-line-in-chart-control#67337</guid>
  </item> 
 </channel>
</rss>