When one of the pillars becomes high enough, it is necessary that the schedule grows with it, how to implement it?
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; } } 