Webchart axis setting

Hi all,
I’m starting to integrate live data plotting using WebChart and so far it looks fantastic. I’m trying to figure out a way to ‘fix’ the axis of my plot though as at the moment they dynamically scale with data input values.
Looking at charts.org/docs/latest/axes it appears it’s possible but I’m not sure how…

could you remove old datapoints?

Not really. It’s a dynamic plot and I’d prefer not to have the data jumping around……

Hi all.

Still stuck in this one. In addition, I also have a bug that when I update the plot around every 500ms or so that the entire control disappears after about 45 seconds. Nothing is visible. You can then see a flash of the control very few seconds. Everything else on the window is there still.

thats how i update my chart

Public Sub Chart(start As DateTime, interval As DateInterval, minmax As Boolean)
  System.DebugLog CurrentMethodName
  Var db As New Module1.DB
  Call db.Connect
  Var d2 As DateTime = start 
  Var d1 As DateTime = d2 - interval 'zurück
  // Second set of data
  Var data1() As Double
  Var data2() As Double
  Var data3() As Double
  Var data4() As Double
  Var data5() As Double
  Var data6() As Double
  Var data7() As Double
  For d As Integer = 1 To Chart1.Width / 24.0
    Chart1.AddLabel d1.ToString(DateTime.FormatStyles.Medium,DateTime.FormatStyles.Short)
    Chart2.AddLabel d1.ToString(DateTime.FormatStyles.Medium,DateTime.FormatStyles.Short)
    Var s1 As Double = d1.SecondsFrom1970
    Var s2 As Double = d2.SecondsFrom1970
    Var rows As RowSet = db.SelectSQL("Select avg(VTIst) as VTIst, max(VTIst) as VTIstMax, min(VTIst) as VTIstMin, avg(VTSoll) as VTSoll, avg(AussenTemperatur) as AussenTemperatur, min(AussenTemperatur) as AussenTemperaturMin, max(AussenTemperatur) as AussenTemperaturMax From Zustand Where DateTime >=? and DateTime <= ?",s1,s2)
    While Not rows.AfterLastRow
    d1 = d1 - interval
    d2 = d2 - interval
  Var myset1 As New WebChartLinearDataset("VT Soll °C", &cFF0000, False, data1)
  myset1.ChartType = WebChartLinearDataset.ChartTypes.Line
  Var myset2 As New WebChartLinearDataset("VT Ist °C", &cFF0000, True, data2)
  myset2.ChartType = WebChartLinearDataset.ChartTypes.Line
  If minmax = True Then
    Var myset6 As New WebChartLinearDataset("VT Ist Max °C", &c808080, False, data6)
    myset6.ChartType = WebChartLinearDataset.ChartTypes.Line
    Var myset7 As New WebChartLinearDataset("VT Ist Min °C", &c808080, False, data7)
    myset7.ChartType = WebChartLinearDataset.ChartTypes.Line
  End If
  Var myset3 As New WebChartLinearDataset("Aussen °C", &c404040, False, data3)
  myset3.ChartType = WebChartLinearDataset.ChartTypes.Line
  If minmax = True Then
    Var myset4 As New WebChartLinearDataset("Aussen °C Min.", &c808080, False, data4)
    myset4.ChartType = WebChartLinearDataset.ChartTypes.Line
    Var myset5 As New WebChartLinearDataset("Aussen °C Max.", &c808080, False, data5)
    myset5.ChartType = WebChartLinearDataset.ChartTypes.Line
  End If
End Sub
Public Sub Refresh()
  System.DebugLog CurrentMethodName
  Var interval As DateInterval = SelectInterval.RowTagAt(SelectInterval.SelectedRowIndex)
  Var start As DateTime 
  If interval.Hours <=4 Then
    start = New DateTime(DateTime.Now.Year,DateTime.Now.Month,DateTime.Now.Day,DateTime.Now.Hour,0,0)
    start = New DateTime(DateTime.Now.Year,DateTime.Now.Month,DateTime.Now.Day,0,0,0)
  End If
  Var minmax As Boolean = CheckboxMinMax.Value
  Chart(start, interval, minmax)

End Sub

SelectInterval.AddRow("5 Min.",New DateInterval(0, 0, 0, 0, 5))
SelectInterval.AddRow("15 Min.",New DateInterval(0, 0, 0, 0, 15))
SelectInterval.AddRow("30 Min.",New DateInterval(0, 0, 0, 0, 30))
SelectInterval.AddRow("1 Std.",New DateInterval(0, 0, 0, 1))
SelectInterval.AddRow("2 Std.",New DateInterval(0, 0, 0, 2))
SelectInterval.AddRow("4 Std.",New DateInterval(0, 0, 0, 4))
SelectInterval.AddRow("1 Tag",New DateInterval(0, 0, 0, 24))
SelectInterval.AddRow("7 Tage (Woche)",New DateInterval(0, 0, 0, 24.0 * 7.0))
SelectInterval.AddRow("4,3 x 7 Tage (Monat)",New DateInterval(0, 0, 0, 24.0 * 7.0 * 4.3))

SelectInterval.SelectedRowIndex = 5

Have you looked at the OverrideOptions event?