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

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
ChartLabel.inl
ChartPointsArray.inl
ChartSerieBase.inl
ChartBalloonLabel.inl
chartctrl_src.zip
chartctr_demo.zip
ChartDemo.clw
ChartDemo.dsp
ChartDemo.dsw
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: CChartSurfaceSerie Class 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>CChartSurfaceSerie Class Reference</h1><!-- doxytag: class="CChartSurfaceSerie" --><!-- doxytag: inherits="CChartXYSerie" -->Specialization of a <a class="el" href="class_c_chart_serie.html" title="Abstract class that provides a common &quot;interface&quot; for all series in the...">CChartSerie</a> to display a surface series.  
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="_chart_surface_serie_8h-source.html">ChartSurfaceSerie.h</a>&gt;</code>
<p>
<div class="dynheader">
Inheritance diagram for CChartSurfaceSerie:</div>
<div class="dynsection">

<p><center><img src="class_c_chart_surface_serie.png" usemap="#CChartSurfaceSerie_map" border="0" alt=""></center>
<map name="CChartSurfaceSerie_map">
<area href="class_c_chart_x_y_serie.html" alt="CChartXYSerie" shape="rect" coords="0,112,219,136">
<area href="class_c_chart_serie_base.html" alt="CChartSerieBase< SChartXYPoint >" shape="rect" coords="0,56,219,80">
<area href="class_c_chart_serie.html" alt="CChartSerie" shape="rect" coords="0,0,219,24">
</map>
</div>

<p>
<a href="class_c_chart_surface_serie-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 Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_surface_serie.html#bdb08942927e938a640575594a1a181d">FillStyle</a> { <br>
&nbsp;&nbsp;<b>fsSolid</b> =  0, 
<b>fsHatchDownDiag</b>, 
<b>fsHatchUpDiag</b>, 
<b>fsHatchCross</b>, 
<br>
&nbsp;&nbsp;<b>fsHatchDiagCross</b>, 
<b>fsHatchHorizontal</b>, 
<b>fsHatchVertical</b>
<br>
 }</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The different fill styles. <br></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="0951f19623eea7ff423dcc2267460fc4"></a><!-- doxytag: member="CChartSurfaceSerie::CChartSurfaceSerie" ref="0951f19623eea7ff423dcc2267460fc4" args="(CChartCtrl *pParent)" -->
&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_surface_serie.html#0951f19623eea7ff423dcc2267460fc4">CChartSurfaceSerie</a> (<a class="el" href="class_c_chart_ctrl.html">CChartCtrl</a> *pParent)</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="08a39fa1740a132fffebb220ec09fb08"></a><!-- doxytag: member="CChartSurfaceSerie::~CChartSurfaceSerie" ref="08a39fa1740a132fffebb220ec09fb08" args="()" -->
virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_surface_serie.html#08a39fa1740a132fffebb220ec09fb08">~CChartSurfaceSerie</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="3a8e922fff3d7ee9a4fbba9fae652a34"></a><!-- doxytag: member="CChartSurfaceSerie::SetFillStyle" ref="3a8e922fff3d7ee9a4fbba9fae652a34" args="(FillStyle NewStyle)" -->
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_surface_serie.html#3a8e922fff3d7ee9a4fbba9fae652a34">SetFillStyle</a> (<a class="el" href="class_c_chart_surface_serie.html#bdb08942927e938a640575594a1a181d">FillStyle</a> NewStyle)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the fill style. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dd2aafe3318824c48dcc9719fed06d2f"></a><!-- doxytag: member="CChartSurfaceSerie::GetFillStyle" ref="dd2aafe3318824c48dcc9719fed06d2f" args="() const " -->
<a class="el" href="class_c_chart_surface_serie.html#bdb08942927e938a640575594a1a181d">FillStyle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_surface_serie.html#dd2aafe3318824c48dcc9719fed06d2f">GetFillStyle</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the fill style. <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_surface_serie.html#a369ad7296d818ec4a1d2b04c435fed2">SetHorizontal</a> (bool bHoriz)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the series in horizontal or vertical mode.  <a href="#a369ad7296d818ec4a1d2b04c435fed2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc90e9cc23369507d51a3dbf58d3d8a6"></a><!-- doxytag: member="CChartSurfaceSerie::GetHorizontal" ref="cc90e9cc23369507d51a3dbf58d3d8a6" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_chart_surface_serie.html#cc90e9cc23369507d51a3dbf58d3d8a6">GetHorizontal</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if the series is in horizontal mode. <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_surface_serie.html#3ce7b3fef28a13bb6e5748bb1e5334f8">IsPointOnSerie</a> (const CPoint &amp;screenPoint, unsigned &amp;uIndex) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Check whether a screen point is on the series.  <a href="#3ce7b3fef28a13bb6e5748bb1e5334f8"></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_surface_serie.html#098835a8b3455b385a28bd4d3ffaf39f">SetSeriesOrdering</a> (PointsOrdering)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Specifies how the points should be ordered in the series.  <a href="#098835a8b3455b385a28bd4d3ffaf39f"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
Specialization of a <a class="el" href="class_c_chart_serie.html" title="Abstract class that provides a common &quot;interface&quot; for all series in the...">CChartSerie</a> to display a surface series. 
<p>
A surface can be horizontal (default) or vertical: this defines how the filling of the surface is done. For a horizontal surface, the filling is done between the points and the associated horizontal axis and for a vertical surface, the filling is done between the points and the associated vertical axis. The series can be associated with a secondary axis. For example, if the surface series is horizontal and is associated with the top axis (secondary axis), the filling is done between the top axis and the points. <hr><h2>Member Function Documentation</h2>
<a class="anchor" name="3ce7b3fef28a13bb6e5748bb1e5334f8"></a><!-- doxytag: member="CChartSurfaceSerie::IsPointOnSerie" ref="3ce7b3fef28a13bb6e5748bb1e5334f8" args="(const CPoint &amp;screenPoint, unsigned &amp;uIndex) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool CChartSurfaceSerie::IsPointOnSerie           </td>
          <td>(</td>
          <td class="paramtype">const CPoint &amp;&nbsp;</td>
          <td class="paramname"> <em>screenPoint</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned &amp;&nbsp;</td>
          <td class="paramname"> <em>uIndex</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Check whether a screen point is on the series. 
<p>
This function returns true if the screen point is on the surface. If the screen point is also close to a specific point of the series, the index of the point is stored in the uIndex parameter. Otherwise, this parameter contains INVALID_POINT. <dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>screenPoint</em>&nbsp;</td><td>The screen point to test </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>uIndex</em>&nbsp;</td><td>If the point is close to a specific point of the series, its index is stored here. </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>true if the point is on the series </dd></dl>

<p>Implements <a class="el" href="class_c_chart_serie.html#941aec6162f5b449fc570bc5063fb076">CChartSerie</a>.</p>

</div>
</div><p>
<a class="anchor" name="a369ad7296d818ec4a1d2b04c435fed2"></a><!-- doxytag: member="CChartSurfaceSerie::SetHorizontal" ref="a369ad7296d818ec4a1d2b04c435fed2" args="(bool bHoriz)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CChartSurfaceSerie::SetHorizontal           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>bHoriz</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Sets the series in horizontal or vertical mode. 
<p>
If the series is in horizontal mode, the filling will be done between the data points and the horizontal axis. 
</div>
</div><p>
<a class="anchor" name="098835a8b3455b385a28bd4d3ffaf39f"></a><!-- doxytag: member="CChartSurfaceSerie::SetSeriesOrdering" ref="098835a8b3455b385a28bd4d3ffaf39f" args="(PointsOrdering)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CChartSurfaceSerie::SetSeriesOrdering           </td>
          <td>(</td>
          <td class="paramtype">PointsOrdering&nbsp;</td>
          <td class="paramname"> <em>newOrdering</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Specifies how the points should be ordered in the series. 
<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). 
<p>Reimplemented from <a class="el" href="class_c_chart_serie_base.html#764966e36ffadada4c8d09281c6933e3">CChartSerieBase&lt; SChartXYPoint &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_surface_serie_8h-source.html">ChartSurfaceSerie.h</a><li>E:/Sources Misc/ChartDemo/ChartCtrl/ChartSurfaceSerie.cpp</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
Web04 | 2.8.140916.1 | Last Updated 13 Jul 2010
Article Copyright 2006 by Cedric Moonen
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid