说明:Series--图表序列

ChartAreas--图表区

一个chart可以增加多个图表区域,一个图表区域上有多个图表序列

C# chart

 

       this.chart1.Series[0].Points.Clear();

       //清空chart上第一个Series的数据
                    this.chart1.Series[0].ChartType = SeriesChartType.Point;

       //设置series类型为散点图
                    this.chart1.Series[0].MarkerSize = 4;

       //设置散点图的点的大小为4
                    this.chart1.ChartAreas[0].AxisX.Minimum = x1;

       //设置横坐标的显示范围,最小值
                    this.chart1.ChartAreas[0].AxisX.Maximum = x2;

       //设置横轴表的显示范围,最大值
                    this.chart1.ChartAreas[0].AxisY.Minimum = y1;
                    this.chart1.ChartAreas[0].AxisY.Maximum = y2;

       //设置纵坐标的显示范围
                    this.chart1.Series[0].ToolTip = "(#VALX,#VAL)";

         //鼠标移动到散点上时会显示点的横纵坐标
                    this.chart1.ChartAreas[0].AxisX.Title = indicator1;

         //设置横坐标的横轴标题
               this.chart1.ChartAreas[0].AxisY.Title = indicator2;

       //设置纵轴的标题
          this.chart1.Series[0].Name = "指标散点图";

       //设置该散点图的名称

 

C# chart

C# chart

 

相关文章:

  • 2021-05-18
  • 2021-06-11
  • 2021-09-10
  • 2021-11-21
  • 2022-02-02
  • 2022-12-23
  • 2021-12-23
  • 2021-04-29
猜你喜欢
  • 2021-05-01
  • 2021-09-29
  • 2021-06-14
  • 2021-04-28
  • 2021-07-24
  • 2021-08-18
  • 2021-04-23
相关资源
相似解决方案