<?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 : Label Overlap</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Chart Control : Label Overlap]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 29 May 2026 12:16:15 +0000</pubDate>
  <lastBuildDate>Tue, 23 Nov 2010 11:49:56 +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=17592</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[Label Overlap : I&amp;#039;ve come up with a partial...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17592&amp;PID=61512&amp;title=label-overlap#61512</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 17592<br /><strong>Posted:</strong> 23 November 2010 at 11:49am<br /><br />I've come up with a partial solution that hides/shows labels when you mouse over the bar point:<br><br><table width="99%"><tr><td><pre class="BBcode"><br>Private Sub ChartControl1_MouseMove(Button As Integer, Shift As Integer, x As Long, y As Long)<br>&nbsp;&nbsp; Dim lt_Ht As ChartElement<br>&nbsp;&nbsp; Dim lt_SeriesPt As ChartSeriesPoint<br>&nbsp;&nbsp; Dim lt_SeriesPtFind As ChartSeriesPoint<br>&nbsp;&nbsp; Dim lt_Series As ChartSeries<br>&nbsp;&nbsp; Dim lt_Label As ChartBarSeriesLabel<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; Set lt_Ht = UserControl.ChartControl1.HitTest(x, y)<br>&nbsp;&nbsp; <br>&nbsp;&nbsp; If lt_Ht Is Nothing Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Exit Sub<br>&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp; If TypeOf lt_Ht Is ChartSeriesPoint Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Set lt_SeriesPt = lt_Ht<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each lt_Series In UserControl.ChartControl1.Content.Series<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each lt_SeriesPtFind In lt_Series.Points<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_Series.Style.Label.Visible = (lt_SeriesPt Is lt_SeriesPtFind)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next lt_SeriesPtFind<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next lt_Series<br>&nbsp;&nbsp; ElseIf TypeOf lt_Ht Is ChartBarSeriesLabel Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Need a way to tell if the mouse is over the point that the label is associated with<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ' Or a point to the right or left, so we can show a different label<br>&nbsp;&nbsp; Else<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For Each lt_Series In UserControl.ChartControl1.Content.Series<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; lt_Series.Style.Label.Visible = True<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Next lt_Series<br>&nbsp;&nbsp; End If<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>End Sub<br></pre></td></tr></table><br><br>But there are some problems that maybe someone can help me with:<br><br>1) When you user moves the mouse over a label, but that label extends over another point so the mouse is actually over a different point than the label is for, I can't figure out a way to determine this.<br><br>2) Similarly, when the mouse moves over a label, I need a way to determine what point that label is associated with so I can hide the other labels. Is there anyway?<br><br>Some things that would be helpful:<br><br>1) A HitTestEx() method that returns a collection of objects in order of z-order - so if you mouse over a label, you would get a collection with: ChartBarSeriesLabel &gt; ChartSeriesPoint, etc... that you are over. We could then loop through the collection to find the objects that we are interested in.<br><br>2) ChartObjects should have parent properties, so we can navigate easily through the object tree (For example, the ChartBarSeriesLabel and ChartSeriesPoint objects should have a Series object that gets us back up to the parent series.<br><br>Thanks for any replies.<br><br>]]>
   </description>
   <pubDate>Tue, 23 Nov 2010 11:49:56 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17592&amp;PID=61512&amp;title=label-overlap#61512</guid>
  </item> 
  <item>
   <title><![CDATA[Label Overlap : Are there any good ways to handle...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17592&amp;PID=61511&amp;title=label-overlap#61511</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 17592<br /><strong>Posted:</strong> 23 November 2010 at 11:21am<br /><br />Are there any good ways to handle label overlap on a stacked bar chart?<br><br>Take this chart segment for example:<br><br><img src="uploads/2676/chart_label_overlap.jpg" height="91" width="216" border="0" /><br><br>It would be nice if we had a way to change the z-order of a label on mouse-over or click. Is this possible now, or might it be in the future?<br>]]>
   </description>
   <pubDate>Tue, 23 Nov 2010 11:21:51 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17592&amp;PID=61511&amp;title=label-overlap#61511</guid>
  </item> 
 </channel>
</rss>