c# - 如何在c#中删除系列折线图
问题描述
我做一个图表线收集点。当我绘制 2 个点 (20,20) 和 (40,40) 时,它可以工作,但是当我将图形中间的点 (30,0) 绘制成三角形时。我需要什么来修复它?提前非常感谢。
我是代码:
<i>
private void btnConfirm_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
{
ChartControl point = new ChartControl();
float s_question_true = 0;
int percent;
int dexibel = 0;
float trunggian;
CheckEdit[] _checkBoxes;
_checkBoxes = new CheckEdit[] { checkEdit1, checkEdit2, checkEdit3, checkEdit4, checkEdit5, checkEdit6, checkEdit7, checkEdit8, checkEdit9, checkEdit10 };
for (int i = 0; i < _checkBoxes.Length; i++)
{
if (_checkBoxes[i].CheckState == CheckState.Checked)
{
s_question_true++;
Console.WriteLine("gia tri cua s_question_true = {0}", s_question_true);
}
}
trunggian = (float)(s_question_true / 10);
percent = Convert.ToInt32(trunggian * 100);
dexibel = Convert.ToInt32(lbDecibel.Text);
//DialogResult result = MessageBox.Show("Bạn có muốn kết thúc bài Test không?", "Confirmation", MessageBoxButtons.YesNoCancel);
if (check_play == true)
{
if (btnOption.Caption == "Kiểm tra")
{
series1.Points.Add(new SeriesPoint(dexibel, percent));
series1.View.Color = System.Drawing.Color.Red;
this.chartControl1.Series.Add(series1);
((LineSeriesView)series1.View).MarkerVisibility = DevExpress.Utils.DefaultBoolean.True;
((LineSeriesView)series1.View).LineMarkerOptions.Kind = MarkerKind.Circle;
}
}
}
解决方案
推荐阅读
- javascript - 将表单数据转换为请求有效负载以在 Angular 中发布请求
- laravel - 通过删除方法将请求中的数组传递给 Laravel 不起作用
- python - 如何使用 excel 或 python 将数据从行和列转换为表格形式?
- arrays - Power Automate:如何将具有多项选择列的 SharePoint 列表项复制到另一个列表?
- python - 您如何计算页面上所有单词的所有唯一实例?(Python/硒)
- mongodb - mongodb驱动聚合框架
- python - 如何使用 selenium 查找并单击父级的按钮?
- wordpress - 为什么 PHP 选项没有显示在 PhpStorm 的语言和框架中?
- nestjs - 在嵌套 js 外键约束中无法正常工作
- shopify - 液体嵌套变量输出成变量名