<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno gio 26 mar 2020 alle ore 11:22 Weg <<a href="mailto:way@gmx.li">way@gmx.li</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello<br>
...<br></blockquote><div><br></div><div>Try like this (*)<br><br>Regards<br>Gianluigi<br><br>(*)<br>Public Sub LoadGraph(Optional Random As Boolean = False)<br><br> Dim ii As Long<br><br> MyChart = New Chart<br><br> MyChart.Title.Text = "Example"<br> MyChart.CountDataSets = 1<br><br> If (Random) Then<br> MyChart.YAxe.MaxValue = 6000<br> MyChart.YAxe.MinValue = 0<br> MyChart.YAxe.Step = 200<br> Else<br> MyChart.YAxe.MaxValue = 160000<br> MyChart.YAxe.MinValue = 16000<br> MyChart.YAxe.Step = 5000<br> Endif<br><br> For Each captions<br><br> MyChart.Headers.Values.Add(captions[captions.Key])<br><br> MyChart[0].Values.Add(0)<br><br> If (Random) Then<br> MyChart[0].Values[ii] = Rand(100, 6000)<br> Else<br> MyChart[0].Values[ii] = values[ii]<br> End If<br><br> ii += 1<br><br> Next<br><br> lbl_Firstvalue.Caption = MyChart[0].Values[0]<br><br> MyChart.Type = ChartType.Lines<br> MyChart.BackGround = Color.Yellow<br><br> DrawingArea1.Refresh<br><br>End <br></div></div></div>