Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

High-speed Charting Control

, 13 Jul 2010
A flexible charting control to display 2D data
chartcrtl_src.zip
ChartCtrl_demo.zip
ChartDemo
ChartCtrl
.svn
all-wcprops
entries
format
prop-base
props
text-base
ChartAxis.cpp.svn-base
ChartAxis.h.svn-base
ChartAxisLabel.cpp.svn-base
ChartAxisLabel.h.svn-base
ChartBalloonLabel.h.svn-base
ChartBalloonLabel.inl.svn-base
ChartBarSerie.cpp.svn-base
ChartBarSerie.h.svn-base
ChartCandlestickSerie.cpp.svn-base
ChartCandlestickSerie.h.svn-base
ChartCrossHairCursor.cpp.svn-base
ChartCrossHairCursor.h.svn-base
ChartCtrl.cpp.svn-base
ChartCtrl.h.svn-base
ChartCursor.cpp.svn-base
ChartCursor.h.svn-base
ChartDateTimeAxis.cpp.svn-base
ChartDateTimeAxis.h.svn-base
ChartDragLineCursor.cpp.svn-base
ChartDragLineCursor.h.svn-base
ChartFont.cpp.svn-base
ChartFont.h.svn-base
ChartGanttSerie.cpp.svn-base
ChartGanttSerie.h.svn-base
ChartGradient.cpp.svn-base
ChartGradient.h.svn-base
ChartGrid.cpp.svn-base
ChartGrid.h.svn-base
ChartLabel.h.svn-base
ChartLabel.inl.svn-base
ChartLegend.cpp.svn-base
ChartLegend.h.svn-base
ChartLineSerie.cpp.svn-base
ChartLineSerie.h.svn-base
ChartLogarithmicAxis.cpp.svn-base
ChartLogarithmicAxis.h.svn-base
ChartMouseListener.h.svn-base
ChartPointsArray.h.svn-base
ChartPointsArray.inl.svn-base
ChartPointsSerie.cpp.svn-base
ChartPointsSerie.h.svn-base
ChartScrollBar.cpp.svn-base
ChartScrollBar.h.svn-base
ChartSerie.cpp.svn-base
ChartSerie.h.svn-base
ChartSerieBase.h.svn-base
ChartSerieBase.inl.svn-base
ChartSeriesMouseListener.h.svn-base
ChartStandardAxis.cpp.svn-base
ChartStandardAxis.h.svn-base
ChartString.h.svn-base
ChartSurfaceSerie.cpp.svn-base
ChartSurfaceSerie.h.svn-base
ChartTitle.cpp.svn-base
ChartTitle.h.svn-base
ChartXYSerie.cpp.svn-base
ChartXYSerie.h.svn-base
PointsOrdering.h.svn-base
tmp
prop-base
props
text-base
ChartBalloonLabel.inl
ChartCtrl_source.zip
ChartLabel.inl
ChartPointsArray.inl
ChartSerieBase.inl
ChartDemo.dsp
ChartDemo.dsw
ColourPicker
.svn
entries
format
prop-base
props
text-base
ColourPicker.cpp.svn-base
ColourPicker.h.svn-base
ColourPopup.cpp.svn-base
ColourPopup.h.svn-base
tmp
prop-base
props
text-base
Doc
html
class_c_chart_axis.png
class_c_chart_balloon_label.png
class_c_chart_bar_serie.png
class_c_chart_candlestick_serie.png
class_c_chart_cross_hair_cursor.png
class_c_chart_cursor.png
class_c_chart_date_time_axis.png
class_c_chart_drag_line_cursor.png
class_c_chart_gantt_serie.png
class_c_chart_label.png
class_c_chart_line_serie.png
class_c_chart_logarithmic_axis.png
class_c_chart_points_serie.png
class_c_chart_serie.png
class_c_chart_serie_base.png
class_c_chart_standard_axis.png
class_c_chart_surface_serie.png
class_c_chart_x_y_serie.png
doxygen.png
tab_b.gif
tab_l.gif
tab_r.gif
res
ChartDemo.ico
ChartCtrl_doxygen.zip
html
class_c_chart_axis.png
class_c_chart_balloon_label.png
class_c_chart_bar_serie.png
class_c_chart_candlestick_serie.png
class_c_chart_cross_hair_cursor.png
class_c_chart_cursor.png
class_c_chart_date_time_axis.png
class_c_chart_drag_line_cursor.png
class_c_chart_gantt_serie.png
class_c_chart_label.png
class_c_chart_line_serie.png
class_c_chart_logarithmic_axis.png
class_c_chart_points_serie.png
class_c_chart_serie.png
class_c_chart_serie_base.png
class_c_chart_standard_axis.png
class_c_chart_surface_serie.png
class_c_chart_x_y_serie.png
doxygen.png
tab_b.gif
tab_l.gif
tab_r.gif
ChartCtrl_source.zip
chartctrl_src.zip
chartctr_demo.zip
res
ChartDemo.ico
<!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: CChartPointsArray&lt; T &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>CChartPointsArray&lt; T &gt; Class Template Reference</h1><!-- doxytag: class="CChartPointsArray" -->Manages an array of points which supports fast resizing.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_chart_points_array_8h-source.html">ChartPointsArray.h</a>&gt;</code>
<p>

<p>
<a href="class_c_chart_points_array-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">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#306219833d94da1fc1c916337ac7aa64">CChartPointsArray</a> (unsigned iResize=1000)</td></tr>

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

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Destructor. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="14e51004533e2a11a5439ddacf45c4df"></a><!-- doxytag: member="CChartPointsArray::GetPointsCount" ref="14e51004533e2a11a5439ddacf45c4df" args="() const " -->
unsigned&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#14e51004533e2a11a5439ddacf45c4df">GetPointsCount</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of points currently stored. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="99b172d588b8f52a9d92a5e172c3b3ea"></a><!-- doxytag: member="CChartPointsArray::SetResize" ref="99b172d588b8f52a9d92a5e172c3b3ea" args="(int iResize)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#99b172d588b8f52a9d92a5e172c3b3ea">SetResize</a> (int iResize)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the size by which the internal buffer is increased when reallocation occurs. <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_points_array.html#2436ef788bdddea716368bf9fd53b137">AddPoint</a> (const T &amp;newPoint)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a new point in the array.  <a href="#2436ef788bdddea716368bf9fd53b137"></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_points_array.html#31bf9b006fc415dc24825f4ac3e37fdb">AddPoints</a> (T *pPoints, unsigned uCount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds multiple points in the array.  <a href="#31bf9b006fc415dc24825f4ac3e37fdb"></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_points_array.html#618bd5da7808d72f2be49426c7d4a1cf">SetPoints</a> (T *pPoints, unsigned uCount)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets multiple points in the array.  <a href="#618bd5da7808d72f2be49426c7d4a1cf"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd96443d7ca79ec5814bb407989b192e"></a><!-- doxytag: member="CChartPointsArray::Clear" ref="dd96443d7ca79ec5814bb407989b192e" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#dd96443d7ca79ec5814bb407989b192e">Clear</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Removes all the points from the array. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3e079eead0d0591cb9b45f8b8fae81bc"></a><!-- doxytag: member="CChartPointsArray::RemovePointsFromBegin" ref="3e079eead0d0591cb9b45f8b8fae81bc" args="(unsigned Count)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#3e079eead0d0591cb9b45f8b8fae81bc">RemovePointsFromBegin</a> (unsigned Count)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Removes a certain amount of points from the begining of the series. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="89b388ad9dd6c2ae6dde667d28922487"></a><!-- doxytag: member="CChartPointsArray::RemovePointsFromEnd" ref="89b388ad9dd6c2ae6dde667d28922487" args="(unsigned Count)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#89b388ad9dd6c2ae6dde667d28922487">RemovePointsFromEnd</a> (unsigned Count)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Removes a certain amount of points from the end of the series. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="10599fee74f8498a04937904e01268dc"></a><!-- doxytag: member="CChartPointsArray::operator[]" ref="10599fee74f8498a04937904e01268dc" args="(unsigned Index)" -->
T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#10599fee74f8498a04937904e01268dc">operator[]</a> (unsigned Index)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the points at the specified index. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dd9964e32c1c45178e43cb40e64d009"></a><!-- doxytag: member="CChartPointsArray::operator[]" ref="1dd9964e32c1c45178e43cb40e64d009" args="(unsigned Index) const " -->
const T &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#1dd9964e32c1c45178e43cb40e64d009">operator[]</a> (unsigned Index) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the points at the specified index. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1138bafdd91a2c6ef305207a1a6b598d"></a><!-- doxytag: member="CChartPointsArray::GetSerieXMinMax" ref="1138bafdd91a2c6ef305207a1a6b598d" args="(double &amp;Min, double &amp;Max) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#1138bafdd91a2c6ef305207a1a6b598d">GetSerieXMinMax</a> (double &amp;Min, double &amp;Max) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the minimum and maximum X values of the points stored in the array. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ed3dbce7b7751bd39a82edd661a0f39"></a><!-- doxytag: member="CChartPointsArray::GetSerieYMinMax" ref="6ed3dbce7b7751bd39a82edd661a0f39" args="(double &amp;Min, double &amp;Max) const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#6ed3dbce7b7751bd39a82edd661a0f39">GetSerieYMinMax</a> (double &amp;Min, double &amp;Max) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the minimum and maximum Y values of the points stored in the array. <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_points_array.html#ccfcfe146bb30456165bf541d0ade059">SetOrdering</a> (PointsOrdering newOrdering)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies how the points should be ordered in the array.  <a href="#ccfcfe146bb30456165bf541d0ade059"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e59a67f001aa8d514f8c689b717930de"></a><!-- doxytag: member="CChartPointsArray::GetOrdering" ref="e59a67f001aa8d514f8c689b717930de" args="() const " -->
PointsOrdering&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#e59a67f001aa8d514f8c689b717930de">GetOrdering</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the ordering of the points in the array. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e1cb8f6fddef4ad34dec4b6e4cd73069"></a><!-- doxytag: member="CChartPointsArray::ReorderPoints" ref="e1cb8f6fddef4ad34dec4b6e4cd73069" args="()" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#e1cb8f6fddef4ad34dec4b6e4cd73069">ReorderPoints</a> ()</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Refreshes the point ordering. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#2b4e7aa01948425b27cd91775dfba900">GetVisiblePoints</a> (double dAxisMin, double dAxisMax, unsigned &amp;uFirstPt, unsigned &amp;uLastPt) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieves the index of the points which are between two given values.  <a href="#2b4e7aa01948425b27cd91775dfba900"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c73536ce52d2d4b8eddd4604aa5bde30"></a><!-- doxytag: member="CChartPointsArray::GetInternalBuffer" ref="c73536ce52d2d4b8eddd4604aa5bde30" args="() const " -->
T *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_points_array.html#c73536ce52d2d4b8eddd4604aa5bde30">GetInternalBuffer</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the internal buffer of the array. <br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h3>template&lt;class T&gt;<br>
 class CChartPointsArray&lt; T &gt;</h3>

Manages an array of points which supports fast resizing. 
<p>
This class is used internally to store the data for all the points. The data is stored in a C-style array. The internal buffer can grow dynamically depending on the needs.<p>
The class is a template class with the template parameter being the type of the points to be stored. The points have to provide the following methods: <ul>
<li>
double GetXMin() </li>
<li>
double GetX() </li>
<li>
double GetXMax() </li>
<li>
double GetYMin() </li>
<li>
double GetY() </li>
<li>
double GetYMax()</li>
</ul>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="306219833d94da1fc1c916337ac7aa64"></a><!-- doxytag: member="CChartPointsArray::CChartPointsArray" ref="306219833d94da1fc1c916337ac7aa64" args="(unsigned iResize=1000)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>&lt; T &gt;::<a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>           </td>
          <td>(</td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>iResize</em> = <code>1000</code>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Constructor. 
<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>iResize</em>&nbsp;</td><td>The size by which the internal buffer is increased when reallocation occurs </td></tr>
  </table>
</dl>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="2436ef788bdddea716368bf9fd53b137"></a><!-- doxytag: member="CChartPointsArray::AddPoint" ref="2436ef788bdddea716368bf9fd53b137" args="(const T &amp;newPoint)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>&lt; T &gt;::AddPoint           </td>
          <td>(</td>
          <td class="paramtype">const T &amp;&nbsp;</td>
          <td class="paramname"> <em>newPoint</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds a new point in the array. 
<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>newPoint</em>&nbsp;</td><td>The new point to add </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="31bf9b006fc415dc24825f4ac3e37fdb"></a><!-- doxytag: member="CChartPointsArray::AddPoints" ref="31bf9b006fc415dc24825f4ac3e37fdb" args="(T *pPoints, unsigned uCount)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>&lt; T &gt;::AddPoints           </td>
          <td>(</td>
          <td class="paramtype">T *&nbsp;</td>
          <td class="paramname"> <em>pPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>uCount</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>
Adds multiple points in the array. 
<p>
The points are added to the ones currently stored in the array. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pPoints</em>&nbsp;</td><td>Array containing the points </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uCount</em>&nbsp;</td><td>The number of points to add </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="2b4e7aa01948425b27cd91775dfba900"></a><!-- doxytag: member="CChartPointsArray::GetVisiblePoints" ref="2b4e7aa01948425b27cd91775dfba900" args="(double dAxisMin, double dAxisMax, unsigned &amp;uFirstPt, unsigned &amp;uLastPt) const " -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>&lt; T &gt;::GetVisiblePoints           </td>
          <td>(</td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>dAxisMin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">double&nbsp;</td>
          <td class="paramname"> <em>dAxisMax</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned &amp;&nbsp;</td>
          <td class="paramname"> <em>uFirstPt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned &amp;&nbsp;</td>
          <td class="paramname"> <em>uLastPt</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Retrieves the index of the points which are between two given values. 
<p>
If the points are not ordered, uFirstPt will contain 0 and uLastPt will contain the index of the last point in the array. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dAxisMin</em>&nbsp;</td><td>The minimum value to retrieve the first visible point </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dAxisMax</em>&nbsp;</td><td>The maximum value to retrieve the last visible point </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uFirstPt</em>&nbsp;</td><td>This parameter will store the index of the first visible point </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uLastPt</em>&nbsp;</td><td>This parameter will store the index of the last visible point </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>false if no points are in the array. </dd></dl>

</div>
</div><p>
<a class="anchor" name="ccfcfe146bb30456165bf541d0ade059"></a><!-- doxytag: member="CChartPointsArray::SetOrdering" ref="ccfcfe146bb30456165bf541d0ade059" args="(PointsOrdering newOrdering)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>&lt; T &gt;::SetOrdering           </td>
          <td>(</td>
          <td class="paramtype">PointsOrdering&nbsp;</td>
          <td class="paramname"> <em>newOrdering</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Specifies how the points should be ordered in the array. 
<p>
This specifies if the points should be ordered on their X values, on their Y values or not ordered (kept in order they are added to the control). Ordering can improve performances a lot but makes it impossible to draw some specific curves (for instance, drawing an ellipse is only possible if no ordering is set). 
</div>
</div><p>
<a class="anchor" name="618bd5da7808d72f2be49426c7d4a1cf"></a><!-- doxytag: member="CChartPointsArray::SetPoints" ref="618bd5da7808d72f2be49426c7d4a1cf" args="(T *pPoints, unsigned uCount)" -->
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class T&gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="class_c_chart_points_array.html">CChartPointsArray</a>&lt; T &gt;::SetPoints           </td>
          <td>(</td>
          <td class="paramtype">T *&nbsp;</td>
          <td class="paramname"> <em>pPoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned&nbsp;</td>
          <td class="paramname"> <em>uCount</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 multiple points in the array. 
<p>
The points currently stored in the array are first removed before adding the new points. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pPoints</em>&nbsp;</td><td>Array containing the new points </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uCount</em>&nbsp;</td><td>The number of points to add </td></tr>
  </table>
</dl>

</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_points_array_8h-source.html">ChartPointsArray.h</a><li>E:/Sources Misc/ChartDemo/ChartCtrl/ChartPointsArray.inl</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jan 17 13:33:11 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)

Share

About the Author

Cedric Moonen
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.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 13 Jul 2010
Article Copyright 2006 by Cedric Moonen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid