[Gambas-user] Problem with YAxe Description in Chart.gb

Gianluigi bagonergi at gmail.com
Thu Mar 26 13:58:46 CET 2020


Il giorno gio 26 mar 2020 alle ore 11:22 Weg <way at gmx.li> ha scritto:

> Hello
> ...
>

Try like this (*)

Regards
Gianluigi

(*)
Public Sub LoadGraph(Optional Random As Boolean = False)

  Dim ii As Long

  MyChart = New Chart

  MyChart.Title.Text = "Example"
  MyChart.CountDataSets = 1

  If (Random) Then
    MyChart.YAxe.MaxValue = 6000
    MyChart.YAxe.MinValue = 0
    MyChart.YAxe.Step = 200
  Else
    MyChart.YAxe.MaxValue = 160000
    MyChart.YAxe.MinValue = 16000
    MyChart.YAxe.Step = 5000
  Endif

  For Each captions

    MyChart.Headers.Values.Add(captions[captions.Key])

    MyChart[0].Values.Add(0)

    If (Random) Then
      MyChart[0].Values[ii] = Rand(100, 6000)
    Else
      MyChart[0].Values[ii] = values[ii]
    End If

    ii += 1

  Next

  lbl_Firstvalue.Caption = MyChart[0].Values[0]

  MyChart.Type = ChartType.Lines
  MyChart.BackGround = Color.Yellow

  DrawingArea1.Refresh

End
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200326/77ab31f5/attachment.html>


More information about the User mailing list