When one of the pillars becomes high enough, it is necessary that the schedule grows with it, how to implement it?

enter image description here

Update

To construct a histogram I use the chart class, when one of the pillars reaches the upper border of the container, it goes further beyond the boundaries, how to make the graph automatically scale up on the Y axis when one of the pillars of the border is reached?

public partial class Form1 : Form { public Form1() { InitializeComponent(); } int y = 0; } private void button1_Click(object sender, EventArgs e) { this.chart2.Series.Clear(); chart2.BorderlineDashStyle = ChartDashStyle.DashDot; string seriesArray2 = "Кава"; string seriesArray3 = "Вода"; string seriesArray1 = "Кофе"; Series series1 = this.chart2.Series.Add(seriesArray1); series1.LabelBackColor = Color.Pink; this.chart2.Palette = ChartColorPalette.Grayscale; this.chart2.Series[0].Points.AddXY(10, +1); this.chart2.Series[0].Points[0].Color = Color.Red; Series series2 = this.chart2.Series.Add(seriesArray2); this.chart2.Palette = ChartColorPalette.Chocolate; this.chart2.Series[1].Points.AddXY(10, y+10); this.chart2.Series[1].Points[0].Color = Color.Pink; Series series3 = this.chart2.Series.Add(seriesArray3); this.chart2.Palette = ChartColorPalette.Excel; y += 20; } } 
  • I am sure that the answer will be easier to give if you publish the problem code with which you can reproduce the problem. (See also minimal reproducible example ) - Nicolas Chabanovsky
  • What is this control Chart, from which library? Or give the full name of the class, with all namespaces. - nzeemin
  • Native Library VS 2012 - MakleR

0