Posted 20 June 2025, 5:24 am EST
Created 2 flexcharts and bound together with:
[code]Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
'Passing data in FlexChart Me.FlexChart1.DataSource = _data 'Binding chart's AxisX to 'Date' so dates appear in Horizontal axis Me.FlexChart1.BindingX = "dt" 'Binding FlexChart to 'Volume' so their market share appears in Vertical axis Dim _sVolume As Series = New Series() With { .Name = "Volume", .Binding = "Volume", .AxisY = New Axis() With { .Position = Position.Left, .Format = "#,##0,,M" } } Me.FlexChart1.Series.Add(_sVolume) _rsXRangeSelector = New RangeSelector(FlexChart2) 'Passing data in RangeSelection chart FlexChart2.DataSource = Me.FlexChart1.DataSource 'Binding chart's AxisX to 'Date' so dates appear in Horizontal axis FlexChart2.BindingX = "dt" 'Adding a new Series for High quote, hence binding it to "High" field FlexChart2.Series.Add(New Series() With { .Binding = "istTemp" })
End Sub[/code]
_data is list of DataItem and empty for the first time:
Private Class DataItem
Public Property istTemp As Single
Public Property istHum As Single
Public Property sollTemp As Single
Public Property sollHum As Single
Public Property OnOff As Integer
Public Property RunPause As Integer
Public Property dt As DateTime
End Class
and generated via timer.ticks.
After starting the prog, I get System.OverflowException in System.Drawing.dll: Graphics.cs:
private void CheckErrorStatus(int status)
{
switch (status)
{
case 1:
case 7:
{
int lastWin32Error = Marshal.GetLastWin32Error();
if (lastWin32Error == 5 || lastWin32Error == 127 || (((uint)UnsafeNativeMethods.GetSystemMetrics(4096) & (true ? 1u : 0u)) != 0 && lastWin32Error == 0))
{
return;
}
break;
}
case 0:
return;
}
throw SafeNativeMethods.Gdip.StatusException(status);
}
with a status of** 11.**
What is missing to work correctly?
Regards