MemberChart.cpp 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560
  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. int i = 0;
  178. g_sendhead.bsql=0;
  179. g_sendhead.tabcount=1;
  180. CString filter;
  181. filter.Format ("[date]>='%d-01-01' and [date]<='%d-12-31'", m_year, m_year);
  182. if(m_radio2==0)
  183. g_sendhead.code[0]=68;
  184. else if(m_radio2==1 || m_radio2==2)
  185. {
  186. g_sendhead.code[0]=129;
  187. filter.Format ("%04d", m_year);
  188. }
  189. else if(m_radio2==3)
  190. g_sendhead.code[0]=164;
  191. else if(m_radio2==4)
  192. {
  193. g_sendhead.code[0]=165;
  194. g_sendhead.code[1]=166;
  195. g_sendhead.code[2]=162;
  196. filter.Format ("[date]<='%d-12-31'; [date]<='%d-12-31'; [date]<='%d-12-31'", m_year, m_year, m_year);
  197. /* 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);
  198. */
  199. g_sendhead.tabcount=3;
  200. }
  201. CString strdate;
  202. strdate.Format ("%d", m_year);
  203. if(m_radio2==0)
  204. m_static1.SetWindowText ("发放金卡图表");
  205. else if(m_radio2==1)
  206. m_static1.SetWindowText ("发出/收回副卡图表");
  207. else if(m_radio2==2)
  208. m_static1.SetWindowText ("副卡积分图表");
  209. else if(m_radio2==3)
  210. m_static1.SetWindowText ("发放现金子卡图表");
  211. else if(m_radio2==4)
  212. m_static1.SetWindowText ("现金卡消费图表");
  213. g_pMainWnd->ProcessChatMessageRequest2(filter);
  214. if(g_bSendOK==0)
  215. {
  216. m_spinyear.EnableWindow(1);
  217. m_spinmonth.EnableWindow(1);
  218. m_spinday.EnableWindow(1);
  219. return;
  220. }
  221. if(m_radio2==4)
  222. {
  223. CArray<CStringArray, CStringArray>List2array;
  224. CArray<CStringArray, CStringArray>List3array;
  225. DataToArray(&List2array, &List3array, &m_List2array);
  226. CString begindate;
  227. m_array3.RemoveAll ();
  228. for( i=0; i<12; i++)
  229. {
  230. int j = 0;
  231. int charge=0;
  232. begindate.Format ("%d-%02d-31", m_year, i+1);
  233. for( j=0; j<m_List2array.GetSize (); j++)
  234. {
  235. if(m_List2array.ElementAt (j).ElementAt (4)<=begindate)
  236. {
  237. charge+=atoi(m_List2array.ElementAt (j).ElementAt (2));
  238. charge+=atoi(m_List2array.ElementAt (j).ElementAt (3));
  239. }
  240. }
  241. int used=0;
  242. for( j=0; j<List2array.GetSize (); j++)
  243. {
  244. if(List2array.ElementAt (j).ElementAt (2).Find ("注销子卡")!=-1)continue;
  245. if(List2array.ElementAt (j).ElementAt (4)<=begindate)
  246. used+=atoi(List2array.ElementAt (j).ElementAt (3));
  247. }
  248. for( j=0; j<List3array.GetSize (); j++)
  249. {
  250. if(List3array.ElementAt (j).ElementAt (4)<=begindate)
  251. used+=atoi(List3array.ElementAt (j).ElementAt (3));
  252. }
  253. m_array3.Add (charge-used);
  254. }
  255. begindate.Format ("%d-01-01", m_year);
  256. m_List1array.RemoveAll ();
  257. m_List1array.SetSize(List2array.GetSize ()+List3array.GetSize (), 1);
  258. int size=0;
  259. for( i=0; i<List2array.GetSize (); i++)
  260. {
  261. if(List2array.ElementAt (i).ElementAt (2).Find ("注销子卡")!=-1)continue;
  262. if(List2array.ElementAt (i).ElementAt (4)<begindate)continue;
  263. m_List1array.ElementAt (size).Add (List2array.ElementAt (i).ElementAt (4));
  264. m_List1array.ElementAt (size).Add (List2array.ElementAt (i).ElementAt (3));
  265. size++;
  266. }
  267. for( i=0; i<List3array.GetSize (); i++)
  268. {
  269. if(List3array.ElementAt (i).ElementAt (4)<begindate)continue;
  270. m_List1array.ElementAt (size).Add (List3array.ElementAt (i).ElementAt (4));
  271. m_List1array.ElementAt (size).Add (List3array.ElementAt (i).ElementAt (3));
  272. size++;
  273. }
  274. m_List1array.SetSize(size, 1);
  275. }
  276. else
  277. DataToArray(&m_List1array);
  278. KindChange();
  279. m_spinyear.EnableWindow(1);
  280. m_spinmonth.EnableWindow(1);
  281. m_spinday.EnableWindow(1);
  282. }
  283. void MemberChart::KindChange()
  284. {
  285. int i=0;
  286. int npoint[12]={0};
  287. int npoint2[12]={0};
  288. CString stryear[12]={"1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"};
  289. int monthpos=0;
  290. if(m_radio2==0)
  291. monthpos=10;
  292. else if(m_radio2==3)
  293. monthpos=3;
  294. if(m_radio2==4)
  295. {
  296. for( i=0; i<m_List1array.GetSize (); i++)
  297. {
  298. npoint[atoi(m_List1array.ElementAt (i).ElementAt (0).Mid (5, 2))-1]+=atoi(m_List1array.ElementAt (i).ElementAt (1));
  299. }
  300. CString begindate;
  301. begindate.Format ("%d-01-01", m_year);
  302. for( i=0; i<m_List2array.GetSize (); i++)
  303. {
  304. if(m_List2array.ElementAt (i).ElementAt (4)<begindate)continue;
  305. 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));
  306. }
  307. }
  308. else if(m_radio2==1)
  309. {
  310. for( i=0; i<m_List1array.GetSize (); i++)
  311. {
  312. if(m_List1array.ElementAt (i).ElementAt (9)!="")
  313. {
  314. npoint2[atoi(m_List1array.ElementAt (i).ElementAt (5).Mid (5, 2))-1]+=1;
  315. }
  316. npoint[atoi(m_List1array.ElementAt (i).ElementAt (5).Mid (5, 2))-1]+=1;
  317. }
  318. }
  319. else if(m_radio2==2)
  320. {
  321. for( i=0; i<m_List1array.GetSize (); i++)
  322. {
  323. if(m_List1array.ElementAt (i).ElementAt (9)!="")
  324. {
  325. npoint[atoi(m_List1array.ElementAt (i).ElementAt (5).Mid (5, 2))-1]+=atoi(m_List1array.ElementAt (i).ElementAt (8));
  326. }
  327. }
  328. }
  329. else
  330. {
  331. for( i=0; i<m_List1array.GetSize (); i++)
  332. {
  333. npoint[atoi(m_List1array.ElementAt (i).ElementAt (monthpos).Mid (5, 2))-1]+=1;
  334. }
  335. }
  336. int nRowCount=12;// VARIANT var;
  337. m_Chart2.SetRowCount(nRowCount);
  338. for(int row = 1; row <= nRowCount; ++row)
  339. {
  340. m_Chart2.SetRow(row);
  341. m_Chart2.SetRowLabel(stryear[row-1]);
  342. if(m_radio2==1)
  343. {
  344. m_Chart2.GetDataGrid().SetData(row, 1, npoint[row-1], 0);
  345. m_Chart2.GetDataGrid().SetData(row, 2, npoint2[row-1], 0);
  346. }
  347. else if(m_radio2==4)
  348. {
  349. m_Chart2.GetDataGrid().SetData(row, 1, npoint[row-1], 0);
  350. m_Chart2.GetDataGrid().SetData(row, 2, npoint2[row-1], 0);
  351. m_Chart2.GetDataGrid().SetData(row, 3, m_array3.ElementAt (row-1), 0);
  352. }
  353. else
  354. m_Chart2.GetDataGrid().SetData(row, 1, npoint[row-1], 0);
  355. }
  356. m_Chart2.Refresh();
  357. }
  358. BOOL MemberChart::PreTranslateMessage(MSG* pMsg)
  359. {
  360. // TODO: Add your specialized code here and/or call the base class
  361. try
  362. {
  363. if(pMsg->message==WM_KEYDOWN)
  364. {
  365. switch (pMsg->wParam)
  366. {
  367. case VK_RETURN:
  368. return 1;
  369. case 0x43: // copy
  370. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  371. {
  372. GetFocus()->SendMessage(WM_COPY);
  373. return TRUE;
  374. }
  375. break;
  376. case 0x56: //Ctrl + V:
  377. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  378. {
  379. GetFocus()->SendMessage(WM_PASTE);
  380. return TRUE;
  381. }
  382. break;
  383. case 0x58: // cut
  384. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  385. {
  386. GetFocus()->SendMessage(WM_CUT);
  387. return TRUE;
  388. }
  389. break;
  390. case 0x5A: //undo
  391. case 0x59: //redo
  392. if ( ( GetKeyState( VK_CONTROL ) & 0x80 ) )
  393. {
  394. GetFocus()->SendMessage(WM_UNDO);
  395. return TRUE;
  396. }
  397. break;
  398. }
  399. }
  400. return MyFormView::PreTranslateMessage(pMsg);
  401. }
  402. catch(...)
  403. {
  404. }
  405. return true;
  406. }
  407. void MemberChart::OnRadio3()
  408. {
  409. // TODO: Add your control notification handler code here
  410. UpdateData();
  411. if(m_radio1==0)
  412. {
  413. m_Chart2.SetChartType(3);
  414. }
  415. else if(m_radio1==1)
  416. {
  417. m_Chart2.SetChartType(1);
  418. }
  419. else if(m_radio1==2)
  420. {
  421. m_Chart2.SetChartType(14);
  422. }
  423. }
  424. void MemberChart::OnRadio4()
  425. {
  426. // TODO: Add your control notification handler code here
  427. OnRadio3();
  428. }
  429. void MemberChart::OnRadio5()
  430. {
  431. // TODO: Add your control notification handler code here
  432. OnRadio3();
  433. }
  434. void MemberChart::OnRadio6()
  435. {
  436. // TODO: Add your control notification handler code here
  437. m_Chart2.SetColumnCount(1); m_Chart2.SetShowLegend(0);
  438. DateChange();
  439. }
  440. void MemberChart::OnRadio7()
  441. {
  442. // TODO: Add your control notification handler code here
  443. m_Chart2.SetShowLegend(TRUE);
  444. m_Chart2.SetColumnCount(2);
  445. m_Chart2.SetColumn(1);
  446. m_Chart2.SetColumnLabel((LPCTSTR)"发放");
  447. m_Chart2.SetColumn(2);
  448. m_Chart2.SetColumnLabel((LPCTSTR)"收回");
  449. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(255, 0, 0);
  450. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(0, 255, 0);
  451. // 线宽(对点线图有效)
  452. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetPen().SetWidth(30);
  453. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetPen().SetWidth(30);
  454. // 数据点类型显示数据值的模式(对柱柱状图和点线图有效)
  455. // 0: 不显示 1: 显示在柱状图外
  456. // 2: 显示在柱状图内上方 3: 显示在柱状图内中间 4: 显示在柱状图内下方
  457. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  458. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  459. //////////////////////
  460. DateChange();
  461. }
  462. void MemberChart::OnRadio8()
  463. {
  464. // TODO: Add your control notification handler code here
  465. m_Chart2.SetColumnCount(1); m_Chart2.SetShowLegend(0);
  466. DateChange();
  467. }
  468. void MemberChart::OnRadio10()
  469. {
  470. // TODO: Add your control notification handler code here
  471. m_Chart2.SetColumnCount(1); m_Chart2.SetShowLegend(0);
  472. DateChange();
  473. }
  474. void MemberChart::OnRadio11()
  475. {
  476. // TODO: Add your control notification handler code here
  477. m_Chart2.SetShowLegend(TRUE);
  478. m_Chart2.SetColumnCount(3);
  479. m_Chart2.SetColumn(1);
  480. m_Chart2.SetColumnLabel((LPCTSTR)"消费");
  481. m_Chart2.SetColumn(2);
  482. m_Chart2.SetColumnLabel((LPCTSTR)"充值");
  483. m_Chart2.SetColumn(3);
  484. m_Chart2.SetColumnLabel((LPCTSTR)"余额");
  485. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(255, 0, 0);
  486. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(0, 255, 0);
  487. m_Chart2.GetPlot().GetSeriesCollection().GetItem(3).GetDataPoints ().GetItem(-1).GetBrush ().GetFillColor ().Set(0, 0, 255);
  488. // 线宽(对点线图有效)
  489. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetPen().SetWidth(30);
  490. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetPen().SetWidth(30);
  491. m_Chart2.GetPlot().GetSeriesCollection().GetItem(3).GetPen().SetWidth(30);
  492. // 数据点类型显示数据值的模式(对柱柱状图和点线图有效)
  493. // 0: 不显示 1: 显示在柱状图外
  494. // 2: 显示在柱状图内上方 3: 显示在柱状图内中间 4: 显示在柱状图内下方
  495. m_Chart2.GetPlot().GetSeriesCollection().GetItem(1).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  496. m_Chart2.GetPlot().GetSeriesCollection().GetItem(2).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  497. m_Chart2.GetPlot().GetSeriesCollection().GetItem(3).GetDataPoints().GetItem(-1).GetDataPointLabel().SetLocationType(1);
  498. //////////////////////
  499. DateChange();
  500. }