MemberChart.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565
  1. // MemberChart.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "MemberChart.h"
  6. #include "MyMdi.H"
  7. #include "VcPlot.h"
  8. #include "VcAxis.h"
  9. #include "VcValueScale.h"
  10. #include "VcSeriesCollection.h"
  11. #include "VcSeries.h"
  12. #include "VcPen.h"
  13. #include "VcCategoryScale.h"
  14. #include "VcColor.h"
  15. #include "VcDataGrid.h"
  16. #include "VcBackdrop.h"
  17. #include "VcFill.h"
  18. #include "VcBrush.h"
  19. #include "VcDataPoints.h"
  20. #include "VcDataPoint.h"
  21. #include "VcDataPointLabel.h"
  22. #include "VcAxisTitle.h"
  23. #ifdef _DEBUG
  24. #define new DEBUG_NEW
  25. #undef THIS_FILE
  26. static char THIS_FILE[] = __FILE__;
  27. #endif
  28. /////////////////////////////////////////////////////////////////////////////
  29. // MemberChart
  30. IMPLEMENT_DYNCREATE(MemberChart, MyFormView)
  31. MemberChart::MemberChart()
  32. : MyFormView(MemberChart::IDD)
  33. {
  34. //{{AFX_DATA_INIT(MemberChart)
  35. m_year = atoi(g_date.Mid (0,4));
  36. m_month = atoi(g_date.Mid (5,2));
  37. m_day = atoi(g_date.Mid (8,2));
  38. m_radio1 = 1;
  39. m_bInit=0;
  40. m_radio2 = 0;
  41. //}}AFX_DATA_INIT
  42. }
  43. MemberChart::~MemberChart()
  44. {
  45. }
  46. void MemberChart::DoDataExchange(CDataExchange* pDX)
  47. {
  48. MyFormView::DoDataExchange(pDX);
  49. //{{AFX_DATA_MAP(MemberChart)
  50. DDX_Control(pDX, IDC_SPIN3, m_spinday);
  51. DDX_Control(pDX, IDC_SPIN2, m_spinmonth);
  52. DDX_Control(pDX, IDC_SPIN1, m_spinyear);
  53. DDX_Control(pDX, IDC_STATIC1, m_static1);
  54. DDX_Text(pDX, IDC_EDITyear, m_year);
  55. DDV_MinMaxUInt(pDX, m_year, 1900, 3000);
  56. DDX_Text(pDX, IDC_EDITmonth, m_month);
  57. DDV_MinMaxUInt(pDX, m_month, 1, 12);
  58. DDX_Text(pDX, IDC_EDITday, m_day);
  59. DDV_MinMaxUInt(pDX, m_day, 1, 31);
  60. DDX_Control(pDX, IDC_MSCHART2, m_Chart2);
  61. DDX_Radio(pDX, IDC_RADIO3, m_radio1);
  62. DDX_Radio(pDX, IDC_RADIO6, m_radio2);
  63. //}}AFX_DATA_MAP
  64. }
  65. BEGIN_MESSAGE_MAP(MemberChart, MyFormView)
  66. //{{AFX_MSG_MAP(MemberChart)
  67. ON_BN_CLICKED(IDC_BUTclose, OnBUTclose)
  68. ON_EN_CHANGE(IDC_EDITyear, OnChangeEDITyear)
  69. ON_EN_CHANGE(IDC_EDITmonth, OnChangeEDITmonth)
  70. ON_EN_CHANGE(IDC_EDITday, OnChangeEDITday)
  71. ON_BN_CLICKED(IDC_RADIO3, OnRadio3)
  72. ON_BN_CLICKED(IDC_RADIO4, OnRadio4)
  73. ON_BN_CLICKED(IDC_RADIO5, OnRadio5)
  74. ON_BN_CLICKED(IDC_RADIO6, OnRadio6)
  75. ON_BN_CLICKED(IDC_RADIO7, OnRadio7)
  76. ON_BN_CLICKED(IDC_RADIO8, OnRadio8)
  77. ON_BN_CLICKED(IDC_RADIO10, OnRadio10)
  78. ON_BN_CLICKED(IDC_RADIO11, OnRadio11)
  79. //}}AFX_MSG_MAP
  80. END_MESSAGE_MAP()
  81. /////////////////////////////////////////////////////////////////////////////
  82. // MemberChart diagnostics
  83. #ifdef _DEBUG
  84. void MemberChart::AssertValid() const
  85. {
  86. MyFormView::AssertValid();
  87. }
  88. void MemberChart::Dump(CDumpContext& dc) const
  89. {
  90. MyFormView::Dump(dc);
  91. }
  92. #endif //_DEBUG
  93. /////////////////////////////////////////////////////////////////////////////
  94. // MemberChart message handlers
  95. void MemberChart::OnInitialUpdate()
  96. {
  97. MyFormView::OnInitialUpdate();
  98. // TODO: Add your specialized code here and/or call the base class
  99. CMyMdi Mdi;
  100. Mdi.SetSubView((CWnd*)GetParent(), (CWnd*)this);
  101. // Here we create the outbar control using the splitter as its parent
  102. // and setting its id to the first pane.
  103. CRect rc2;
  104. GetWindowRect(rc2);
  105. ::MoveWindow(m_hWnd,g_rc.left,g_rc.top,g_rc.Width(),g_rc.Height(),TRUE);
  106. EnumChildWindows(m_hWnd,(WNDENUMPROC)EnumChildProc,0);
  107. m_static1.SetFont (&g_titlefont);
  108. m_spinyear.SetRange (1900, 3000);
  109. m_spinmonth.SetRange (1, 12);
  110. m_spinday.SetRange (1, 31);
  111. VARIANT var;
  112. m_Chart2.GetBackdrop().GetFill().SetStyle(1);
  113. m_Chart2.GetBackdrop().GetFill().GetBrush().GetFillColor().Set(255, 255, 255);
  114. m_Chart2.SetShowLegend(0);
  115. m_Chart2.SetChartType(3);
  116. // 栈模式
  117. m_Chart2.SetStacking(FALSE);
  118. m_Chart2.GetPlot().GetAxis(1,var).GetValueScale().SetAuto(1); // 不自动标注Y轴刻度
  119. m_Chart2.GetPlot().GetAxis(0,var).GetCategoryScale().SetAuto(0); // 不自动标注X轴刻度
  120. m_Chart2.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerLabel(1);// 每刻度一个标注
  121. m_Chart2.GetPlot().GetAxis(0,var).GetCategoryScale().SetDivisionsPerTick(1); // 每刻度一个刻度线
  122. m_Chart2.SetColumnCount(1);
  123. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(255, 0, 0);
  124. // 线宽(对点线图有效)
  125. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetPen().SetWidth(30);
  126. // 数据点类型显示数据值的模式(对柱柱状图和点线图有效)
  127. // 0: 不显示 1: 显示在柱状图外
  128. // 2: 显示在柱状图内上方 3: 显示在柱状图内中间 4: 显示在柱状图内下方
  129. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  130. ///////////////////////////
  131. GetDlgItem(IDC_STATIC3)->GetWindowRect(rc2);
  132. ScreenToClient(rc2);
  133. m_Chart2.MoveWindow (rc2);
  134. m_Chart2.SetChartType(1);
  135. m_bInit=1;
  136. DateChange();
  137. }
  138. void MemberChart::OnBUTclose()
  139. {
  140. // TODO: Add your control notification handler code here
  141. GetParent()->SendMessage(WM_CLOSE);
  142. }
  143. void MemberChart::OnChangeEDITyear()
  144. {
  145. // TODO: If this is a RICHEDIT control, the control will not
  146. // send this notification unless you override the MyFormView::OnInitDialog()
  147. // function and call CRichEditCtrl().SetEventMask()
  148. // with the ENM_CHANGE flag ORed into the mask.
  149. DateChange();
  150. // TODO: Add your control notification handler code here
  151. }
  152. void MemberChart::OnChangeEDITmonth()
  153. {
  154. // TODO: If this is a RICHEDIT control, the control will not
  155. // send this notification unless you override the MyFormView::OnInitDialog()
  156. // function and call CRichEditCtrl().SetEventMask()
  157. // with the ENM_CHANGE flag ORed into the mask.
  158. // DateChange();
  159. // TODO: Add your control notification handler code here
  160. }
  161. void MemberChart::OnChangeEDITday()
  162. {
  163. // TODO: If this is a RICHEDIT control, the control will not
  164. // send this notification unless you override the MyFormView::OnInitDialog()
  165. // function and call CRichEditCtrl().SetEventMask()
  166. // with the ENM_CHANGE flag ORed into the mask.
  167. // DateChange();
  168. // TODO: Add your control notification handler code here
  169. }
  170. void MemberChart::DateChange()
  171. {
  172. if(m_bInit==0)return;
  173. m_spinyear.EnableWindow(0);
  174. m_spinmonth.EnableWindow(0);
  175. m_spinday.EnableWindow(0);
  176. UpdateData();
  177. g_sendhead.bsql=0;
  178. g_sendhead.tabcount=1;
  179. CString filter;
  180. filter.Format ("[date]>='%d-01-01' and [date]<='%d-12-31'", m_year, m_year);
  181. if(m_radio2==0)
  182. g_sendhead.code[0]=68;
  183. else if(m_radio2==1 || m_radio2==2)
  184. {
  185. g_sendhead.code[0]=129;
  186. filter.Format ("%04d", m_year);
  187. }
  188. else if(m_radio2==3)
  189. g_sendhead.code[0]=164;
  190. else if(m_radio2==4)
  191. {
  192. g_sendhead.code[0]=165;
  193. g_sendhead.code[1]=166;
  194. g_sendhead.code[2]=162;
  195. filter.Format ("[date]<='%d-12-31'; [date]<='%d-12-31'; [date]<='%d-12-31'", m_year, m_year, m_year);
  196. /* filter.Format ("[date]>='%d-01-01' and [date]<='%d-12-31';[date]>='%d-01-01' and [date]<='%d-12-31';[date]>='%d-01-01' and [date]<='%d-12-31'", m_year, m_year, m_year, m_year, m_year, m_year);
  197. */
  198. g_sendhead.tabcount=3;
  199. }
  200. CString strdate;
  201. strdate.Format ("%d", m_year);
  202. if(m_radio2==0)
  203. m_static1.SetWindowText ("发放金卡图表");
  204. else if(m_radio2==1)
  205. m_static1.SetWindowText ("发出/收回副卡图表");
  206. else if(m_radio2==2)
  207. m_static1.SetWindowText ("副卡积分图表");
  208. else if(m_radio2==3)
  209. m_static1.SetWindowText ("发放现金子卡图表");
  210. else if(m_radio2==4)
  211. m_static1.SetWindowText ("现金卡消费图表");
  212. g_pMainWnd->ProcessChatMessageRequest2(filter);
  213. if(g_bSendOK==0)
  214. {
  215. m_spinyear.EnableWindow(1);
  216. m_spinmonth.EnableWindow(1);
  217. m_spinday.EnableWindow(1);
  218. return;
  219. }
  220. if(m_radio2==4)
  221. {
  222. CArray<CStringArray, CStringArray>List2array;
  223. CArray<CStringArray, CStringArray>List3array;
  224. DataToArray(&List2array, &List3array, &m_List2array);
  225. CString begindate;
  226. m_array3.RemoveAll ();
  227. for(int i=0; i<12; i++)
  228. {
  229. int charge=0;
  230. begindate.Format ("%d-%02d-31", m_year, i+1);
  231. for(int j=0; j<m_List2array.GetSize (); j++)
  232. {
  233. if(m_List2array.ElementAt (j).ElementAt (4)<=begindate)
  234. {
  235. charge+=atoi(m_List2array.ElementAt (j).ElementAt (2));
  236. charge+=atoi(m_List2array.ElementAt (j).ElementAt (3));
  237. }
  238. }
  239. int used=0;
  240. for( j=0; j<List2array.GetSize (); j++)
  241. {
  242. if(List2array.ElementAt (j).ElementAt (2).Find ("注销子卡")!=-1)continue;
  243. if(List2array.ElementAt (j).ElementAt (4)<=begindate)
  244. used+=atoi(List2array.ElementAt (j).ElementAt (3));
  245. }
  246. for( j=0; j<List3array.GetSize (); j++)
  247. {
  248. if(List3array.ElementAt (j).ElementAt (4)<=begindate)
  249. used+=atoi(List3array.ElementAt (j).ElementAt (3));
  250. }
  251. m_array3.Add (charge-used);
  252. }
  253. begindate.Format ("%d-01-01", m_year);
  254. m_List1array.RemoveAll ();
  255. m_List1array.SetSize(List2array.GetSize ()+List3array.GetSize (), 1);
  256. int size=0;
  257. for( i=0; i<List2array.GetSize (); i++)
  258. {
  259. if(List2array.ElementAt (i).ElementAt (2).Find ("注销子卡")!=-1)continue;
  260. if(List2array.ElementAt (i).ElementAt (4)<begindate)continue;
  261. m_List1array.ElementAt (size).Add (List2array.ElementAt (i).ElementAt (4));
  262. m_List1array.ElementAt (size).Add (List2array.ElementAt (i).ElementAt (3));
  263. size++;
  264. }
  265. for( i=0; i<List3array.GetSize (); i++)
  266. {
  267. if(List3array.ElementAt (i).ElementAt (4)<begindate)continue;
  268. m_List1array.ElementAt (size).Add (List3array.ElementAt (i).ElementAt (4));
  269. m_List1array.ElementAt (size).Add (List3array.ElementAt (i).ElementAt (3));
  270. size++;
  271. }
  272. m_List1array.SetSize(size, 1);
  273. }
  274. else
  275. DataToArray(&m_List1array);
  276. KindChange();
  277. m_spinyear.EnableWindow(1);
  278. m_spinmonth.EnableWindow(1);
  279. m_spinday.EnableWindow(1);
  280. }
  281. void MemberChart::KindChange()
  282. {
  283. int i=0;
  284. int npoint[12]={0};
  285. int npoint2[12]={0};
  286. CString stryear[12]={"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
  287. int monthpos=0;
  288. if(m_radio2==0)
  289. monthpos=10;
  290. else if(m_radio2==3)
  291. monthpos=3;
  292. if(m_radio2==4)
  293. {
  294. for( i=0; i<m_List1array.GetSize (); i++)
  295. {
  296. npoint[atoi(m_List1array.ElementAt (i).ElementAt (0).Mid (5, 2))-1]+=atoi(m_List1array.ElementAt (i).ElementAt (1));
  297. }
  298. CString begindate;
  299. begindate.Format ("%d-01-01", m_year);
  300. for( i=0; i<m_List2array.GetSize (); i++)
  301. {
  302. if(m_List2array.ElementAt (i).ElementAt (4)<begindate)continue;
  303. npoint2[atoi(m_List2array.ElementAt (i).ElementAt (4).Mid (5, 2))-1]+=atoi(m_List2array.ElementAt (i).ElementAt (2))+atoi(m_List2array.ElementAt (i).ElementAt (3));
  304. }
  305. }
  306. else if(m_radio2==1)
  307. {
  308. for( i=0; i<m_List1array.GetSize (); i++)
  309. {
  310. if(m_List1array.ElementAt (i).ElementAt (9)!="")
  311. {
  312. npoint2[atoi(m_List1array.ElementAt (i).ElementAt (5).Mid (5, 2))-1]+=1;
  313. }
  314. npoint[atoi(m_List1array.ElementAt (i).ElementAt (5).Mid (5, 2))-1]+=1;
  315. }
  316. }
  317. else if(m_radio2==2)
  318. {
  319. for( i=0; i<m_List1array.GetSize (); i++)
  320. {
  321. if(m_List1array.ElementAt (i).ElementAt (9)!="")
  322. {
  323. npoint[atoi(m_List1array.ElementAt (i).ElementAt (5).Mid (5, 2))-1]+=atoi(m_List1array.ElementAt (i).ElementAt (8));
  324. }
  325. }
  326. }
  327. else
  328. {
  329. for( i=0; i<m_List1array.GetSize (); i++)
  330. {
  331. npoint[atoi(m_List1array.ElementAt (i).ElementAt (monthpos).Mid (5, 2))-1]+=1;
  332. }
  333. }
  334. int nRowCount=12;// VARIANT var;
  335. m_Chart2.SetRowCount(nRowCount);
  336. for(int row = 1; row <= nRowCount; ++row)
  337. {
  338. m_Chart2.SetRow(row);
  339. m_Chart2.SetRowLabel(stryear[row-1]);
  340. if(m_radio2==1)
  341. {
  342. m_Chart2.GetDataGrid().SetData(row, 1, npoint[row-1], 0);
  343. m_Chart2.GetDataGrid().SetData(row, 2, npoint2[row-1], 0);
  344. }
  345. else if(m_radio2==4)
  346. {
  347. m_Chart2.GetDataGrid().SetData(row, 1, npoint[row-1], 0);
  348. m_Chart2.GetDataGrid().SetData(row, 2, npoint2[row-1], 0);
  349. m_Chart2.GetDataGrid().SetData(row, 3, m_array3.ElementAt (row-1), 0);
  350. }
  351. else
  352. m_Chart2.GetDataGrid().SetData(row, 1, npoint[row-1], 0);
  353. }
  354. m_Chart2.Refresh();
  355. }
  356. BOOL MemberChart::PreTranslateMessage(MSG* pMsg)
  357. {
  358. // TODO: Add your specialized code here and/or call the base class
  359. try
  360. {
  361. if(pMsg->message==WM_KEYDOWN)
  362. {
  363. switch (pMsg->wParam)
  364. {
  365. case VK_RETURN:
  366. return 1;
  367. case 0x43: // copy
  368. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  369. {
  370. GetFocus()->SendMessage(WM_COPY);
  371. return TRUE;
  372. }
  373. break;
  374. case 0x56: //Ctrl + V:
  375. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  376. {
  377. GetFocus()->SendMessage(WM_PASTE);
  378. return TRUE;
  379. }
  380. break;
  381. case 0x58: // cut
  382. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  383. {
  384. GetFocus()->SendMessage(WM_CUT);
  385. return TRUE;
  386. }
  387. break;
  388. case 0x5A: //undo
  389. case 0x59: //redo
  390. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  391. {
  392. GetFocus()->SendMessage(WM_UNDO);
  393. return TRUE;
  394. }
  395. break;
  396. }
  397. }
  398. return MyFormView::PreTranslateMessage(pMsg);
  399. }
  400. catch(...)
  401. {
  402. }
  403. }
  404. void MemberChart::OnRadio3()
  405. {
  406. // TODO: Add your control notification handler code here
  407. UpdateData();
  408. if(m_radio1==0)
  409. {
  410. m_Chart2.SetChartType(3);
  411. }
  412. else if(m_radio1==1)
  413. {
  414. m_Chart2.SetChartType(1);
  415. }
  416. else if(m_radio1==2)
  417. {
  418. m_Chart2.SetChartType(14);
  419. }
  420. }
  421. void MemberChart::OnRadio4()
  422. {
  423. // TODO: Add your control notification handler code here
  424. OnRadio3();
  425. }
  426. void MemberChart::OnRadio5()
  427. {
  428. // TODO: Add your control notification handler code here
  429. OnRadio3();
  430. }
  431. void MemberChart::OnRadio6()
  432. {
  433. // TODO: Add your control notification handler code here
  434. m_Chart2.SetColumnCount(1); m_Chart2.SetShowLegend(0);
  435. DateChange();
  436. }
  437. void MemberChart::OnRadio7()
  438. {
  439. // TODO: Add your control notification handler code here
  440. m_Chart2.SetShowLegend(TRUE);
  441. m_Chart2.SetColumnCount(2);
  442. m_Chart2.SetColumn(1);
  443. m_Chart2.SetColumnLabel((LPCTSTR)"发放");
  444. m_Chart2.SetColumn(2);
  445. m_Chart2.SetColumnLabel((LPCTSTR)"收回");
  446. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(255, 0, 0);
  447. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(0, 255, 0);
  448. // 线宽(对点线图有效)
  449. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetPen().SetWidth(30);
  450. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetPen().SetWidth(30);
  451. // 数据点类型显示数据值的模式(对柱柱状图和点线图有效)
  452. // 0: 不显示 1: 显示在柱状图外
  453. // 2: 显示在柱状图内上方 3: 显示在柱状图内中间 4: 显示在柱状图内下方
  454. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  455. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  456. //////////////////////
  457. DateChange();
  458. }
  459. void MemberChart::OnRadio8()
  460. {
  461. // TODO: Add your control notification handler code here
  462. m_Chart2.SetColumnCount(1); m_Chart2.SetShowLegend(0);
  463. DateChange();
  464. }
  465. void MemberChart::OnRadio10()
  466. {
  467. // TODO: Add your control notification handler code here
  468. m_Chart2.SetColumnCount(1); m_Chart2.SetShowLegend(0);
  469. DateChange();
  470. }
  471. void MemberChart::OnRadio11()
  472. {
  473. // TODO: Add your control notification handler code here
  474. m_Chart2.SetShowLegend(TRUE);
  475. m_Chart2.SetColumnCount(3);
  476. m_Chart2.SetColumn(1);
  477. m_Chart2.SetColumnLabel((LPCTSTR)"消费");
  478. m_Chart2.SetColumn(2);
  479. m_Chart2.SetColumnLabel((LPCTSTR)"充值");
  480. m_Chart2.SetColumn(3);
  481. m_Chart2.SetColumnLabel((LPCTSTR)"余额");
  482. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(255, 0, 0);
  483. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(0, 255, 0);
  484. m_Chart2.GetPlot().GetSeriesCollection().GetItem(3).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(0, 0, 255);
  485. // 线宽(对点线图有效)
  486. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetPen().SetWidth(30);
  487. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetPen().SetWidth(30);
  488. m_Chart2.GetPlot().GetSeriesCollection().GetItem(3).GetPen().SetWidth(30);
  489. // 数据点类型显示数据值的模式(对柱柱状图和点线图有效)
  490. // 0: 不显示 1: 显示在柱状图外
  491. // 2: 显示在柱状图内上方 3: 显示在柱状图内中间 4: 显示在柱状图内下方
  492. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  493. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  494. m_Chart2.GetPlot().GetSeriesCollection().GetItem(3).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  495. //////////////////////
  496. DateChange();
  497. }