EChart_ParticlesComposition.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566
  1. using DevExpress.Utils;
  2. using DevExpress.XtraCharts;
  3. using NPOI.Util;
  4. using OTSIncAReportApp.OTSRstMgrFunction;
  5. using OTSIncAReportApp.OTSSampleReportInfo;
  6. using OTSIncAReportApp.SysMgrTools;
  7. using OTSIncAReportGrids;
  8. using System;
  9. using System.Collections;
  10. using System.Collections.Generic;
  11. using System.Data;
  12. using System.Linq;
  13. using System.Windows.Forms;
  14. namespace OTSIncAReportApp.Control_ECharts
  15. {
  16. /// <summary>
  17. /// 各图char相关模块
  18. /// </summary>
  19. public partial class EChart_ParticlesComposition : UserControl
  20. {
  21. Hashtable table;
  22. #region 图表相关变量
  23. //y轴名称
  24. public string m_str_AxisY { get; set; }
  25. //数据图类型:常用夹杂物分类CommonlyUsedClassify ,颗粒成分PComponent,元素成分EComponent,颗粒尺寸分布PSize
  26. string ComSel { get; set; }
  27. public bool Report { get; set; }
  28. frmReportApp m_ReportApp;
  29. private frmReportConditionChoose m_conditionChoose;
  30. private ResultDataMgr m_DataMgr;
  31. private List<DataTable> prListData = new List<DataTable>();
  32. private List<string> prListString = new List<string>();
  33. #endregion
  34. #region 窗体加载及构造函数
  35. public EChart_ParticlesComposition(frmReportApp ReportApp, string comsel)
  36. {
  37. ComSel = comsel;
  38. m_ReportApp = ReportApp;
  39. m_conditionChoose = ReportApp.m_conditionChoose;
  40. m_DataMgr = ReportApp.m_rstDataMgr;
  41. InitializeComponent();
  42. //国际化
  43. Language lan = new Language();
  44. table = lan.GetNameTable("CompositionDistributionGrid");
  45. }
  46. private void EChart_ParticlesComposition_Load(object sender, EventArgs e)
  47. {
  48. string sou = "";
  49. int sel = 0;//选择颗粒范围(0为全部颗粒1为选择颗粒)
  50. if (Report)
  51. {
  52. sou = m_DataMgr.ResultFilesList[m_DataMgr.GetWorkingResultId()].anotherFileName.ToString();
  53. sel = 0;
  54. }
  55. else
  56. {
  57. sou = m_conditionChoose.m_conditionData.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE).ToString();
  58. sel = m_ReportApp.m_conditionChoose.m_conditionData.GetComboDownListIndexByItemName(OTSIncAReportApp.OTSSampleReportInfo.OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE_TYPE);
  59. }
  60. Report = false;
  61. if (m_ReportApp.more)
  62. {
  63. m_ReportApp.trans = false;
  64. }
  65. else
  66. {
  67. m_ReportApp.trans = true;
  68. }
  69. m_ReportApp.more = true;
  70. List<DataTable> list_dt = GetListJsonStr();
  71. prListData = list_dt.Copy();
  72. prListString.Clear();
  73. for (int i = 0; i < list_dt.Count; i++)
  74. {
  75. ResultFile resultFile = m_DataMgr.ResultFilesList.Find(s => s.anotherFileName == sou.Split('+')[i]);
  76. string str = resultFile.anotherFileName;
  77. prListString.Add(str);
  78. // 假设你已经有一个 ChartControl 实例,并且已经添加了一个饼图 Series
  79. //string str = prListString[i];
  80. Series series = new Series(str, ViewType.Pie);
  81. for (int a = 0; a < prListData[i].Rows.Count; a++)
  82. {
  83. string name = prListData[i].Rows[a]["name"].ToString();
  84. double Cunt = Convert.ToDouble(prListData[i].Rows[a]["Cunt"]);
  85. series.Points.Add(new SeriesPoint(name, Cunt));
  86. }
  87. series.LabelsVisibility = DefaultBoolean.True;
  88. series.Label.TextPattern = "{A}";
  89. chartControl1.Series.Add(series);
  90. }
  91. chartControl1.Legend.Visibility = DefaultBoolean.False;
  92. chartControl1.Refresh();
  93. panel1.Dock = DockStyle.Fill;
  94. chartControl1.Dock = DockStyle.Fill;
  95. checkButton1.Checked = false;
  96. checkButton2.Checked = false;
  97. checkButton3.Checked = true;
  98. }
  99. #endregion
  100. #region 获取单数据源
  101. private DataTable ClassificationIntegration(string path, int sel)
  102. {
  103. //------------------加载模块,获取数据-------------------------------------------------
  104. ResultGrid ls_resultgrid = new ResultGrid(m_ReportApp);
  105. Dictionary<string, string> keyValues_ResultGrid = ls_resultgrid.GetData_ResultGrid_Report();
  106. //------------------加载模块,获取数据结束----------------------------------------------
  107. Dictionary<string, string>.Enumerator en = keyValues_ResultGrid.GetEnumerator();
  108. string str_SCZS = "";
  109. keyValues_ResultGrid.TryGetValue(ls_resultgrid.table["col5"].ToString(), out str_SCZS);//视场总数
  110. DataOperation.DataAccess.ParticleData particledata = new DataOperation.DataAccess.ParticleData(path);
  111. DataTable data = new DataTable();
  112. data = particledata.GetAreaByAllIncA("");//获取所有分类面积和数量信息
  113. if (data.Rows.Count == 0)
  114. {
  115. return data;
  116. }
  117. DataTable AreaInformationOfAllElements = ConSolidateInvalid(data);
  118. DataTable AllAnalysisDetails = new DataTable();
  119. AllAnalysisDetails.Columns.Add("Name");
  120. AllAnalysisDetails.Columns.Add("TypeId");
  121. AllAnalysisDetails.Columns.Add("Area", typeof(double));
  122. AllAnalysisDetails.Columns.Add("Class");
  123. AllAnalysisDetails.Columns.Add("Cunt", typeof(double));
  124. for (int i = 0; i < AreaInformationOfAllElements.Rows.Count; i++)
  125. {
  126. DataRow dr2 = AllAnalysisDetails.NewRow();
  127. dr2["Name"] = AreaInformationOfAllElements.Rows[i]["TypeName"].ToString();
  128. dr2["Area"] = Convert.ToDouble(AreaInformationOfAllElements.Rows[i]["ar"]);
  129. dr2["TypeId"] = AreaInformationOfAllElements.Rows[i]["TypeId"].ToString();
  130. dr2["Cunt"] = Convert.ToDouble(AreaInformationOfAllElements.Rows[i]["con"]);
  131. dr2["Class"] = AreaInformationOfAllElements.Rows[i]["GroupName"].ToString();
  132. AllAnalysisDetails.Rows.Add(dr2);
  133. }
  134. //按照list列表进行物质类排序,物质类中的元素分类按照面积的大小进行排序
  135. List<string> ClassName = new List<string>();
  136. DataTable getClass_dt = particledata.GetAllClass();
  137. for (int i = 0; i < getClass_dt.Rows.Count; i++)
  138. {
  139. ClassName.Add(getClass_dt.Rows[i]["GroupName"].ToString());
  140. }
  141. DataTable AreaRatio = new DataTable();
  142. AreaRatio.TableName = "InclusionAreaRatio";
  143. AreaRatio.Columns.Add("e1");
  144. AreaRatio.Columns.Add("e2");
  145. AreaRatio.Columns.Add("e3", typeof(double));
  146. AreaRatio.Columns.Add("e4");
  147. AreaRatio.Columns.Add("e5");
  148. AreaRatio.Columns.Add("Cunt", typeof(int));
  149. //获取夹杂物的总面积用于计算夹杂物类别的占比(gridview最后一个固定是未识别颗粒,要排除未识别颗粒所以for循环至grid view长度减一)
  150. double totalInclusionArea = 0;
  151. totalInclusionArea = Convert.ToDouble(decimal.Parse(AllAnalysisDetails.Compute("sum(Area)", "").ToString()));
  152. for (int i = 0; i < AllAnalysisDetails.Rows.Count; i++)
  153. {
  154. DataRow dr2 = AreaRatio.NewRow();
  155. dr2["e1"] = AllAnalysisDetails.Rows[i]["Class"].ToString();
  156. dr2["e2"] = AllAnalysisDetails.Rows[i]["Name"].ToString();
  157. dr2["e3"] = Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]);
  158. dr2["e4"] = Math.Round((Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]) / totalInclusionArea) * 100, 2);
  159. dr2["e5"] = Math.Round((Convert.ToDouble(AllAnalysisDetails.Rows[i]["Area"]) / Convert.ToDouble(str_SCZS)) * 100, 4);
  160. dr2["Cunt"] = AllAnalysisDetails.Rows[i]["Cunt"].ToString();
  161. AreaRatio.Rows.Add(dr2);
  162. }
  163. DataTable AreaRatio_dt = AreaRatio.Copy();
  164. AreaRatio_dt.Clear();
  165. for (int i = 0; i < ClassName.Count(); i++)
  166. {
  167. DataTable dt = AreaRatio.Copy();
  168. dt.Clear();
  169. for (int a = 0; a < AreaRatio.Rows.Count; a++)
  170. {
  171. if (AreaRatio.Rows[a]["e1"].ToString() == ClassName[i].ToString())
  172. {
  173. dt.Rows.Add(AreaRatio.Rows[a].ItemArray);
  174. }
  175. }
  176. DataView dv = dt.DefaultView;
  177. dv.Sort = "e3 DESC";
  178. DataTable dt_Element = dv.ToTable();
  179. for (int a = 0; a < dt_Element.Rows.Count; a++)
  180. {
  181. AreaRatio_dt.Rows.Add(dt_Element.Rows[a].ItemArray);
  182. }
  183. }
  184. DataTable AllAnalysisDetails1 = AreaRatio_dt.Copy();
  185. AllAnalysisDetails1.Clear();
  186. for (int i = 0; i < ClassName.Count; i++)
  187. {
  188. DataTable dt = AreaRatio_dt.Copy();
  189. dt.Clear();
  190. for (int a = 0; a < AreaRatio_dt.Rows.Count; a++)
  191. {
  192. if (AreaRatio_dt.Rows[a]["e1"].ToString() == ClassName[i].ToString())
  193. {
  194. dt.Rows.Add(AreaRatio_dt.Rows[a].ItemArray);
  195. }
  196. }
  197. if (dt.Rows.Count > 0)
  198. {
  199. double totalInclusionArea2 = Convert.ToDouble(decimal.Parse(AreaRatio_dt.Compute("sum(e3)", "").ToString()));
  200. double Area = Convert.ToDouble(decimal.Parse(dt.Compute("sum(e3)", "").ToString()));
  201. int cunt = Convert.ToInt32(decimal.Parse(dt.Compute("sum(Cunt)", "").ToString()));
  202. DataRow dr3 = AllAnalysisDetails1.NewRow();
  203. dr3["e1"] = ClassName[i].ToString();
  204. dr3["e3"] = Math.Round(Area, 2);
  205. dr3["e4"] = Math.Round((Convert.ToDouble(dt.Rows[0]["e3"]) / totalInclusionArea2) * 100, 2);
  206. dr3["e5"] = Math.Round((Convert.ToDouble(dt.Rows[0]["e3"]) / Convert.ToDouble(str_SCZS)) * 100, 4);
  207. dr3["Cunt"] = cunt;
  208. AllAnalysisDetails1.Rows.Add(dr3);
  209. }
  210. }
  211. return AllAnalysisDetails1;
  212. }
  213. private DataTable ConSolidateInvalid(DataTable dt)
  214. {
  215. DataTable dt_invalid = dt.Clone();
  216. DataTable dt_no_invalid = dt.Clone();
  217. for (int i = 0; i < dt.Rows.Count; i++)
  218. {
  219. if (dt.Rows[i]["TypeName"].ToString() == "Invalid")
  220. {
  221. dt_invalid.Rows.Add(dt.Rows[i].ItemArray);
  222. }
  223. else
  224. {
  225. dt_no_invalid.Rows.Add(dt.Rows[i].ItemArray);
  226. }
  227. }
  228. return dt_no_invalid;
  229. }
  230. private string getWhere(string max, string min, string col)
  231. {
  232. return col + ">=" + min + " and " + col + "<" + max;
  233. }
  234. #endregion
  235. #region echarts
  236. /// <summary>
  237. /// 通过m_list_chartstruct,组合json数据格式
  238. /// </summary>
  239. /// <returns></returns>
  240. private List<DataTable> GetListJsonStr()
  241. {
  242. int sel = m_conditionChoose.m_conditionData.ProItemProIndex();
  243. string filedAndParticl = "";
  244. DataOperation.DataAccess.ParticleData particledata = null;
  245. DataTable dt = new DataTable();
  246. List<DataTable> ListData = new List<DataTable>();
  247. string sou = m_conditionChoose.m_conditionData.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.DATA_SOURCE).ToString();
  248. for (int i = 0; i < sou.Split('+').Length; i++)
  249. {
  250. ResultFile resultFile = m_DataMgr.ResultFilesList.Find(s => s.anotherFileName == sou.Split('+')[i]);
  251. if (resultFile == null)
  252. {
  253. continue;
  254. }
  255. particledata = new DataOperation.DataAccess.ParticleData(resultFile.FilePath);
  256. switch (ComSel)
  257. {
  258. case "InclusionareaRatio":
  259. dt = particledata.GetAreaByAllIncA("");
  260. DataTable dtInclusionareaRatio = new DataTable();
  261. dtInclusionareaRatio.Columns.Add("name");
  262. dtInclusionareaRatio.Columns.Add("Cunt");
  263. for (int k = 0; k < dt.Rows.Count; k++)
  264. {
  265. string str = dt.Rows[k]["ar"].ToString();
  266. string name = dt.Rows[k]["TypeName"].ToString();
  267. if (Convert.ToInt32(dt.Rows[k]["TypeId"]) < 100)
  268. {
  269. continue;
  270. }
  271. DataRow dr = dtInclusionareaRatio.NewRow();
  272. dr["name"] = name;
  273. dr["Cunt"] = decimal.Round(decimal.Parse(dt.Rows[k]["ar"].ToString()), 2).ToString();
  274. dtInclusionareaRatio.Rows.Add(dr);
  275. }
  276. ListData.Add(dtInclusionareaRatio);
  277. break;
  278. case "CommonlyUsedClassify":
  279. //计算分类整个表的数据
  280. dt = ClassificationIntegration(resultFile.FilePath, sel);
  281. DataTable data = new DataTable();
  282. data.Columns.Add("name");
  283. data.Columns.Add("Cunt");
  284. for (int a = 0; a < dt.Rows.Count; a++)
  285. {
  286. DataRow dr = data.NewRow();
  287. dr["name"] = dt.Rows[a]["e1"].ToString();
  288. dr["Cunt"] = dt.Rows[a]["Cunt"].ToString();
  289. data.Rows.Add(dr);
  290. }
  291. ListData.Add(data);
  292. break;
  293. case "PComponent":
  294. //创建新的图形数据源
  295. dt = particledata.GetParticleListByIncA("area");
  296. DataTable dtPComponent = new DataTable();
  297. dtPComponent.Columns.Add("name");
  298. dtPComponent.Columns.Add("Cunt");
  299. for (int a = 0; a < dt.Rows.Count; a++)
  300. {
  301. if (Convert.ToInt32(dt.Rows[a]["TypeId"]) < 100)
  302. {
  303. continue;
  304. }
  305. DataRow dr = dtPComponent.NewRow();
  306. dr["name"] = dt.Rows[a]["TypeName"].ToString();
  307. dr["Cunt"] = dt.Rows[a]["con"].ToString();
  308. dtPComponent.Rows.Add(dr);
  309. }
  310. ListData.Add(dtPComponent);
  311. break;
  312. case "EComponent":
  313. //创建新的图形数据源
  314. dt = particledata.GetElementForArea(filedAndParticl);
  315. DataTable dtEComponent = new DataTable();
  316. dtEComponent.Columns.Add("name");
  317. dtEComponent.Columns.Add("Cunt");
  318. for (int k = 0; k < dt.Rows.Count; k++)
  319. {
  320. string str = dt.Rows[k]["earea"].ToString();
  321. try
  322. {
  323. DataRow dr = dtEComponent.NewRow();
  324. dr["name"] = dt.Rows[k]["name"].ToString();
  325. dr["Cunt"] = decimal.Round(decimal.Parse(str), 2).ToString();
  326. dtEComponent.Rows.Add(dr);
  327. }
  328. catch
  329. {
  330. DataRow dr = dtEComponent.NewRow();
  331. dr["name"] = dt.Rows[k]["name"].ToString();
  332. dr["Cunt"] = str;
  333. dtEComponent.Rows.Add(dr);
  334. }
  335. }
  336. ListData.Add(dtEComponent);
  337. break;
  338. case "PSize":
  339. //获取粒级表
  340. string pathe = m_DataMgr.m_RptConfigFile.PartSizeFileFolder + m_DataMgr.m_RptConfigFile.PartSizeFile;
  341. DataSet ds = DataOperation.DataAccess.XMLoperate.GetXml(pathe);
  342. string sizestr = ds.Tables[0].Rows[0]["Sizes"].ToString();
  343. List<string> temp = new List<string>();
  344. for (int j = 0; j < sizestr.Split(',').Length - 1; j++)
  345. {
  346. if (sizestr.Split(',')[j].Length > 0)
  347. {
  348. double d1 = Convert.ToDouble(sizestr.Split(',')[j]);
  349. double d2 = Convert.ToDouble(sizestr.Split(',')[j + 1]);
  350. string name = d1.ToString() + "~" + d2.ToString();
  351. temp.Add(name);
  352. }
  353. }
  354. double d = Convert.ToDouble(sizestr.Split(',')[sizestr.Split(',').Length - 1]);
  355. string name1 = d.ToString() + "~MAX";
  356. temp.Add(name1);
  357. string con = m_conditionChoose.m_conditionData.GetPropItemDisplayValueByPropItemName(OTS_REPORT_PROP_GRID_ITEMS.SIZE_CAL_METHOD_TYPE).ToString();
  358. string po = "";
  359. switch (con)
  360. {
  361. case "DMAX":
  362. po = "DMAX";
  363. break;
  364. case "DMIN":
  365. po = "DMIN";
  366. break;
  367. case "ECD":
  368. po = "Area";
  369. break;
  370. case "FERET":
  371. po = "DFERET";
  372. break;
  373. }
  374. DataTable dtp = particledata.GetParticleAll(filedAndParticl);
  375. DataTable dtPSize = new DataTable();
  376. dtPSize.Columns.Add("name");
  377. dtPSize.Columns.Add("Cunt");
  378. for (int k = 0; k < temp.Count; k++)
  379. {
  380. string str = temp[k];
  381. string d1 = str.Split('~')[0];
  382. string d2 = str.Split('~')[1];
  383. if (d2 == "MAX")
  384. {
  385. d2 = "999";
  386. }
  387. DataRow[] datas = dtp.Select(getWhere(d2, d1, po));
  388. DataRow dr = dtPSize.NewRow();
  389. dr["name"] = str;
  390. dr["Cunt"] = datas.Count().ToString();
  391. dtPSize.Rows.Add(dr);
  392. }
  393. ListData.Add(dtPSize);
  394. break;
  395. }
  396. }
  397. return ListData;
  398. }
  399. #endregion
  400. /// <summary>
  401. /// 折线图
  402. /// </summary>
  403. /// <param name="sender"></param>
  404. /// <param name="e"></param>
  405. private void checkButton2_CheckedChanged(object sender, EventArgs e)
  406. {
  407. if(checkButton2.Checked)
  408. {
  409. checkButton1.Checked = false;
  410. checkButton3.Checked = false;
  411. chartControl1.Series.Clear();
  412. for (int i=0;i< prListData.Count;i++)
  413. {
  414. string str = prListString[i];
  415. // 假设你已经有一个 ChartControl 实例,并且已经添加了一个饼图 Series
  416. Series series = new Series(str, ViewType.Line);
  417. for (int a = 0; a < prListData[i].Rows.Count; a++)
  418. {
  419. string name = prListData[i].Rows[a]["name"].ToString();
  420. double Cunt = Convert.ToDouble(prListData[i].Rows[a]["Cunt"]);
  421. series.Points.Add(new SeriesPoint(name, Cunt));
  422. }
  423. series.LabelsVisibility = DefaultBoolean.True;
  424. series.Label.TextPattern = "{V}";
  425. chartControl1.Series.Add(series);
  426. }
  427. chartControl1.Legend.Visibility = DefaultBoolean.False;
  428. chartControl1.Refresh();
  429. }
  430. else
  431. {
  432. if (!checkButton1.Checked && !checkButton3.Checked)
  433. {
  434. checkButton2.Checked = false;
  435. }
  436. }
  437. }
  438. /// <summary>
  439. /// 柱状图
  440. /// </summary>
  441. /// <param name="sender"></param>
  442. /// <param name="e"></param>
  443. private void checkButton1_CheckedChanged(object sender, EventArgs e)
  444. {
  445. if (checkButton1.Checked)
  446. {
  447. checkButton2.Checked = false;
  448. checkButton3.Checked = false;
  449. chartControl1.Series.Clear();
  450. for (int i = 0; i < prListData.Count; i++)
  451. {
  452. string str = prListString[i];
  453. // 假设你已经有一个 ChartControl 实例,并且已经添加了一个饼图 Series
  454. Series series = new Series(str, ViewType.Bar);
  455. for (int a = 0; a < prListData[i].Rows.Count; a++)
  456. {
  457. string name = prListData[i].Rows[a]["name"].ToString();
  458. double Cunt = Convert.ToDouble(prListData[i].Rows[a]["Cunt"]);
  459. series.Points.Add(new SeriesPoint(name, Cunt));
  460. }
  461. series.LabelsVisibility = DefaultBoolean.True;
  462. series.Label.TextPattern = "{V}";
  463. chartControl1.Series.Add(series);
  464. }
  465. chartControl1.Legend.Visibility = DefaultBoolean.False;
  466. chartControl1.Refresh();
  467. }
  468. else
  469. {
  470. if (!checkButton2.Checked && !checkButton3.Checked)
  471. {
  472. checkButton1.Checked = true;
  473. }
  474. }
  475. }
  476. private void checkButton3_CheckedChanged(object sender, EventArgs e)
  477. {
  478. if (checkButton3.Checked)
  479. {
  480. checkButton1.Checked = false;
  481. checkButton2.Checked = false;
  482. chartControl1.Series.Clear();
  483. for (int i = 0; i < prListData.Count; i++)
  484. {
  485. string str = prListString[i];
  486. Series series = new Series(str, ViewType.Pie);
  487. for (int a = 0; a < prListData[i].Rows.Count; a++)
  488. {
  489. string name = prListData[i].Rows[a]["name"].ToString();
  490. double Cunt = Convert.ToDouble(prListData[i].Rows[a]["Cunt"]);
  491. series.Points.Add(new SeriesPoint(name, Cunt));
  492. }
  493. series.LabelsVisibility = DefaultBoolean.True;
  494. series.Label.TextPattern = "{A}";
  495. chartControl1.Series.Add(series);
  496. }
  497. chartControl1.Legend.Visibility = DefaultBoolean.False;
  498. chartControl1.Refresh();
  499. }
  500. else
  501. {
  502. if (!checkButton1.Checked && !checkButton2.Checked)
  503. {
  504. checkButton3.Checked = true;
  505. }
  506. }
  507. }
  508. }
  509. }