Click here to Skip to main content
15,860,844 members
Articles / Desktop Programming / MFC

High-speed Charting Control

Rate me:
Please Sign up or sign in to vote.
4.95/5 (327 votes)
13 Jul 2010CPOL35 min read 4.1M   99.5K   787  
A flexible charting control to display 2D data
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ChartDemo: CChartBalloonLabel&lt; PointType &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>CChartBalloonLabel&lt; PointType &gt; Class Template Reference</h1><!-- doxytag: class="CChartBalloonLabel" --><!-- doxytag: inherits="CChartLabel&lt; PointType &gt;" -->Specialization of the <a class="el" href="class_c_chart_label.html" title="Draws a label containing some text which is attached to a point of a series.">CChartLabel</a> to display a balloon label.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_chart_balloon_label_8h-source.html">ChartBalloonLabel.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for CChartBalloonLabel&lt; PointType &gt;:</div>
<div class="dynsection">

<p><center><img src="class_c_chart_balloon_label.png" usemap="#CChartBalloonLabel< PointType >_map" border="0" alt=""></center>
<map name="CChartBalloonLabel< PointType >_map">
<area href="class_c_chart_label.html" alt="CChartLabel< PointType >" shape="rect" coords="0,0,205,24">
</map>
</div>

<p>
<a href="class_c_chart_balloon_label-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="637efd47da88d8bc9b207c6176484187"></a><!-- doxytag: member="CChartBalloonLabel::SetBackgroundColor" ref="637efd47da88d8bc9b207c6176484187" args="(COLORREF colBackground)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#637efd47da88d8bc9b207c6176484187">SetBackgroundColor</a> (COLORREF colBackground)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the background color of the text area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43cefc851d29bcbb7c35de98b21163d4"></a><!-- doxytag: member="CChartBalloonLabel::GetBackgroundColor" ref="43cefc851d29bcbb7c35de98b21163d4" args="() const " -->
COLORREF&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#43cefc851d29bcbb7c35de98b21163d4">GetBackgroundColor</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the background color of the text area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="58b330f70bb517893ae604a20562e293"></a><!-- doxytag: member="CChartBalloonLabel::SetLineColor" ref="58b330f70bb517893ae604a20562e293" args="(COLORREF colArrow)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#58b330f70bb517893ae604a20562e293">SetLineColor</a> (COLORREF colArrow)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the color of the line connecting the point to the text area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9be7e959dbfcbcd5b6e42f7a22db683b"></a><!-- doxytag: member="CChartBalloonLabel::GetLineColor" ref="9be7e959dbfcbcd5b6e42f7a22db683b" args="() const " -->
COLORREF&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#9be7e959dbfcbcd5b6e42f7a22db683b">GetLineColor</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the color of the line connecting the point to the text area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1fd60c34d8eb49c31662fcfcddc6c759"></a><!-- doxytag: member="CChartBalloonLabel::SetBorderColor" ref="1fd60c34d8eb49c31662fcfcddc6c759" args="(COLORREF colBorder)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#1fd60c34d8eb49c31662fcfcddc6c759">SetBorderColor</a> (COLORREF colBorder)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the color of border's text area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b428ccd54c70563abe49d1f8ed8f270d"></a><!-- doxytag: member="CChartBalloonLabel::GetBorderColor" ref="b428ccd54c70563abe49d1f8ed8f270d" args="() const " -->
COLORREF&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#b428ccd54c70563abe49d1f8ed8f270d">GetBorderColor</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the color of border's text area. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b3b7b88ca6079c833d17dd690a3562e2"></a><!-- doxytag: member="CChartBalloonLabel::SetRoundedRect" ref="b3b7b88ca6079c833d17dd690a3562e2" args="(bool bRounded)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#b3b7b88ca6079c833d17dd690a3562e2">SetRoundedRect</a> (bool bRounded)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies if the text area is rounded or not. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="43470e0fc84d74f5b6072b89c87c0e91"></a><!-- doxytag: member="CChartBalloonLabel::GetRoundedRect" ref="43470e0fc84d74f5b6072b89c87c0e91" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#43470e0fc84d74f5b6072b89c87c0e91">GetRoundedRect</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the text area is rounded. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#31ffe0ed485cfd31537b70bb1f89611e">SetFont</a> (int nPointSize, const TChartString &amp;strFaceName)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the font of the text.  <a href="#31ffe0ed485cfd31537b70bb1f89611e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#d37a26618db9d7f54c22cbf40003f18a">SetFont</a> (const <a class="el" href="class_c_chart_font.html">CChartFont</a> &amp;newFont)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the font of the text.  <a href="#d37a26618db9d7f54c22cbf40003f18a"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a17c9886425bb25dddb193050e81b461"></a><!-- doxytag: member="CChartBalloonLabel::CChartBalloonLabel" ref="a17c9886425bb25dddb193050e81b461" args="(CChartCtrl *pParentCtrl, CChartSerieBase&lt; PointType &gt; *pParentSeries)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#a17c9886425bb25dddb193050e81b461">CChartBalloonLabel</a> (<a class="el" href="class_c_chart_ctrl.html">CChartCtrl</a> *pParentCtrl, <a class="el" href="class_c_chart_serie_base.html">CChartSerieBase</a>&lt; PointType &gt; *pParentSeries)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c050bfd239cb0c783fdde369e51b85b"></a><!-- doxytag: member="CChartBalloonLabel::~CChartBalloonLabel" ref="1c050bfd239cb0c783fdde369e51b85b" args="()" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#1c050bfd239cb0c783fdde369e51b85b">~CChartBalloonLabel</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="adeb3183a9594378fd64cf774d549de6"></a><!-- doxytag: member="CChartBalloonLabel::Draw" ref="adeb3183a9594378fd64cf774d549de6" args="(CDC *pDC, unsigned uPointIndex)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_balloon_label.html#adeb3183a9594378fd64cf774d549de6">Draw</a> (CDC *pDC, unsigned uPointIndex)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Draw the label. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class PointType&gt;<br>
 class CChartBalloonLabel&lt; PointType &gt;</h3>

Specialization of the <a class="el" href="class_c_chart_label.html" title="Draws a label containing some text which is attached to a point of a series.">CChartLabel</a> to display a balloon label. 
<p>
A balloon label is a label with a rounded rectangle area in which the text is displayed and which is connected with a line to the point to which it is attached. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="d37a26618db9d7f54c22cbf40003f18a"></a><!-- doxytag: member="CChartBalloonLabel::SetFont" ref="d37a26618db9d7f54c22cbf40003f18a" args="(const CChartFont &amp;newFont)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class PointType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_chart_balloon_label.html">CChartBalloonLabel</a>&lt; PointType &gt;::SetFont           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_c_chart_font.html">CChartFont</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>newFont</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the font of the text. 
<p>
This function allows to set extended font style by passing a <a class="el" href="class_c_chart_font.html" title="Wrapper class for fonts with advanced properties (italic, bold or underlined).">CChartFont</a> object. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newFont</em>&nbsp;</td><td>The new font. </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="31ffe0ed485cfd31537b70bb1f89611e"></a><!-- doxytag: member="CChartBalloonLabel::SetFont" ref="31ffe0ed485cfd31537b70bb1f89611e" args="(int nPointSize, const TChartString &amp;strFaceName)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class PointType &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_chart_balloon_label.html">CChartBalloonLabel</a>&lt; PointType &gt;::SetFont           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>nPointSize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const TChartString &amp;&nbsp;</td>
          <td class="paramname"> <em>strFaceName</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the font of the text. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>nPointSize</em>&nbsp;</td><td>The font point size. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>strFaceName</em>&nbsp;</td><td>The font face name ("Times New Roman", "Arial", ...) </td></tr>
  </table>
</dl>

<p>Reimplemented from <a class="el" href="class_c_chart_label.html#b8bd7d088fcdf5c882d7cd6eb2c734e3">CChartLabel&lt; PointType &gt;</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li>E:/Sources Misc/ChartDemo/ChartCtrl/<a class="el" href="_chart_balloon_label_8h-source.html">ChartBalloonLabel.h</a><li>E:/Sources Misc/ChartDemo/ChartCtrl/ChartBalloonLabel.inl</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jan 17 13:33:10 2010 for ChartDemo by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.8 </small></address>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Engineer
Belgium Belgium
I am a 29 years old guy and I live with my girlfriend in Hoegaarden, little city from Belgium well known for its white beer Smile | :) .
I studied as an industrial engineer in electronics but I oriented myself more towards software development when I started to work.
Currently I am working in a research centre in mechatronica. I mainly develop in C++ but I also do a bit of Java.
When I have so spare time, I like to read (mainly fantasy) and play electric guitar.

Comments and Discussions