<?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 : Fast line view with time scale</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Chart Control : Fast line view with time scale]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Thu, 21 May 2026 03:38:51 +0000</pubDate>
  <lastBuildDate>Tue, 29 Oct 2019 03:46: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=23917</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[Fast line view with time scale : Hi,I customize example fast line...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=23917&amp;PID=77516&amp;title=fast-line-view-with-time-scale#77516</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6826">PhonG</a><br /><strong>Subject:</strong> 23917<br /><strong>Posted:</strong> 29 October 2019 at 3:46am<br /><br /><div>Hi,</div><div><br></div><div>I customize example fast line view to show my data with time scale, but in axes X just show 1 value - 00:00:43 in every time.</div><div><br></div><div>here my code:</div><div><br></div><div><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Quote" alt="Quote" style="vertical-align: text-bottom;" /> void CFastLineView::CreateChart()<br>{<br>&nbsp;&nbsp;&nbsp; CXTPChartContent* pContent = m_wndChartControl.GetContent();<br><br>&nbsp;&nbsp;&nbsp; CXTPChartSeriesCollection* pCollection = pContent-&gt;GetSeries();<br>&nbsp;&nbsp;&nbsp; pCollection-&gt;RemoveAll();<br><br>&nbsp;&nbsp;&nbsp; if (pCollection)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (int s = 0; s &lt; SeriesCount&#091;m_nSeriesCount&#093;; s++)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPChartSeries* pSeries = pCollection-&gt;Add(new CXTPChartSeries());<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pSeries)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pSeries-&gt;SetName(_T("Series"));<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPChartFastLineSeriesStyle* pStyle = new CXTPChartFastLineSeriesStyle();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pSeries-&gt;SetStyle(pStyle);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pStyle-&gt;SetAntialiasing(m_bAntialiased);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pSeries-&gt;SetArgumentScaleType(xtpChartScaleTime);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; // Set the X and Y Axis title for the series.<br>&nbsp;&nbsp;&nbsp; CXTPChartDiagram2D* pDiagram = DYNAMIC_DOWNCAST(CXTPChartDiagram2D,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pCollection-&gt;GetAt(0)-&gt;GetDiagram());<br>&nbsp;&nbsp;&nbsp; ASSERT(pDiagram);<br><br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;SetAllowZoom(TRUE);<br><br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisY()-&gt;GetRange()-&gt;SetMaxValue(1000.1);<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisY()-&gt;GetRange()-&gt;SetAutoRange(FALSE);<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisY()-&gt;SetAllowZoom(FALSE);<br><br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisX()-&gt;GetLabel()-&gt;GetFormat()-&gt;SetDateTimeCategory(xtpChartDateTimeCustom);<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisX()-&gt;GetLabel()-&gt;GetFormat()-&gt;SetDateTimeFormat(_T("ss:mm:hh \n mm:dd:yyy"));<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisX()-&gt;GetRange()-&gt;SetAutoRange(FALSE);<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisX()-&gt;GetRange()-&gt;SetMinValue(COleDateTime(2019, 10, 29, 13, 25, 0));<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisX()-&gt;GetRange()-&gt;SetZoomLimit(10);<br><br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisX()-&gt;SetInterlaced(FALSE);<br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetAxisY()-&gt;SetInterlaced(FALSE);<br><br>&nbsp;&nbsp;&nbsp; pDiagram-&gt;GetPane()-&gt;GetFillStyle()-&gt;SetFillMode(xtpChartFillSolid);<br>}</div><div><br></div><div>void CFastLineView::AddPoint()<br>{<br>&nbsp;&nbsp;&nbsp; CXTPChartContent* pContent = m_wndChartControl.GetContent();<br><br>&nbsp;&nbsp;&nbsp; CXTPChartSeriesCollection* pCollection = pContent-&gt;GetSeries();<br><br>&nbsp;&nbsp;&nbsp; int nCount = 0;<br>&nbsp;&nbsp;&nbsp; int nTest = 1000;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; if (pCollection)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (int s = 0; s &lt; pCollection-&gt;GetCount(); s++)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; CXTPChartSeries* pSeries = pCollection-&gt;GetAt(s);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (pSeries)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; int nValue = 50;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nCount = pSeries-&gt;GetPoints()-&gt;GetCount();<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (nCount)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nValue = (int)pSeries-&gt;GetPoints()-&gt;GetAt(nCount - 1)-&gt;GetValue(0);<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nValue = rand()/30;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (nValue &lt; 0)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nValue = 0;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (nValue &gt; 1000)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; nValue = 1000;<br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; pSeries-&gt;GetPoints()-&gt;Add(new CXTPChartSeriesPoint(m_dt, nValue));<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; m_dt += COleDateTimeSpan(0, 0, 0, 5);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; CXTPChartDiagram2D* pDiagram =<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; DYNAMIC_DOWNCAST(CXTPChartDiagram2D, m_wndChartControl.GetContent()-&gt;GetPanels()-&gt;GetAt(0));<br>&nbsp;&nbsp;&nbsp; ASSERT(pDiagram);<br><br>&nbsp;&nbsp;&nbsp; CXTPChartAxisRange* pRange = pDiagram-&gt;GetAxisX()-&gt;GetRange();<br>&nbsp;&nbsp;&nbsp; pRange-&gt;SetMaxValue(m_dt);<br>&nbsp;<br>}<br></div><div></td></tr></table></div><div><br></div><div><img src="uploads/6826/ChartPro_FastLineView_ScaleByTime.jpg" height="700" width="1000" border="0" /><br></div>]]>
   </description>
   <pubDate>Tue, 29 Oct 2019 03:46:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=23917&amp;PID=77516&amp;title=fast-line-view-with-time-scale#77516</guid>
  </item> 
 </channel>
</rss>