<?xml version="1.0" encoding="iso-8859-9" ?>
<?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>Clomosy | Forum : Döngü içerisinde chart oluşturma</title>
  <link>https://forum.clomosy.com.tr/</link>
  <description><![CDATA[XML içerik linki; Clomosy | Forum : Genel &#304;&#351;lemler : Döngü içerisinde chart oluşturma]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 04 May 2026 10:53:03 +0000</pubDate>
  <lastBuildDate>Thu, 30 Oct 2025 09:10:30 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.07</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>https://forum.clomosy.com.tr/RSS_post_feed.asp?TID=1213</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Clomosy | Forum]]></title>
   <url>https://forum.clomosy.com.tr/forum_images/logo.png</url>
   <link>https://forum.clomosy.com.tr/</link>
  </image>
  <item>
   <title><![CDATA[Döngü içerisinde chart oluşturma : Merhaba G&#246;k&#231;e,A&#351;a&#287;&#305;da ki kodu...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1213&amp;PID=2619#2619</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=257">Emr.Erkmn</a><br /><strong>Konu:</strong> 1213<br /><strong>Gönderim Zamanı:</strong> 30&nbsp;Ekim&nbsp;2025 Saat 09:10<br /><br />Merhaba Gökçe,&nbsp;<br>Aşağıda ki kodu inceleyebilir misin?&nbsp;<br><div>//Seçilen yılın aylık aktif müşteri sayısının grafiği</div><div>void OlusturAylikChart</div><div>&nbsp; var&nbsp;</div><div>&nbsp; secilenYil : String;</div><div>&nbsp; Qry : TclSQLQuery;</div><div>&nbsp; LblAylik : TClProLabel;</div><div>{</div><div>&nbsp; try</div><div>&nbsp; {</div><div>&nbsp; &nbsp; secilenYil = cbZamanMusteri.Items&#091;cbZamanMusteri.ItemIndex&#093;;</div><div><br></div><div>&nbsp; &nbsp; Qry = Clomosy.DBSQLServerQueryWith(</div><div>&nbsp; &nbsp; &nbsp; 'SELECT FORMAT(OrderDate, ''MM'') AS Zaman, ' +</div><div>&nbsp; &nbsp; &nbsp; 'COUNT(DISTINCT CustomerId) AS AktifMusteri ' +</div><div>&nbsp; &nbsp; &nbsp; 'FROM Orders ' +</div><div>&nbsp; &nbsp; &nbsp; 'WHERE YEAR(OrderDate) = ' + secilenYil + ' ' +</div><div>&nbsp; &nbsp; &nbsp; 'GROUP BY FORMAT(OrderDate, ''MM'') ' +</div><div>&nbsp; &nbsp; &nbsp; 'ORDER BY Zaman'</div><div>&nbsp; &nbsp; );</div><div><br></div><div>&nbsp; &nbsp; Qry.Open;</div><div><br></div><div>&nbsp; &nbsp; if not Qry.IsEmpty</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart = MyForm.AddNewChart(PnlZamanMusteriChart, 'zamanMusteriAyChart', '');</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.Margins.Left = 5;</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.Margins.Right = 5;</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.Margins.Bottom = 5;</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.Align = alClient;</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.Charttype = clCLine;</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.XAxisText = 'Zaman';</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.ChartItemText = 'Müşteri';</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.ChartItemsValue = 'AktifMusteri';</div><div>&nbsp; &nbsp; &nbsp; zamanMusteriAyChart.clLoadDataFromDataSet(Qry);</div><div>&nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; LblAylik = MyForm.AddNewProLabel(zamanMusteriAyChart, 'LblAylik', secilenYil + ' Yılı Aylık Aktif Müşteri Sayısı');</div><div>&nbsp; &nbsp; &nbsp; LblAylik.Align = alTop;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.Height = 30;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.Width = 350;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.FontHorzAlign = palcenter;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.Margins.Bottom = 4;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.FontSize = 18;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.TextSettings.Font.Style = &#091;fsBold&#093;;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.FontColor = clAlphaColor.clHexToColor('#ffffff');</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.BackgroundColor = clAlphaColor.clHexToColor(renk_P1G1);</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.BorderColor = clAlphaColor.clHexToColor(renk_P1G1);</div><div>&nbsp; &nbsp; &nbsp; LblAylik.clProSettings.BorderWidth = 2;</div><div>&nbsp; &nbsp; &nbsp; LblAylik.SetclProSettings(LblAylik.clProSettings);</div><div><br></div><div>&nbsp; &nbsp; &nbsp; clRTMethod(LblAylik,'BringTofront');</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }</div><div>&nbsp; except</div><div>&nbsp; &nbsp; ShowMessage('Aylık Chart hatası: ' + LastExceptionMessage);</div><div>&nbsp; }</div><div>&nbsp; Qry.Free;</div><div>}</div>]]>
   </description>
   <pubDate>Thu, 30 Oct 2025 09:10:30 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1213&amp;PID=2619#2619</guid>
  </item> 
  <item>
   <title><![CDATA[Döngü içerisinde chart oluşturma : function AddDataToChart(SelectedYear:String):String;...]]></title>
   <link>https://forum.clomosy.com.tr/forum_posts.asp?TID=1213&amp;PID=2618#2618</link>
   <description>
    <![CDATA[<strong>Yazar:</strong> <a href="https://forum.clomosy.com.tr/member_profile.asp?PF=346">Gökçe ulusoy</a><br /><strong>Konu:</strong> 1213<br /><strong>Gönderim Zamanı:</strong> 24&nbsp;Ekim&nbsp;2025 Saat 11:23<br /><br /><div>function AddDataToChart(SelectedYear:String):String;&nbsp; &nbsp;&nbsp;</div><div>&nbsp;{</div><div>&nbsp; &nbsp; try</div><div>&nbsp; &nbsp; &nbsp; Clomosy.DBSQLServerQuery.SQL.Text=</div><div>&nbsp; &nbsp; &nbsp; 'SELECT SUM(Quantity) AS SALES,&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; YEAR(OrderDate) AS YEAR,&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; MONTH(OrderDate) AS AY&nbsp;&nbsp;</div><div>&nbsp; &nbsp; &nbsp; FROM Orders&nbsp;</div><div>&nbsp; &nbsp; &nbsp; WHERE YEAR(OrderDate) = :SelectedYear</div><div>&nbsp; &nbsp; &nbsp; GROUP BY YEAR(OrderDate), MONTH(OrderDate)&nbsp;</div><div>&nbsp; &nbsp; &nbsp; ORDER BY MONTH(OrderDate)';</div><div><br></div><div>&nbsp; &nbsp; &nbsp; Clomosy.DBSQLServerQuery.ParamByName('SelectedYear').Value = SelectedYear;</div><div>&nbsp; &nbsp; &nbsp; Clomosy.DBSQLServerQuery.ExecSQL;</div><div>&nbsp; &nbsp; &nbsp; Clomosy.DBSQLServerQuery.Connection.Commit;</div><div><br></div><div>&nbsp; &nbsp; &nbsp; if (not Clomosy.DBSQLServerQuery.Found)</div><div>&nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; FOR (i=0 to Length(j))</div><div>&nbsp; &nbsp; &nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; //Chart1<em>=TCLChart.Create(self);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1=Form2.AddNewChart(ChartPanel, Chart1, 'Aylık Sipariş');</div><div>&nbsp; &nbsp; &nbsp; &nbsp; //Chart1.Parent=ChartPanel;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.Width = 75;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.Height = 275;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.Align = alBottom;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.Margins.Bottom = 5;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.Margins.Left = 10;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.Margins.Right = 10;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.ChartType = clCBar;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.XAxisText = 'AY';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.ChartItemText = 'YEAR'; // SQL'deki alias'ı</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.ChartItemsValue = 'SALES';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.ChartTitle = 'Aylık Satış Grafiği';</div><div>&nbsp; &nbsp; &nbsp; &nbsp; Chart1.clLoadDataFromDataSet(Clomosy.DBSQLServerQuery);</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; }</div><div>&nbsp; &nbsp; &nbsp; else</div><div>&nbsp; &nbsp; &nbsp; &nbsp; ShowMessage('Bu yıla ait veri bulunamadı.');</div><div>&nbsp; &nbsp; except</div><div>&nbsp; &nbsp; &nbsp; ShowMessage('Exception class: '+LastExceptionClassName+' Exception Message: ' +LastExceptionMessage);</div><div>&nbsp; &nbsp; }</div><div>&nbsp; }&nbsp;&nbsp;</div><div><br></div><div><br></div><div>void LoadtoCombo</div><div>&nbsp;{</div><div>&nbsp; &nbsp;try</div><div>&nbsp; &nbsp; &nbsp;Clomosy.DBSQLServerQuery.Sql.Text=('SELECT DISTINCT(Year(OrderDate)) AS YEAR&nbsp; FROM Orders');</div><div>&nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp;Clomosy.DBSQLServerQuery.Open;</div><div>&nbsp; &nbsp; &nbsp;j=0;</div><div>&nbsp; &nbsp; &nbsp;while (not Clomosy.DBSQLServerQuery.Eof)</div><div>&nbsp; &nbsp; &nbsp;{</div><div>&nbsp; &nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;ComboBox.AddItem(Clomosy.DBSQLServerQuery.FieldByName('YEAR').AsString,IntToStr(j));</div><div>&nbsp; &nbsp; &nbsp; &nbsp;Clomosy.DBSQLServerQuery.Next;</div><div>&nbsp; &nbsp; &nbsp; &nbsp;ShowMessage(IntToStr(j));</div><div>&nbsp; &nbsp; &nbsp; &nbsp;j=j+1;</div><div>&nbsp; &nbsp; &nbsp;}</div><div>&nbsp; &nbsp; &nbsp;</div><div>&nbsp; &nbsp;finally</div><div>&nbsp; &nbsp; &nbsp;Clomosy.DBSQLServerQuery.Close;</div><div>&nbsp; &nbsp;}</div><div>}&nbsp;&nbsp;</div><div>&nbsp;</div><div><br></div><div>void ComboChange</div><div>{&nbsp;</div><div><br></div><div>&nbsp; if (ComboBox.ItemIndex &gt; -1)&nbsp;</div><div>&nbsp; {</div><div>&nbsp; &nbsp; SelectedYear = StrToInt(ComboBox.Items&#091;ComboBox.ItemIndex&#093;);</div><div>&nbsp; &nbsp; AddDataToChart(SelectedYear);</div><div>&nbsp; }</div><div>}</div><div><br></div><div>void ComboChanged</div><div>{&nbsp;</div><div>&nbsp; if (ComboBox.ItemIndex &gt; -1)&nbsp;</div><div>&nbsp; {</div><div>&nbsp; &nbsp; Chart1.Series.Clear;</div><div>&nbsp; &nbsp; SelectedYear = StrToInt(ComboBox.Items&#091;ComboBox.ItemIndex&#093;);</div><div>&nbsp; &nbsp; AddDataToChart(SelectedYear);</div><div>&nbsp; }</div><div>}&nbsp;</div><div>LoadtoCombo;</div><div>ComboChange;</div><div>ComboBox.OnChange = 'ComboChanged';</div><div><br></div><div>Merhabalar Yıllara göre aylık satış miktarının gelmesini istiyorum ama chartı yenileyemediğimden ötürü sadece bir kere oluşuyor her combobox değer değiştiginde o değere göre chart gelmesini nasıl sağlayabilirim.</div>]]>
   </description>
   <pubDate>Fri, 24 Oct 2025 11:23:03 +0000</pubDate>
   <guid isPermaLink="true">https://forum.clomosy.com.tr/forum_posts.asp?TID=1213&amp;PID=2618#2618</guid>
  </item> 
 </channel>
</rss>