From a895e32900fe0742b5be380de85b74658433e403 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 12:42:02 +0100
Subject: [PATCH 01/57] start switch from TeeChart to ScottPlot
---
source/Analysis/Analysis.vb | 4 +-
source/Analysis/TestAnalysis.vb | 2 +-
source/Classes/TimeSeriesDisplayOptions.vb | 12 +-
source/Controllers/WaveController.vb | 2142 ++++++++--------
source/Helpers.vb | 110 +-
source/Views/MainWindow.Designer.vb | 2628 +-------------------
source/Views/MainWindow.resx | 39 +-
source/Views/MainWindow.vb | 129 +-
source/Wave.vbproj | 1199 ++++-----
9 files changed, 1944 insertions(+), 4321 deletions(-)
diff --git a/source/Analysis/Analysis.vb b/source/Analysis/Analysis.vb
index 4356d802..d297cbc7 100644
--- a/source/Analysis/Analysis.vb
+++ b/source/Analysis/Analysis.vb
@@ -65,7 +65,7 @@ Friend MustInherit Class Analysis
''' is shown in a separate window if `hasResultChart` is True
'''
''' Optional
- Protected ResultChart As Steema.TeeChart.Chart
+ Protected ResultChart As ScottPlot.Plot
'''
''' List of result series
@@ -144,7 +144,7 @@ Friend MustInherit Class Analysis
''' Analysis result chart
'''
''' Optional
- Public ReadOnly Property getResultChart() As Steema.TeeChart.Chart
+ Public ReadOnly Property getResultChart() As ScottPlot.Plot
Get
Return Me.ResultChart
End Get
diff --git a/source/Analysis/TestAnalysis.vb b/source/Analysis/TestAnalysis.vb
index e8fb7486..4ebb59f1 100644
--- a/source/Analysis/TestAnalysis.vb
+++ b/source/Analysis/TestAnalysis.vb
@@ -139,7 +139,7 @@ Friend Class TestAnalysis
MyBase.ResultValues.Add($"Count values of time series '{title}'", length)
'Result chart (will be shown in separate window)
- MyBase.ResultChart = New Steema.TeeChart.Chart()
+ MyBase.ResultChart = New ScottPlot.Plot()
'Fill and format chart
'...
'...
diff --git a/source/Classes/TimeSeriesDisplayOptions.vb b/source/Classes/TimeSeriesDisplayOptions.vb
index e400731a..ac00da83 100644
--- a/source/Classes/TimeSeriesDisplayOptions.vb
+++ b/source/Classes/TimeSeriesDisplayOptions.vb
@@ -1,4 +1,4 @@
-'BlueM.Wave
+'BlueM.Wave
'Copyright (C) BlueM Dev Group
'
'
@@ -43,11 +43,11 @@ Public Class TimeSeriesDisplayOptions
''' Line style
'''
'''
- Public Property LineStyle As Drawing2D.DashStyle
+ Public Property LineStyle As ScottPlot.LineStyle
Get
Return _linestyle
End Get
- Set(value As Drawing2D.DashStyle)
+ Set(value As ScottPlot.LineStyle)
_linestyle = value
End Set
End Property
@@ -84,7 +84,7 @@ Public Class TimeSeriesDisplayOptions
''' Default Color is empty in order to allow automatic color assignment by the chart
Public Sub New()
Me.Color = Color.Empty
- Me.LineStyle = Drawing2D.DashStyle.Solid
+ Me.LineStyle = ScottPlot.LineStyle.Solid
Me.LineWidth = 2
Me.ShowPoints = False
End Sub
@@ -131,10 +131,10 @@ Public Class TimeSeriesDisplayOptions
''' Recognized line styles: https://learn.microsoft.com/en-us/dotnet/api/system.drawing.drawing2d.dashstyle
''' the line style as string
Public Sub SetLineStyle(lineStyle As String)
- If Not [Enum].IsDefined(GetType(Drawing2D.DashStyle), lineStyle) Then
+ If Not [Enum].IsDefined(GetType(ScottPlot.LineStyle), lineStyle) Then
Log.AddLogEntry(levels.warning, $"Line style '{lineStyle}' is not recognized!")
Else
- Me.LineStyle = [Enum].Parse(GetType(Drawing2D.DashStyle), lineStyle)
+ Me.LineStyle = [Enum].Parse(GetType(ScottPlot.LineStyle), lineStyle)
End If
End Sub
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 6d005ea0..5dd201a1 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -140,18 +140,18 @@ Friend Class WaveController
AddHandler Me.View.KeyDown, AddressOf KeyDown
'mouse events
- AddHandler Me.View.TChart1.MouseDown, AddressOf Chart_MouseDown
- AddHandler Me.View.TChart1.MouseMove, AddressOf Chart_MouseMove
- AddHandler Me.View.TChart1.MouseUp, AddressOf Chart_MouseUp
- AddHandler Me.View.TChart1.DoubleClick, AddressOf EditChart_Click
+ AddHandler Me.View.MainPlot.MouseDown, AddressOf Chart_MouseDown
+ AddHandler Me.View.MainPlot.MouseMove, AddressOf Chart_MouseMove
+ AddHandler Me.View.MainPlot.MouseUp, AddressOf Chart_MouseUp
+ AddHandler Me.View.MainPlot.DoubleClick, AddressOf EditChart_Click
- AddHandler Me.View.TChart2.MouseDown, AddressOf OverviewChart_MouseDown
- AddHandler Me.View.TChart2.MouseMove, AddressOf OverviewChart_MouseMove
- AddHandler Me.View.TChart2.MouseUp, AddressOf OverviewChart_MouseUp
- AddHandler Me.View.TChart2.DoubleClick, AddressOf OverviewChart_DoubleClick
+ AddHandler Me.View.OverviewPlot.MouseDown, AddressOf OverviewChart_MouseDown
+ AddHandler Me.View.OverviewPlot.MouseMove, AddressOf OverviewChart_MouseMove
+ AddHandler Me.View.OverviewPlot.MouseUp, AddressOf OverviewChart_MouseUp
+ AddHandler Me.View.OverviewPlot.DoubleClick, AddressOf OverviewChart_DoubleClick
- AddHandler Me.View.TChart1.MouseWheel, AddressOf Chart_MouseWheel
- AddHandler Me.View.TChart2.MouseWheel, AddressOf OverviewChart_MouseWheel
+ AddHandler Me.View.MainPlot.MouseWheel, AddressOf Chart_MouseWheel
+ AddHandler Me.View.OverviewPlot.MouseWheel, AddressOf OverviewChart_MouseWheel
'drag drop events
AddHandler Me.View.DragEnter, AddressOf Wave_DragEnter
@@ -182,7 +182,8 @@ Friend Class WaveController
AddHandler _axisDialog.AxisUnitChanged, AddressOf AxisUnitChanged
'add chart event listener
- Me.View.TChart1.Chart.Listeners.Add(Me)
+ 'TODO: TChart
+ 'Me.View.TChart.TChart1.Listeners.Add(Me)
'model events
AddHandler _model.FileImported, AddressOf FileImported
@@ -238,62 +239,63 @@ Friend Class WaveController
'''
'''
Private Sub TeeEvent(e As Steema.TeeChart.TeeEvent) Implements Steema.TeeChart.ITeeEventListener.TeeEvent
- Try
- If TypeOf e Is Steema.TeeChart.Styles.SeriesEvent Then
- Dim seriesEvent As Steema.TeeChart.Styles.SeriesEvent = CType(e, Steema.TeeChart.Styles.SeriesEvent)
- Select Case seriesEvent.Event
- Case Steema.TeeChart.Styles.SeriesEventStyle.ChangeActive
- 'series visibility has been changed. check whether custom axes should be made invisible
-
- 'collect units of all active series
- Dim activeUnits As New HashSet(Of String)
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If series.Active Then
- activeUnits.Add(series.GetVertAxis.Tag)
- End If
- Next
- 'set visibility of custom axes accordingly
- For Each axis As Steema.TeeChart.Axis In View.TChart1.Axes.Custom
- If activeUnits.Contains(axis.Tag) Then
- axis.Visible = True
- Else
- axis.Visible = False
- End If
- Next
-
- Case Steema.TeeChart.Styles.SeriesEventStyle.ChangeTitle
- 'series title changed, update title in the model
- Dim id As Integer = seriesEvent.Series.Tag
- If _model.TimeSeries.ContainsId(id) Then
- If _model.TimeSeries(id).Title <> seriesEvent.Series.Title Then
- _model.TimeSeries(id).Title = seriesEvent.Series.Title
- _model.SeriesPropertiesChangedHandler(id)
- End If
- End If
-
- Case Steema.TeeChart.Styles.SeriesEventStyle.Remove
- 'series removed, delete series from model
- Dim id As Integer = seriesEvent.Series.Tag
- If _model.TimeSeries.ContainsId(id) Then
- 'temporarily disable event handling to prevent multiple deletions
- RemoveHandler _model.SeriesRemoved, AddressOf SeriesRemoved
- _model.RemoveTimeSeries(id)
- AddHandler _model.SeriesRemoved, AddressOf SeriesRemoved
- End If
-
- Case Steema.TeeChart.Styles.SeriesEventStyle.Swap
- 'series reordered, reorder series in model
- Dim ids As New List(Of Integer)
- For Each series As Steema.TeeChart.Styles.Series In e.sender.Series
- ids.Add(series.Tag)
- Next
- _model.Reorder_Series(ids)
-
- End Select
- End If
- Catch ex As Exception
- Log.AddLogEntry(Log.levels.debug, ex.Message)
- End Try
+ 'TODO: TChart
+ 'Try
+ ' If TypeOf e Is Steema.TeeChart.Styles.SeriesEvent Then
+ ' Dim seriesEvent As Steema.TeeChart.Styles.SeriesEvent = CType(e, Steema.TeeChart.Styles.SeriesEvent)
+ ' Select Case seriesEvent.Event
+ ' Case Steema.TeeChart.Styles.SeriesEventStyle.ChangeActive
+ ' 'series visibility has been changed. check whether custom axes should be made invisible
+
+ ' 'collect units of all active series
+ ' Dim activeUnits As New HashSet(Of String)
+ ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If series.Active Then
+ ' activeUnits.Add(series.GetVertAxis.Tag)
+ ' End If
+ ' Next
+ ' 'set visibility of custom axes accordingly
+ ' For Each axis As Steema.TeeChart.Axis In View.MainPlot.Axes.Custom
+ ' If activeUnits.Contains(axis.Tag) Then
+ ' axis.Visible = True
+ ' Else
+ ' axis.Visible = False
+ ' End If
+ ' Next
+
+ ' Case Steema.TeeChart.Styles.SeriesEventStyle.ChangeTitle
+ ' 'series title changed, update title in the model
+ ' Dim id As Integer = seriesEvent.Series.Tag
+ ' If _model.TimeSeries.ContainsId(id) Then
+ ' If _model.TimeSeries(id).Title <> seriesEvent.Series.Title Then
+ ' _model.TimeSeries(id).Title = seriesEvent.Series.Title
+ ' _model.SeriesPropertiesChangedHandler(id)
+ ' End If
+ ' End If
+
+ ' Case Steema.TeeChart.Styles.SeriesEventStyle.Remove
+ ' 'series removed, delete series from model
+ ' Dim id As Integer = seriesEvent.Series.Tag
+ ' If _model.TimeSeries.ContainsId(id) Then
+ ' 'temporarily disable event handling to prevent multiple deletions
+ ' RemoveHandler _model.SeriesRemoved, AddressOf SeriesRemoved
+ ' _model.RemoveTimeSeries(id)
+ ' AddHandler _model.SeriesRemoved, AddressOf SeriesRemoved
+ ' End If
+
+ ' Case Steema.TeeChart.Styles.SeriesEventStyle.Swap
+ ' 'series reordered, reorder series in model
+ ' Dim ids As New List(Of Integer)
+ ' For Each series As Steema.TeeChart.Styles.Series In e.sender.Series
+ ' ids.Add(series.Tag)
+ ' Next
+ ' _model.Reorder_Series(ids)
+
+ ' End Select
+ ' End If
+ 'Catch ex As Exception
+ ' Log.AddLogEntry(Log.levels.debug, ex.Message)
+ 'End Try
End Sub
#Region "user events"
@@ -306,7 +308,7 @@ Friend Class WaveController
'Warnen, wenn bereits Serien vorhanden
'-------------------------------------
- If (View.TChart1.Series.Count() > 0) Then
+ If (View.MainPlot.Plot.GetPlottables().Count() > 0) Then
res = MsgBox($"All existing series will be deleted!{eol}Continue?", MsgBoxStyle.OkCancel)
If (Not res = Windows.Forms.DialogResult.OK) Then Exit Sub
End If
@@ -402,18 +404,19 @@ Friend Class WaveController
'collect display options from chart and store them in timeseries
Dim tsList As New List(Of TimeSeries)
For Each ts As TimeSeries In _model.TimeSeries.ToList()
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If series.Tag = ts.Id Then
- If TypeOf series Is Steema.TeeChart.Styles.Line Then
- Dim line As Steema.TeeChart.Styles.Line = CType(series, Steema.TeeChart.Styles.Line)
- ts.DisplayOptions.Color = line.Color
- ts.DisplayOptions.LineStyle = line.LinePen.Style
- ts.DisplayOptions.LineWidth = line.LinePen.Width
- ts.DisplayOptions.ShowPoints = line.Pointer.Visible
- End If
- Exit For
- End If
- Next
+ 'TODO: TChart
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If series.Tag = ts.Id Then
+ ' If TypeOf series Is Steema.TeeChart.Styles.Line Then
+ ' Dim line As Steema.TeeChart.Styles.Line = CType(series, Steema.TeeChart.Styles.Line)
+ ' ts.DisplayOptions.Color = line.Color
+ ' ts.DisplayOptions.LineStyle = line.LinePen.Style
+ ' ts.DisplayOptions.LineWidth = line.LinePen.Width
+ ' ts.DisplayOptions.ShowPoints = line.Pointer.Visible
+ ' End If
+ ' Exit For
+ ' End If
+ 'Next
tsList.Add(ts)
Next
Call Fileformats.WVP.Write_File(tsList, dlg.FileName,
@@ -438,8 +441,9 @@ Friend Class WaveController
'Teechart Export
'***************
Private Sub SaveChart_Click(sender As System.Object, e As System.EventArgs)
- Dim fmt As New Steema.TeeChart.Export.TemplateExport(View.TChart1.Chart)
- Call View.TChart1.Export.ShowExportDialog(fmt)
+ 'TODO: TChart
+ 'Dim fmt As New Steema.TeeChart.Export.TemplateExport(View.MainPlot.MainPlot)
+ 'Call View.MainPlot.Export.ShowExportDialog(fmt)
End Sub
'Zeitreihen Export
@@ -566,7 +570,8 @@ Friend Class WaveController
'''
'''
Private Sub EditChart_Click(sender As System.Object, e As System.EventArgs)
- Call Steema.TeeChart.Editor.Show(View.TChart1)
+ 'TODO: TChart
+ 'Call Steema.TeeChart.Editor.Show(View.MainPlot)
End Sub
'''
@@ -642,116 +647,117 @@ Friend Class WaveController
'''
Private Sub ShowNaNValues_Click(sender As System.Object, e As System.EventArgs)
- Dim processSeries As Boolean
- Dim nanStart, nanEnd, bandStart, bandEnd As DateTime
- Dim band As Steema.TeeChart.Tools.ColorBand
- Dim color As Drawing.Color
- Dim isNaNPeriod, nanFound, nanFoundInSeries As Boolean
-
- 'set default color
- color = Color.Red
-
- If View.ToolStripButton_ShowNaNValues.Checked Then
- 'Switch visualization of NaN values on
- 'Show color bands for NaN values in the currently active series
- nanFound = False
- For Each ts As TimeSeries In _model.TimeSeries.Values
- processSeries = False
- 'check if time series is currently active
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If series.Title = ts.Title Then
- If series.Active Then
- 'process this series
- processSeries = True
- color = series.Color
- End If
- Exit For
- End If
- Next
- If processSeries Then
- 'log
- Log.AddLogEntry(Log.levels.info, $"Finding NaN values for series {ts.Title}...")
- 'find beginning and end of nan values
- nanFoundInSeries = False
- isNaNPeriod = False
- For i As Integer = 0 To ts.Length - 1
- If Not isNaNPeriod Then
- 'test for start of NaN values
- If Double.IsNaN(ts.Values(i)) Then
- isNaNPeriod = True
- nanFoundInSeries = True
- nanFound = True
- If i = 0 Then
- bandStart = ts.Dates(i)
- Else
- bandStart = ts.Dates(i - 1)
- End If
- nanStart = ts.Dates(i)
-
- If i < ts.Length - 1 Then
- Continue For
- End If
- End If
- End If
- If isNaNPeriod Then
- 'test for end of NaN values
- If Not Double.IsNaN(ts.Values(i)) Then
- bandEnd = ts.Dates(i)
- nanEnd = ts.Dates(i - 1)
- isNaNPeriod = False
-
- ElseIf i = ts.Length - 1 Then
- 'force end if end of time series reached
- bandEnd = ts.Dates(i)
- nanEnd = ts.Dates(i)
- isNaNPeriod = False
-
- End If
-
- If Not isNaNPeriod Then
- 'end of NaN period reached, add a color band
- band = New Steema.TeeChart.Tools.ColorBand()
- View.TChart1.Tools.Add(band)
- band.Axis = View.TChart1.Axes.Bottom
- band.Start = bandStart.ToOADate()
- band.End = bandEnd.ToOADate()
- band.Pen.Visible = False
- band.Pen.Color = color
- band.Brush.Color = ControlPaint.Light(color)
- band.Brush.Transparency = 50
- band.ResizeEnd = False
- band.ResizeStart = False
- band.EndLinePen.Visible = False
- band.StartLinePen.Visible = False
- band.Tag = "NaN"
-
- 'write to log
- Log.AddLogEntry(Log.levels.info, $"Series contains NaN values from {nanStart.ToString(Helpers.CurrentDateFormat)} to {nanEnd.ToString(Helpers.CurrentDateFormat)}")
- End If
- End If
- Next
- If Not nanFoundInSeries Then
- Log.AddLogEntry(Log.levels.info, "Series does not contain any NaN values")
- End If
- End If
- Next
- If Not nanFound Then
- MsgBox("No NaN values found in the currently active series!", MsgBoxStyle.Information)
- View.ToolStripButton_ShowNaNValues.Checked = False
- End If
- Else
- 'Switch visualization of NaN values off
- 'Remove all tools of type ColorBand with Tag "NaN" from TChart1
- Dim nanbands As New List(Of Steema.TeeChart.Tools.ColorBand)
- For Each tool As Steema.TeeChart.Tools.Tool In View.TChart1.Tools
- If tool.GetType Is GetType(Steema.TeeChart.Tools.ColorBand) And tool.Tag = "NaN" Then
- nanbands.Add(tool)
- End If
- Next
- For Each nanband As Steema.TeeChart.Tools.ColorBand In nanbands
- View.TChart1.Tools.Remove(nanband)
- Next
- End If
+ 'TODO: TChart
+ 'Dim processSeries As Boolean
+ 'Dim nanStart, nanEnd, bandStart, bandEnd As DateTime
+ 'Dim band As Steema.TeeChart.Tools.ColorBand
+ 'Dim color As Drawing.Color
+ 'Dim isNaNPeriod, nanFound, nanFoundInSeries As Boolean
+
+ ''set default color
+ 'color = Color.Red
+
+ 'If View.ToolStripButton_ShowNaNValues.Checked Then
+ ' 'Switch visualization of NaN values on
+ ' 'Show color bands for NaN values in the currently active series
+ ' nanFound = False
+ ' For Each ts As TimeSeries In _model.TimeSeries.Values
+ ' processSeries = False
+ ' 'check if time series is currently active
+ ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If series.Title = ts.Title Then
+ ' If series.Active Then
+ ' 'process this series
+ ' processSeries = True
+ ' color = series.Color
+ ' End If
+ ' Exit For
+ ' End If
+ ' Next
+ ' If processSeries Then
+ ' 'log
+ ' Log.AddLogEntry(Log.levels.info, $"Finding NaN values for series {ts.Title}...")
+ ' 'find beginning and end of nan values
+ ' nanFoundInSeries = False
+ ' isNaNPeriod = False
+ ' For i As Integer = 0 To ts.Length - 1
+ ' If Not isNaNPeriod Then
+ ' 'test for start of NaN values
+ ' If Double.IsNaN(ts.Values(i)) Then
+ ' isNaNPeriod = True
+ ' nanFoundInSeries = True
+ ' nanFound = True
+ ' If i = 0 Then
+ ' bandStart = ts.Dates(i)
+ ' Else
+ ' bandStart = ts.Dates(i - 1)
+ ' End If
+ ' nanStart = ts.Dates(i)
+
+ ' If i < ts.Length - 1 Then
+ ' Continue For
+ ' End If
+ ' End If
+ ' End If
+ ' If isNaNPeriod Then
+ ' 'test for end of NaN values
+ ' If Not Double.IsNaN(ts.Values(i)) Then
+ ' bandEnd = ts.Dates(i)
+ ' nanEnd = ts.Dates(i - 1)
+ ' isNaNPeriod = False
+
+ ' ElseIf i = ts.Length - 1 Then
+ ' 'force end if end of time series reached
+ ' bandEnd = ts.Dates(i)
+ ' nanEnd = ts.Dates(i)
+ ' isNaNPeriod = False
+
+ ' End If
+
+ ' If Not isNaNPeriod Then
+ ' 'end of NaN period reached, add a color band
+ ' band = New Steema.TeeChart.Tools.ColorBand()
+ ' View.MainPlot.Tools.Add(band)
+ ' band.Axis = View.MainPlot.Axes.Bottom
+ ' band.Start = bandStart.ToOADate()
+ ' band.End = bandEnd.ToOADate()
+ ' band.Pen.Visible = False
+ ' band.Pen.Color = color
+ ' band.Brush.Color = ControlPaint.Light(color)
+ ' band.Brush.Transparency = 50
+ ' band.ResizeEnd = False
+ ' band.ResizeStart = False
+ ' band.EndLinePen.Visible = False
+ ' band.StartLinePen.Visible = False
+ ' band.Tag = "NaN"
+
+ ' 'write to log
+ ' Log.AddLogEntry(Log.levels.info, $"Series contains NaN values from {nanStart.ToString(Helpers.CurrentDateFormat)} to {nanEnd.ToString(Helpers.CurrentDateFormat)}")
+ ' End If
+ ' End If
+ ' Next
+ ' If Not nanFoundInSeries Then
+ ' Log.AddLogEntry(Log.levels.info, "Series does not contain any NaN values")
+ ' End If
+ ' End If
+ ' Next
+ ' If Not nanFound Then
+ ' MsgBox("No NaN values found in the currently active series!", MsgBoxStyle.Information)
+ ' View.ToolStripButton_ShowNaNValues.Checked = False
+ ' End If
+ 'Else
+ ' 'Switch visualization of NaN values off
+ ' 'Remove all tools of type ColorBand with Tag "NaN" from MainPlot
+ ' Dim nanbands As New List(Of Steema.TeeChart.Tools.ColorBand)
+ ' For Each tool As Steema.TeeChart.Tools.Tool In View.MainPlot.Tools
+ ' If tool.GetType Is GetType(Steema.TeeChart.Tools.ColorBand) And tool.Tag = "NaN" Then
+ ' nanbands.Add(tool)
+ ' End If
+ ' Next
+ ' For Each nanband As Steema.TeeChart.Tools.ColorBand In nanbands
+ ' View.MainPlot.Tools.Remove(nanband)
+ ' Next
+ 'End If
End Sub
'''
@@ -782,45 +788,48 @@ Friend Class WaveController
'''
Private Sub RemoveNaNValues_Click(sender As System.Object, e As System.EventArgs)
- Dim dlgResult As DialogResult
- Dim ids As List(Of Integer)
- Dim ts As TimeSeries
-
- dlgResult = MsgBox("Delete all nodes with NaN values from all series?", MsgBoxStyle.OkCancel)
- If dlgResult = Windows.Forms.DialogResult.OK Then
- ids = _model.TimeSeries.Ids.ToList()
- 'loop over time series
- For Each id As Integer In ids
- 'remove NaN values
- ts = _model.TimeSeries(id)
- ts = ts.removeNaNValues()
- _model.TimeSeries(id) = ts
- 'replace values of series in chart
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If series.Tag = id Then
- series.BeginUpdate()
- series.Clear()
- For Each kvp As KeyValuePair(Of DateTime, Double) In ts.Nodes
- series.Add(kvp.Key, kvp.Value)
- Next
- series.EndUpdate()
- Exit For
- End If
- Next
- Next
- End If
+ 'TODO: TChart
+ 'Dim dlgResult As DialogResult
+ 'Dim ids As List(Of Integer)
+ 'Dim ts As TimeSeries
+
+ 'dlgResult = MsgBox("Delete all nodes with NaN values from all series?", MsgBoxStyle.OkCancel)
+ 'If dlgResult = Windows.Forms.DialogResult.OK Then
+ ' ids = _model.TimeSeries.Ids.ToList()
+ ' 'loop over time series
+ ' For Each id As Integer In ids
+ ' 'remove NaN values
+ ' ts = _model.TimeSeries(id)
+ ' ts = ts.removeNaNValues()
+ ' _model.TimeSeries(id) = ts
+ ' 'replace values of series in chart
+ ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If series.Tag = id Then
+ ' series.BeginUpdate()
+ ' series.Clear()
+ ' For Each kvp As KeyValuePair(Of DateTime, Double) In ts.Nodes
+ ' series.Add(kvp.Key, kvp.Value)
+ ' Next
+ ' series.EndUpdate()
+ ' Exit For
+ ' End If
+ ' Next
+ ' Next
+ 'End If
End Sub
'Drucken
'*******
Private Sub Print_Click(sender As System.Object, e As System.EventArgs)
- Call View.TChart1.Printer.Preview()
+ 'TODO: TChart
+ 'Call View.MainPlot.Printer.Preview()
End Sub
'Kopieren (als PNG)
'******************
Private Sub Copy_Click(sender As System.Object, e As System.EventArgs)
- Call View.TChart1.Export.Image.PNG.CopyToClipboard()
+ 'TODO: TChart
+ 'Call View.MainPlot.Export.Image.PNG.CopyToClipboard()
End Sub
'Analysieren
@@ -872,7 +881,8 @@ Friend Class WaveController
If (oAnalysis.hasResultChart) Then
Dim resultChart As New AnalysisResultChart()
resultChart.Text &= " - " & oAnalysisDialog.selectedAnalysisFunction.ToString()
- resultChart.TChart1.Chart = oAnalysis.getResultChart()
+ 'TODO: TChart
+ 'resultChart.ResultChart.Controls.Add(oAnalysis.getResultChart())
Call resultChart.Show()
End If
@@ -1088,12 +1098,12 @@ Friend Class WaveController
Call Me.ViewportChanged()
Else
'Reset the Y axes to automatic
- View.TChart1.Axes.Left.Automatic = True
- View.TChart1.Axes.Right.Automatic = True
- For Each axis As Steema.TeeChart.Axis In View.TChart1.Axes.Custom
- axis.Automatic = True
+ Dim axes As List(Of ScottPlot.Renderable.Axis)
+ axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ For Each axis As ScottPlot.Renderable.Axis In axes
+ axis.Dims.ResetLimits()
Next
- View.TChart1.Refresh()
+ View.MainPlot.Refresh()
End If
End Sub
@@ -1148,10 +1158,10 @@ Friend Class WaveController
Log.AddLogEntry(Log.levels.info, "Reloading all series from their original datasources...")
'Alle Serien löschen
- View.TChart1.Series.RemoveAllSeries()
- View.TChart2.Series.RemoveAllSeries()
- View.TChart1.Refresh()
- View.TChart2.Refresh()
+ View.MainPlot.Plot.Clear()
+ View.OverviewPlot.Plot.Clear()
+ 'View.MainPlot.Refresh()
+ 'View.OverviewPlot.Refresh()
'Collection zurücksetzen
_model.TimeSeries.Clear()
@@ -1198,9 +1208,10 @@ Friend Class WaveController
'''
'''
Private Sub ActivateAllSeries_Click(sender As Object, e As EventArgs)
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- series.Active = True
- Next
+ 'TODO: TChart
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' series.Active = True
+ 'Next
End Sub
'''
@@ -1209,9 +1220,10 @@ Friend Class WaveController
'''
'''
Private Sub DeactivateAllSeries_Click(sender As Object, e As EventArgs)
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- series.Active = False
- Next
+ 'TODO: TChart
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' series.Active = False
+ 'Next
End Sub
'''
@@ -1478,13 +1490,14 @@ Friend Class WaveController
'collect start and end dates of all currently active series
Dim startdates As New List(Of Double)
Dim enddates As New List(Of Double)
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If Not series.Active Then
- Continue For
- End If
- startdates.Add(series.MinXValue)
- enddates.Add(series.MaxXValue)
- Next
+ 'TODO: TChart
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If Not series.Active Then
+ ' Continue For
+ ' End If
+ ' startdates.Add(series.MinXValue)
+ ' enddates.Add(series.MaxXValue)
+ 'Next
If startdates.Count = 0 Or enddates.Count = 0 Then
'Do nothing
@@ -1543,41 +1556,42 @@ Friend Class WaveController
'''
Private Sub Chart_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- If e.Button = Windows.Forms.MouseButtons.Left Then
- 'start zoom process
- If View.TChart1.Series.Count > 0 Then
+ 'TODO: TChart
+ 'If e.Button = Windows.Forms.MouseButtons.Left Then
+ ' 'start zoom process
+ ' If View.MainPlot.Series.Count > 0 Then
- Dim startValue As Double
- startValue = View.TChart1.Series(0).XScreenToValue(e.X)
+ ' Dim startValue As Double
+ ' startValue = View.MainPlot.Series(0).XScreenToValue(e.X)
- If startValue < View.ChartMinX.ToOADate() Or
- startValue > View.ChartMaxX.ToOADate() Then
- 'click outside of chart, don't start zoom process
- Exit Sub
- End If
+ ' If startValue < View.ChartMinX.ToOADate() Or
+ ' startValue > View.ChartMaxX.ToOADate() Then
+ ' 'click outside of chart, don't start zoom process
+ ' Exit Sub
+ ' End If
- View.TChart1.Cursor = View.cursor_zoom
- Call Me.SaveZoomSnapshot()
+ ' View.MainPlot.Cursor = View.cursor_zoom
+ ' Call Me.SaveZoomSnapshot()
- Me.ChartMouseZoomDragging = True
- Me.ChartMouseDragStartX = e.X
+ ' Me.ChartMouseZoomDragging = True
+ ' Me.ChartMouseDragStartX = e.X
- View.colorBandZoom.Chart = View.TChart1.Chart
- View.colorBandZoom.Active = True
- View.colorBandZoom.Start = startValue
- View.colorBandZoom.End = startValue
+ ' View.colorBandZoom.MainPlot = View.MainPlot.MainPlot
+ ' View.colorBandZoom.Active = True
+ ' View.colorBandZoom.Start = startValue
+ ' View.colorBandZoom.End = startValue
- Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(startValue))
- End If
+ ' Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(startValue))
+ ' End If
- ElseIf e.Button = MouseButtons.Right Then
- 'start pan process
- Me.ChartMousePanning = True
- Me.ChartMouseDragStartX = e.X
- Me.ChartMousePanDisplayRange = View.TChart1.Axes.Bottom.Maximum - View.TChart1.Axes.Bottom.Minimum
- Call Me.SaveZoomSnapshot()
- View.TChart1.Cursor = View.cursor_pan
- End If
+ 'ElseIf e.Button = MouseButtons.Right Then
+ ' 'start pan process
+ ' Me.ChartMousePanning = True
+ ' Me.ChartMouseDragStartX = e.X
+ ' Me.ChartMousePanDisplayRange = View.MainPlot.Axes.Bottom.Maximum - View.MainPlot.Axes.Bottom.Minimum
+ ' Call Me.SaveZoomSnapshot()
+ ' View.MainPlot.Cursor = View.cursor_pan
+ 'End If
End Sub
@@ -1589,32 +1603,33 @@ Friend Class WaveController
'''
Private Sub Chart_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- If Me.ChartMouseZoomDragging Then
- Dim endValue As Double
- endValue = View.TChart1.Series(0).XScreenToValue(e.X)
- View.colorBandZoom.End = endValue
-
- ElseIf Me.ChartMousePanning Then
- Dim xMin, xMax As Double
- Dim panDistance As Double = View.TChart1.Series(0).XScreenToValue(Me.ChartMouseDragStartX) - View.TChart1.Series(0).XScreenToValue(e.X)
- xMin = View.TChart1.Axes.Bottom.Minimum + panDistance
- xMax = View.TChart1.Axes.Bottom.Maximum + panDistance
- 'prevent panning beyond displayable range (#68)
- If xMin < Constants.minOADate.ToOADate() Then
- xMin = Constants.minOADate.ToOADate()
- xMax = xMin + Me.ChartMousePanDisplayRange
- End If
- If xMax > Constants.maxOADate.ToOADate() Then
- xMax = Constants.maxOADate.ToOADate()
- xMin = xMax - Me.ChartMousePanDisplayRange
- End If
- 'set the new viewport
- View.ChartMinX = DateTime.FromOADate(xMin)
- View.ChartMaxX = DateTime.FromOADate(xMax)
- Me.selectionMade = True
- 'update drag start point
- Me.ChartMouseDragStartX = e.X
- End If
+ 'TODO: TChart
+ 'If Me.ChartMouseZoomDragging Then
+ ' Dim endValue As Double
+ ' endValue = View.MainPlot.Series(0).XScreenToValue(e.X)
+ ' View.colorBandZoom.End = endValue
+
+ 'ElseIf Me.ChartMousePanning Then
+ ' Dim xMin, xMax As Double
+ ' Dim panDistance As Double = View.MainPlot.Series(0).XScreenToValue(Me.ChartMouseDragStartX) - View.MainPlot.Series(0).XScreenToValue(e.X)
+ ' xMin = View.MainPlot.Axes.Bottom.Minimum + panDistance
+ ' xMax = View.MainPlot.Axes.Bottom.Maximum + panDistance
+ ' 'prevent panning beyond displayable range (#68)
+ ' If xMin < Constants.minOADate.ToOADate() Then
+ ' xMin = Constants.minOADate.ToOADate()
+ ' xMax = xMin + Me.ChartMousePanDisplayRange
+ ' End If
+ ' If xMax > Constants.maxOADate.ToOADate() Then
+ ' xMax = Constants.maxOADate.ToOADate()
+ ' xMin = xMax - Me.ChartMousePanDisplayRange
+ ' End If
+ ' 'set the new viewport
+ ' View.ChartMinX = DateTime.FromOADate(xMin)
+ ' View.ChartMaxX = DateTime.FromOADate(xMax)
+ ' Me.selectionMade = True
+ ' 'update drag start point
+ ' Me.ChartMouseDragStartX = e.X
+ 'End If
End Sub
'''
@@ -1622,44 +1637,45 @@ Friend Class WaveController
''' Complete any started zoom or pan process, update cursor
'''
Private Sub Chart_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- If Me.ChartMouseZoomDragging Then
- 'complete the zoom process
- Me.ChartMouseZoomDragging = False
- 'only zoom if at least 5 pixels difference to start of drag operation
- If Math.Abs(e.X - Me.ChartMouseDragStartX) > 5 Then
- 'determine start and end dates of zoom
- Dim mouseValue, startValue, endValue As Double
- 'prevent zooming beyond the displayable date range (#68)
- mouseValue = View.TChart1.Series(0).XScreenToValue(e.X)
- mouseValue = Math.Max(mouseValue, Constants.minOADate.ToOADate)
- mouseValue = Math.Min(mouseValue, Constants.maxOADate.ToOADate)
- 'set start and end depending on zoom direction
- If e.X > Me.ChartMouseDragStartX Then
- startValue = View.TChart1.Series(0).XScreenToValue(Me.ChartMouseDragStartX)
- endValue = mouseValue
- Else
- startValue = mouseValue
- endValue = View.TChart1.Series(0).XScreenToValue(Me.ChartMouseDragStartX)
- End If
- Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
-
- 'save the current zoom snapshot
- Call Me.SaveZoomSnapshot()
-
- 'set the new viewport
- View.ChartMinX = DateTime.FromOADate(startValue)
- View.ChartMaxX = DateTime.FromOADate(endValue)
- Me.selectionMade = True
- Call Me.ViewportChanged()
- End If
- 'hide colorband
- View.colorBandZoom.Active = False
- ElseIf Me.ChartMousePanning Then
- 'complete the pan process
- Call Me.ViewportChanged()
- Me.ChartMousePanning = False
- End If
- View.TChart1.Cursor = Cursors.Default
+ 'TODO: TChart
+ 'If Me.ChartMouseZoomDragging Then
+ ' 'complete the zoom process
+ ' Me.ChartMouseZoomDragging = False
+ ' 'only zoom if at least 5 pixels difference to start of drag operation
+ ' If Math.Abs(e.X - Me.ChartMouseDragStartX) > 5 Then
+ ' 'determine start and end dates of zoom
+ ' Dim mouseValue, startValue, endValue As Double
+ ' 'prevent zooming beyond the displayable date range (#68)
+ ' mouseValue = View.MainPlot.Series(0).XScreenToValue(e.X)
+ ' mouseValue = Math.Max(mouseValue, Constants.minOADate.ToOADate)
+ ' mouseValue = Math.Min(mouseValue, Constants.maxOADate.ToOADate)
+ ' 'set start and end depending on zoom direction
+ ' If e.X > Me.ChartMouseDragStartX Then
+ ' startValue = View.MainPlot.Series(0).XScreenToValue(Me.ChartMouseDragStartX)
+ ' endValue = mouseValue
+ ' Else
+ ' startValue = mouseValue
+ ' endValue = View.MainPlot.Series(0).XScreenToValue(Me.ChartMouseDragStartX)
+ ' End If
+ ' Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
+
+ ' 'save the current zoom snapshot
+ ' Call Me.SaveZoomSnapshot()
+
+ ' 'set the new viewport
+ ' View.ChartMinX = DateTime.FromOADate(startValue)
+ ' View.ChartMaxX = DateTime.FromOADate(endValue)
+ ' Me.selectionMade = True
+ ' Call Me.ViewportChanged()
+ ' End If
+ ' 'hide colorband
+ ' View.colorBandZoom.Active = False
+ 'ElseIf Me.ChartMousePanning Then
+ ' 'complete the pan process
+ ' Call Me.ViewportChanged()
+ ' Me.ChartMousePanning = False
+ 'End If
+ 'View.MainPlot.Cursor = Cursors.Default
End Sub
'''
@@ -1669,46 +1685,47 @@ Friend Class WaveController
'''
Private Sub Chart_MouseWheel(sender As Object, e As MouseEventArgs)
- Try
- ' Update the drawing based upon the mouse wheel scrolling.
- ' "The UI should scroll when the accumulated delta is plus or minus 120.
- ' The UI should scroll the number of logical lines returned by the
- ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
- 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
- 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
- Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
-
- 'zoom while centering on mouse
- Dim currentExtent As TimeSpan = View.ChartMaxX - View.ChartMinX
- Dim newExtent As Long
- If numberOfTextLinesToMove > 0 Then
- 'zoom in 25%
- newExtent = currentExtent.Ticks * 0.75
- Else
- 'zoom out 25%
- newExtent = currentExtent.Ticks * 1.25
- End If
+ 'TODO: TChart
+ 'Try
+ ' ' Update the drawing based upon the mouse wheel scrolling.
+ ' ' "The UI should scroll when the accumulated delta is plus or minus 120.
+ ' ' The UI should scroll the number of logical lines returned by the
+ ' ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
+ ' 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
+ ' 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
+ ' Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
- 'determine mouse position and its left-right ratio in relation to x axis
- Dim centerOADate As Double = View.TChart1.Series(0).XScreenToValue(e.X)
- Dim centerDate As DateTime = DateTime.FromOADate(centerOADate)
- Dim leftRatio As Double = (centerDate - View.ChartMinX).Ticks / currentExtent.Ticks
- Dim rightRatio As Double = 1 - leftRatio
+ ' 'zoom while centering on mouse
+ ' Dim currentExtent As TimeSpan = View.ChartMaxX - View.ChartMinX
+ ' Dim newExtent As Long
+ ' If numberOfTextLinesToMove > 0 Then
+ ' 'zoom in 25%
+ ' newExtent = currentExtent.Ticks * 0.75
+ ' Else
+ ' 'zoom out 25%
+ ' newExtent = currentExtent.Ticks * 1.25
+ ' End If
- 'save the current zoom snapshot
- Call Me.SaveZoomSnapshot()
+ ' 'determine mouse position and its left-right ratio in relation to x axis
+ ' Dim centerOADate As Double = View.MainPlot.Series(0).XScreenToValue(e.X)
+ ' Dim centerDate As DateTime = DateTime.FromOADate(centerOADate)
+ ' Dim leftRatio As Double = (centerDate - View.ChartMinX).Ticks / currentExtent.Ticks
+ ' Dim rightRatio As Double = 1 - leftRatio
- 'set new viewport
- View.ChartMinX = centerDate - New TimeSpan(ticks:=newExtent * leftRatio)
- View.ChartMaxX = centerDate + New TimeSpan(ticks:=newExtent * rightRatio)
+ ' 'save the current zoom snapshot
+ ' Call Me.SaveZoomSnapshot()
- Me.selectionMade = True
- Call Me.ViewportChanged()
+ ' 'set new viewport
+ ' View.ChartMinX = centerDate - New TimeSpan(ticks:=newExtent * leftRatio)
+ ' View.ChartMaxX = centerDate + New TimeSpan(ticks:=newExtent * rightRatio)
- Catch ex As ArgumentOutOfRangeException
- 'can happen when zooming out too far, TimeSpan becomes too big or DateTime is not representable
- Log.AddLogEntry(levels.debug, $"Exception in Chart_MouseWheel: {ex}")
- End Try
+ ' Me.selectionMade = True
+ ' Call Me.ViewportChanged()
+
+ 'Catch ex As ArgumentOutOfRangeException
+ ' 'can happen when zooming out too far, TimeSpan becomes too big or DateTime is not representable
+ ' Log.AddLogEntry(levels.debug, $"Exception in Chart_MouseWheel: {ex}")
+ 'End Try
End Sub
@@ -1720,40 +1737,40 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseDown(sender As Object, e As MouseEventArgs)
- If View.TChart2.Series.Count > 0 Then
+ 'If View.OverviewPlot.Series.Count > 0 Then
- If e.Button = MouseButtons.Left Then
- 'start zoom process
+ ' If e.Button = MouseButtons.Left Then
+ ' 'start zoom process
- View.TChart2.Cursor = View.cursor_zoom
+ ' View.OverviewPlot.Cursor = View.cursor_zoom
- Me.OverviewChartMouseDragging = True
- Me.OverviewChartMouseDragStartX = e.X
+ ' Me.OverviewChartMouseDragging = True
+ ' Me.OverviewChartMouseDragStartX = e.X
- 'set start and end value of colorband to mouse position
- Dim xMouse As Double
- xMouse = View.TChart2.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
+ ' 'set start and end value of colorband to mouse position
+ ' Dim xMouse As Double
+ ' xMouse = View.OverviewPlot.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
- 'prevent zoom starting beyond displayable date range (#68)
- xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
- xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
+ ' 'prevent zoom starting beyond displayable date range (#68)
+ ' xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
+ ' xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
- View.colorBandOverview.Start = xMouse
- View.colorBandOverview.End = xMouse
+ ' View.colorBandOverview.Start = xMouse
+ ' View.colorBandOverview.End = xMouse
- Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(xMouse))
+ ' Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(xMouse))
- ElseIf e.Button = MouseButtons.Right Then
- 'start panning process
+ ' ElseIf e.Button = MouseButtons.Right Then
+ ' 'start panning process
- View.TChart2.Cursor = View.cursor_pan
+ ' View.OverviewPlot.Cursor = View.cursor_pan
- Me.OverviewChartMouseDragging = True
- Me.OverviewChartMouseDragStartX = e.X
- Me.OverviewChartMouseDragOffset = e.X - View.TChart2.Series(0).ValuePointToScreenPoint(View.colorBandOverview.Start, 0).X
+ ' Me.OverviewChartMouseDragging = True
+ ' Me.OverviewChartMouseDragStartX = e.X
+ ' Me.OverviewChartMouseDragOffset = e.X - View.OverviewPlot.Series(0).ValuePointToScreenPoint(View.colorBandOverview.Start, 0).X
- End If
- End If
+ ' End If
+ 'End If
End Sub
'''
@@ -1764,40 +1781,41 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseMove(sender As Object, e As MouseEventArgs)
- If Me.OverviewChartMouseDragging Then
+ 'TODO: TChart
+ 'If Me.OverviewChartMouseDragging Then
- If e.Button = MouseButtons.Left Then
- 'move the end of the colorband to the mouse pointer
- Dim xMouse As Double = View.TChart2.Series(0).XScreenToValue(e.X)
+ ' If e.Button = MouseButtons.Left Then
+ ' 'move the end of the colorband to the mouse pointer
+ ' Dim xMouse As Double = View.OverviewPlot.Series(0).XScreenToValue(e.X)
- 'restrict to displayable date range (#68)
- xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
- xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
+ ' 'restrict to displayable date range (#68)
+ ' xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
+ ' xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
- View.colorBandOverview.End = xMouse
+ ' View.colorBandOverview.End = xMouse
- ElseIf e.Button = MouseButtons.Right Then
- 'move the whole color band while maintaining its width
- Dim width As Double = View.colorBandOverview.End - View.colorBandOverview.Start
+ ' ElseIf e.Button = MouseButtons.Right Then
+ ' 'move the whole color band while maintaining its width
+ ' Dim width As Double = View.colorBandOverview.End - View.colorBandOverview.Start
- Dim startValue, endValue As Double
- startValue = View.TChart2.Series(0).XScreenToValue(e.X - Me.OverviewChartMouseDragOffset)
- endValue = startValue + width
+ ' Dim startValue, endValue As Double
+ ' startValue = View.OverviewPlot.Series(0).XScreenToValue(e.X - Me.OverviewChartMouseDragOffset)
+ ' endValue = startValue + width
- 'restrict to displayable date range (#68)
- If startValue < Constants.minOADate.ToOADate Then
- startValue = Constants.minOADate.ToOADate
- endValue = startValue + width
- End If
- If endValue > Constants.maxOADate.ToOADate Then
- endValue = Constants.maxOADate.ToOADate
- startValue = endValue - width
- End If
+ ' 'restrict to displayable date range (#68)
+ ' If startValue < Constants.minOADate.ToOADate Then
+ ' startValue = Constants.minOADate.ToOADate
+ ' endValue = startValue + width
+ ' End If
+ ' If endValue > Constants.maxOADate.ToOADate Then
+ ' endValue = Constants.maxOADate.ToOADate
+ ' startValue = endValue - width
+ ' End If
- View.colorBandOverview.Start = startValue
- View.colorBandOverview.End = endValue
- End If
- End If
+ ' View.colorBandOverview.Start = startValue
+ ' View.colorBandOverview.End = endValue
+ ' End If
+ 'End If
End Sub
'''
@@ -1808,61 +1826,62 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- View.TChart2.Cursor = Cursors.Default
+ 'TODO: TChart
+ 'View.OverviewPlot.Cursor = Cursors.Default
- If Me.OverviewChartMouseDragging Then
+ 'If Me.OverviewChartMouseDragging Then
- Me.OverviewChartMouseDragging = False
+ ' Me.OverviewChartMouseDragging = False
- If e.Button = MouseButtons.Left Then
- 'complete the zoom process
+ ' If e.Button = MouseButtons.Left Then
+ ' 'complete the zoom process
- 'determine start and end of zoom
- If e.X <> Me.OverviewChartMouseDragStartX Then
- 'set start and end depending on zoom direction
- Dim startValue, endValue As Double
- If e.X > Me.OverviewChartMouseDragStartX Then
- startValue = View.TChart2.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
- endValue = View.TChart2.Series(0).XScreenToValue(e.X)
- Else
- startValue = View.TChart2.Series(0).XScreenToValue(e.X)
- endValue = View.TChart2.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
- End If
- 'restrict to displayable date range (#68)
- startValue = Math.Max(startValue, Constants.minOADate.ToOADate)
- endValue = Math.Min(endValue, Constants.maxOADate.ToOADate)
+ ' 'determine start and end of zoom
+ ' If e.X <> Me.OverviewChartMouseDragStartX Then
+ ' 'set start and end depending on zoom direction
+ ' Dim startValue, endValue As Double
+ ' If e.X > Me.OverviewChartMouseDragStartX Then
+ ' startValue = View.OverviewPlot.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
+ ' endValue = View.OverviewPlot.Series(0).XScreenToValue(e.X)
+ ' Else
+ ' startValue = View.OverviewPlot.Series(0).XScreenToValue(e.X)
+ ' endValue = View.OverviewPlot.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
+ ' End If
+ ' 'restrict to displayable date range (#68)
+ ' startValue = Math.Max(startValue, Constants.minOADate.ToOADate)
+ ' endValue = Math.Min(endValue, Constants.maxOADate.ToOADate)
- Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
+ ' Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
- 'adjust colorband
- View.colorBandOverview.Start = startValue
- View.colorBandOverview.End = endValue
+ ' 'adjust colorband
+ ' View.colorBandOverview.Start = startValue
+ ' View.colorBandOverview.End = endValue
- 'save the current zoom snapshot
- Call Me.SaveZoomSnapshot()
+ ' 'save the current zoom snapshot
+ ' Call Me.SaveZoomSnapshot()
- 'set the new viewport on the main chart
- View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
- View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
+ ' 'set the new viewport on the main chart
+ ' View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
+ ' View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
- Me.selectionMade = True
- Call Me.ViewportChanged()
- End If
+ ' Me.selectionMade = True
+ ' Call Me.ViewportChanged()
+ ' End If
- ElseIf e.Button = MouseButtons.Right Then
- 'complete the pan process
+ ' ElseIf e.Button = MouseButtons.Right Then
+ ' 'complete the pan process
- 'save the current zoom snapshot
- Call Me.SaveZoomSnapshot()
+ ' 'save the current zoom snapshot
+ ' Call Me.SaveZoomSnapshot()
- 'set the new viewport on the main chart
- View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
- View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
+ ' 'set the new viewport on the main chart
+ ' View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
+ ' View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
- Me.selectionMade = True
- Call Me.ViewportChanged()
- End If
- End If
+ ' Me.selectionMade = True
+ ' Call Me.ViewportChanged()
+ ' End If
+ 'End If
End Sub
'''
@@ -1872,77 +1891,79 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseWheel(sender As Object, e As MouseEventArgs)
- Try
- ' Update the drawing based upon the mouse wheel scrolling.
- ' "The UI should scroll when the accumulated delta is plus or minus 120.
- ' The UI should scroll the number of logical lines returned by the
- ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
- 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
- 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
- Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
-
- If numberOfTextLinesToMove = 0 Then
- Exit Sub
- End If
-
- 'zoom while centering on mouse
- Dim newStart As Double
- Dim newEnd As Double
- Dim mouseOADate As Double = View.TChart2.Series(0).XScreenToValue(e.X)
- Dim currentExtent As Double = View.colorBandOverview.End - View.colorBandOverview.Start
-
- If mouseOADate >= View.colorBandOverview.Start And mouseOADate <= View.colorBandOverview.End Then
- 'zoom by 25% if mouse is inside color band
- Dim newExtent As Double
- If numberOfTextLinesToMove > 0 Then
- newExtent = currentExtent * 0.75
- Else
- newExtent = currentExtent * 1.25
- End If
-
- 'set new viewport, centering on mouse
- newStart = mouseOADate - (newExtent / 2)
- newEnd = mouseOADate + (newExtent / 2)
-
- Else
- 'pan by 25% of current extent if mouse is outside of color band
- Dim delta As Double = currentExtent * 0.25
- If mouseOADate > View.colorBandOverview.End Then
- 'pan right
- newStart = View.colorBandOverview.Start + delta
- newEnd = View.colorBandOverview.End + delta
- Else
- 'pan left
- newStart = View.colorBandOverview.Start - delta
- newEnd = View.colorBandOverview.End - delta
- End If
- End If
-
- 'set the new colorband
- View.colorBandOverview.Start = newStart
- View.colorBandOverview.End = newEnd
-
- 'save the current zoom snapshot
- Call Me.SaveZoomSnapshot()
-
- 'set the new viewport on the main chart
- View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
- View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
-
- Me.selectionMade = True
- Call Me.ViewportChanged()
-
- Catch ex As ArgumentException
- 'can happen when zooming out too far, invalid OADate
- Log.AddLogEntry(levels.debug, $"Exception in OverviewChart_MouseWheel: {ex}")
- End Try
+ 'TODO: TChart
+ 'Try
+ ' ' Update the drawing based upon the mouse wheel scrolling.
+ ' ' "The UI should scroll when the accumulated delta is plus or minus 120.
+ ' ' The UI should scroll the number of logical lines returned by the
+ ' ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
+ ' 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
+ ' 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
+ ' Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
+
+ ' If numberOfTextLinesToMove = 0 Then
+ ' Exit Sub
+ ' End If
+
+ ' 'zoom while centering on mouse
+ ' Dim newStart As Double
+ ' Dim newEnd As Double
+ ' Dim mouseOADate As Double = View.OverviewPlot.Series(0).XScreenToValue(e.X)
+ ' Dim currentExtent As Double = View.colorBandOverview.End - View.colorBandOverview.Start
+
+ ' If mouseOADate >= View.colorBandOverview.Start And mouseOADate <= View.colorBandOverview.End Then
+ ' 'zoom by 25% if mouse is inside color band
+ ' Dim newExtent As Double
+ ' If numberOfTextLinesToMove > 0 Then
+ ' newExtent = currentExtent * 0.75
+ ' Else
+ ' newExtent = currentExtent * 1.25
+ ' End If
+
+ ' 'set new viewport, centering on mouse
+ ' newStart = mouseOADate - (newExtent / 2)
+ ' newEnd = mouseOADate + (newExtent / 2)
+
+ ' Else
+ ' 'pan by 25% of current extent if mouse is outside of color band
+ ' Dim delta As Double = currentExtent * 0.25
+ ' If mouseOADate > View.colorBandOverview.End Then
+ ' 'pan right
+ ' newStart = View.colorBandOverview.Start + delta
+ ' newEnd = View.colorBandOverview.End + delta
+ ' Else
+ ' 'pan left
+ ' newStart = View.colorBandOverview.Start - delta
+ ' newEnd = View.colorBandOverview.End - delta
+ ' End If
+ ' End If
+
+ ' 'set the new colorband
+ ' View.colorBandOverview.Start = newStart
+ ' View.colorBandOverview.End = newEnd
+
+ ' 'save the current zoom snapshot
+ ' Call Me.SaveZoomSnapshot()
+
+ ' 'set the new viewport on the main chart
+ ' View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
+ ' View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
+
+ ' Me.selectionMade = True
+ ' Call Me.ViewportChanged()
+
+ 'Catch ex As ArgumentException
+ ' 'can happen when zooming out too far, invalid OADate
+ ' Log.AddLogEntry(levels.debug, $"Exception in OverviewChart_MouseWheel: {ex}")
+ 'End Try
End Sub
'TChart2 DoubleClick
'*******************
Private Sub OverviewChart_DoubleClick(sender As System.Object, e As System.EventArgs)
- Call Steema.TeeChart.Editor.Show(View.TChart2)
+ 'TODO: TChart
+ 'Call Steema.TeeChart.Editor.Show(View.OverviewPlot)
End Sub
'''
@@ -1983,65 +2004,66 @@ Friend Class WaveController
'Auto-adjust Y-axes to current viewport
If View.AutoAdjustYAxes Then
- Dim startdate, enddate As DateTime
- Dim title As String
- Dim seriesMin, seriesMax, Ymin, Ymax As Double
- Dim axisType As Steema.TeeChart.Styles.VerticalAxis
- Dim axis As Steema.TeeChart.Axis
-
- 'get start and end date of current viewport
- startdate = View.ChartMinX
- enddate = View.ChartMaxX
-
- 'define axes to process
- Dim axes As New List(Of (axisType As Steema.TeeChart.Styles.VerticalAxis, axis As Steema.TeeChart.Axis))
- axes.Add((Steema.TeeChart.Styles.VerticalAxis.Left, View.TChart1.Axes.Left))
- axes.Add((Steema.TeeChart.Styles.VerticalAxis.Right, View.TChart1.Axes.Right))
- For Each axis In View.TChart1.Axes.Custom
- axes.Add((Steema.TeeChart.Styles.VerticalAxis.Custom, axis))
- Next
-
- 'loop over Y-axes
- For Each t As (axisType As Steema.TeeChart.Styles.VerticalAxis, axis As Steema.TeeChart.Axis) In axes
- axisType = t.axisType
- axis = t.axis
-
- 'loop over series
- Ymin = Double.MaxValue
- Ymax = Double.MinValue
- For Each ts As TimeSeries In _model.TimeSeries.Values
- title = ts.Title
-
- 'only process active series on the current axis
- If View.TChart1.Series.WithTitle(title).Active And View.TChart1.Series.WithTitle(title).VertAxis = axisType Then
-
- If axisType = Steema.TeeChart.Styles.VerticalAxis.Custom And ts.Unit <> axis.Tag Then
- 'series is on a different custom axis, skip it
- Continue For
- End If
-
- 'get series min and max for current viewport
- seriesMin = ts.Minimum(startdate, enddate)
- If seriesMin < Ymin Then
- Ymin = seriesMin
- End If
- seriesMax = ts.Maximum(startdate, enddate)
- If seriesMax > Ymax Then
- Ymax = seriesMax
- End If
- End If
- Next
-
- 'set new Y axis bounds
- If Ymin < Double.MaxValue Then
- axis.AutomaticMinimum = False
- axis.Minimum = Ymin
- End If
- If Ymax > Double.MinValue Then
- axis.AutomaticMaximum = False
- axis.Maximum = Ymax
- End If
- Next
+ 'TODO: TChart
+ 'Dim startdate, enddate As DateTime
+ 'Dim title As String
+ 'Dim seriesMin, seriesMax, Ymin, Ymax As Double
+ 'Dim axisType As Steema.TeeChart.Styles.VerticalAxis
+ 'Dim axis As Steema.TeeChart.Axis
+
+ ''get start and end date of current viewport
+ 'startdate = View.ChartMinX
+ 'enddate = View.ChartMaxX
+
+ ''define axes to process
+ 'Dim axes As New List(Of (axisType As Steema.TeeChart.Styles.VerticalAxis, axis As Steema.TeeChart.Axis))
+ 'axes.Add((Steema.TeeChart.Styles.VerticalAxis.Left, View.MainPlot.Axes.Left))
+ 'axes.Add((Steema.TeeChart.Styles.VerticalAxis.Right, View.MainPlot.Axes.Right))
+ 'For Each axis In View.MainPlot.Axes.Custom
+ ' axes.Add((Steema.TeeChart.Styles.VerticalAxis.Custom, axis))
+ 'Next
+
+ ''loop over Y-axes
+ 'For Each t As (axisType As Steema.TeeChart.Styles.VerticalAxis, axis As Steema.TeeChart.Axis) In axes
+ ' axisType = t.axisType
+ ' axis = t.axis
+
+ ' 'loop over series
+ ' Ymin = Double.MaxValue
+ ' Ymax = Double.MinValue
+ ' For Each ts As TimeSeries In _model.TimeSeries.Values
+ ' title = ts.Title
+
+ ' 'only process active series on the current axis
+ ' If View.MainPlot.Series.WithTitle(title).Active And View.MainPlot.Series.WithTitle(title).VertAxis = axisType Then
+
+ ' If axisType = Steema.TeeChart.Styles.VerticalAxis.Custom And ts.Unit <> axis.Tag Then
+ ' 'series is on a different custom axis, skip it
+ ' Continue For
+ ' End If
+
+ ' 'get series min and max for current viewport
+ ' seriesMin = ts.Minimum(startdate, enddate)
+ ' If seriesMin < Ymin Then
+ ' Ymin = seriesMin
+ ' End If
+ ' seriesMax = ts.Maximum(startdate, enddate)
+ ' If seriesMax > Ymax Then
+ ' Ymax = seriesMax
+ ' End If
+ ' End If
+ ' Next
+
+ ' 'set new Y axis bounds
+ ' If Ymin < Double.MaxValue Then
+ ' axis.AutomaticMinimum = False
+ ' axis.Minimum = Ymin
+ ' End If
+ ' If Ymax > Double.MinValue Then
+ ' axis.AutomaticMaximum = False
+ ' axis.Maximum = Ymax
+ ' End If
+ 'Next
End If
End Sub
@@ -2144,8 +2166,8 @@ Friend Class WaveController
If (_model.TimeSeries.Count = 0) Then
'just refresh
- View.TChart1.Refresh()
- View.TChart2.Refresh()
+ View.MainPlot.Refresh()
+ View.OverviewPlot.Refresh()
Else
'Update X-Axis and colorBand
@@ -2171,8 +2193,7 @@ Friend Class WaveController
End If
'Übersicht neu skalieren
- View.TChart2.Axes.Bottom.Minimum = Xmin.ToOADate()
- View.TChart2.Axes.Bottom.Maximum = Xmax.ToOADate()
+ View.OverviewPlot.Plot.XAxis.Dims.SetAxis(min:=Xmin.ToOADate(), max:=Xmax.ToOADate())
If (Not Me.selectionMade) Then
'Wenn noch nicht gezoomed wurde, Gesamtzeitraum auswählen
@@ -2182,6 +2203,9 @@ Friend Class WaveController
'Extent auf Colorband übertragen
Call Me.UpdateOverviewZoomExtent()
+ 'TODO: Update Y-Axis extents
+ 'View.OverviewPlot.Plot.YAxis.Dims.
+
End If
End Sub
@@ -2191,8 +2215,9 @@ Friend Class WaveController
'''
'''
Private Sub UpdateOverviewZoomExtent()
- View.colorBandOverview.Start = View.ChartMinX.ToOADate()
- View.colorBandOverview.End = View.ChartMaxX.ToOADate()
+ 'TODO: TChart
+ 'View.colorBandOverview.Start = View.ChartMinX.ToOADate()
+ 'View.colorBandOverview.End = View.ChartMaxX.ToOADate()
End Sub
'''
@@ -2239,61 +2264,59 @@ Friend Class WaveController
'Serie zu Diagramm hinzufügen
'Linien instanzieren
- Dim Line1 As New Steema.TeeChart.Styles.Line(View.TChart1.Chart)
+ Dim Line1 As ScottPlot.Plottable.ScatterPlot
+ Line1 = View.MainPlot.Plot.AddScatter(ts.Dates.Select(Function(t As DateTime) t.ToOADate()).ToArray(), ts.Values.ToArray())
'Do not paint NaN values
- Line1.TreatNaNAsNull = True
- Line1.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
-
- 'X-Werte als Zeitdaten einstellen
- Line1.XValues.DateTime = True
+ Line1.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
'Store id as Tag property
- Line1.Tag = ts.Id
+ 'TODO: TChart
+ 'Line1.Tag = ts.Id
'Namen vergeben
- Line1.Title = ts.Title
+ Line1.Label = ts.Title
'set display options
If Not ts.DisplayOptions.Color.IsEmpty Then
Line1.Color = ts.DisplayOptions.Color
End If
- Line1.LinePen.Style = ts.DisplayOptions.LineStyle
- Line1.LinePen.Width = ts.DisplayOptions.LineWidth
- Line1.Pointer.Visible = ts.DisplayOptions.ShowPoints
-
- 'Stützstellen zur Serie hinzufügen
- 'Main chart
- Line1.BeginUpdate()
- Line1.Add(ts.Dates.ToArray(), ts.Values.ToArray())
- Line1.EndUpdate()
-
- 'Add series to overview chart
- Call Me.AddSeriesToOverview(ts)
-
- 'Determine total number of NaN-values and write to log
- If ts.NaNCount > 0 Then
- Log.AddLogEntry(Log.levels.warning, $"Series '{ts.Title}' contains {ts.NaNCount} NaN values!")
+ Line1.LineStyle = ts.DisplayOptions.LineStyle
+ Line1.LineWidth = ts.DisplayOptions.LineWidth
+ If Not ts.DisplayOptions.ShowPoints Then
+ Line1.MarkerShape = ScottPlot.MarkerShape.none
End If
+ 'TODO: TChart
'Y-Achsenzuordnung
- assignSeriesToAxis(Line1, ts.Unit)
+ 'assignSeriesToAxis(Line1, ts.Unit)
'Interpretation
Select Case ts.Interpretation
Case TimeSeries.InterpretationEnum.BlockRight
- Line1.Stairs = True
+ Line1.StepDisplay = True
+ Line1.StepDisplayRight = True
Case TimeSeries.InterpretationEnum.BlockLeft,
TimeSeries.InterpretationEnum.CumulativePerTimestep
- Line1.Stairs = True
- Line1.InvertedStairs = True
+ Line1.StepDisplay = True
+ Line1.StepDisplayRight = False
End Select
+ 'Add series to overview chart
+ Call Me.AddSeriesToOverview(ts)
+
'Charts aktualisieren
Call Me.UpdateChartExtents()
Call Me.ViewportChanged()
+ View.MainPlot.Refresh()
+
+ 'Determine total number of NaN-values and write to log
+ If ts.NaNCount > 0 Then
+ Log.AddLogEntry(Log.levels.warning, $"Series '{ts.Title}' contains {ts.NaNCount} NaN values!")
+ End If
+
End Sub
'''
@@ -2302,57 +2325,58 @@ Friend Class WaveController
''' the TimeSeries to add
Private Sub AddSeriesToOverview(ts As TimeSeries)
- 'Linien instanzieren
- Dim Line2 As New Steema.TeeChart.Styles.FastLine(View.TChart2.Chart)
-
- 'Do not paint NaN values
- Line2.TreatNaNAsNull = True
- Line2.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
-
- 'X-Werte als Zeitdaten einstellen
- Line2.XValues.DateTime = True
-
- 'Store id as Tag property
- Line2.Tag = ts.Id
-
- 'Namen vergeben
- Line2.Title = ts.Title
-
- 'set display options
- If Not ts.DisplayOptions.Color.IsEmpty Then
- Line2.Color = ts.DisplayOptions.Color
- End If
- Line2.LinePen.Style = ts.DisplayOptions.LineStyle
- Line2.LinePen.Width = ts.DisplayOptions.LineWidth
-
- 'Stützstellen zur Serie hinzufügen
- Line2.BeginUpdate()
- If Double.IsNaN(ts.FirstValue) Then
- 'TeeChart throws an OverflowException when attempting to display a FastLine that begins with a NaN value as a step function!
- 'To avoid this we generally do not add NaN values at the beginning of the time series to the FastLine (#67)
- Dim isNaN As Boolean = True
- For Each node As KeyValuePair(Of DateTime, Double) In ts.Nodes
- If isNaN Then
- isNaN = isNaN And Double.IsNaN(node.Value)
- End If
- If Not isNaN Then
- Line2.Add(node.Key, node.Value)
- End If
- Next
- Else
- Line2.Add(ts.Dates.ToArray(), ts.Values.ToArray())
- End If
- Line2.EndUpdate()
-
- 'Interpretation
- Select Case ts.Interpretation
- Case TimeSeries.InterpretationEnum.BlockRight
- Line2.Stairs = True
- Case TimeSeries.InterpretationEnum.BlockLeft,
- TimeSeries.InterpretationEnum.CumulativePerTimestep
- Line2.Stairs = True
- Line2.InvertedStairs = True
- End Select
+ 'TODO: TChart
+ ''Linien instanzieren
+ 'Dim Line2 As New Steema.TeeChart.Styles.FastLine(View.TChart2.Chart)
+
+ ''Do not paint NaN values
+ 'Line2.TreatNaNAsNull = True
+ 'Line2.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
+
+ ''X-Werte als Zeitdaten einstellen
+ 'Line2.XValues.DateTime = True
+
+ ''Store id as Tag property
+ 'Line2.Tag = ts.Id
+
+ ''Namen vergeben
+ 'Line2.Title = ts.Title
+
+ ''set display options
+ 'If Not ts.DisplayOptions.Color.IsEmpty Then
+ ' Line2.Color = ts.DisplayOptions.Color
+ 'End If
+ 'Line2.LinePen.Style = ts.DisplayOptions.LineStyle
+ 'Line2.LinePen.Width = ts.DisplayOptions.LineWidth
+
+ ''Stützstellen zur Serie hinzufügen
+ 'Line2.BeginUpdate()
+ 'If Double.IsNaN(ts.FirstValue) Then
+ ' 'TeeChart throws an OverflowException when attempting to display a FastLine that begins with a NaN value as a step function!
+ ' 'To avoid this we generally do not add NaN values at the beginning of the time series to the FastLine (#67)
+ ' Dim isNaN As Boolean = True
+ ' For Each node As KeyValuePair(Of DateTime, Double) In ts.Nodes
+ ' If isNaN Then
+ ' isNaN = isNaN And Double.IsNaN(node.Value)
+ ' End If
+ ' If Not isNaN Then
+ ' Line2.Add(node.Key, node.Value)
+ ' End If
+ ' Next
+ 'Else
+ ' Line2.Add(ts.Dates.ToArray(), ts.Values.ToArray())
+ 'End If
+ 'Line2.EndUpdate()
+
+ ''Interpretation
+ 'Select Case ts.Interpretation
+ ' Case TimeSeries.InterpretationEnum.BlockRight
+ ' Line2.Stairs = True
+ ' Case TimeSeries.InterpretationEnum.BlockLeft,
+ ' TimeSeries.InterpretationEnum.CumulativePerTimestep
+ ' Line2.Stairs = True
+ ' Line2.InvertedStairs = True
+ 'End Select
End Sub
@@ -2383,74 +2407,71 @@ Friend Class WaveController
''' Assigns a series to the appropriate axis depending on its unit
''' If no axis exists for the given unit, a new axis is created
'''
+ ''' The series
''' The unit
- Private Sub assignSeriesToAxis(ByRef series As Steema.TeeChart.Styles.Series, unit As String)
+ Private Sub assignSeriesToAxis(ByRef series As ScottPlot.Plottable.IPlottable, unit As String)
+
+ 'TODO: for now, assign series to axes by matching the axis label to the unit
- If IsNothing(View.TChart1.Axes.Left.Tag) Then
+ If IsNothing(View.MainPlot.Plot.YAxis) Then
'use left axis for the first time
- View.TChart1.Axes.Left.Title.Text = unit
- View.TChart1.Axes.Left.Tag = unit
- View.TChart1.Axes.Left.Visible = True
- View.TChart1.Axes.Left.Automatic = True
- View.TChart1.Axes.Left.MaximumOffset = 5
- series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left
-
- ElseIf View.TChart1.Axes.Left.Tag = unit Then
+ View.MainPlot.Plot.YAxis.AxisLabel.Label = unit
+ 'TODO: TChart
+ 'View.MainPlot.Plot.YAxis.Tag = unit
+ View.MainPlot.Plot.YAxis.IsVisible = True
+ View.MainPlot.Plot.YAxis.LockLimits(False)
+ 'View.MainPlot.Plot.YAxis.MaximumOffset = 5
+ series.YAxisIndex = 0
+
+ ElseIf View.MainPlot.Plot.YAxis.AxisLabel.Label = unit Then
'reuse left axis
- series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Left
+ series.YAxisIndex = 0
- ElseIf IsNothing(View.TChart1.Axes.Right.Tag) Then
+ ElseIf IsNothing(View.MainPlot.Plot.YAxis2) Then
'use right axis for the first time
- View.TChart1.Axes.Right.Title.Text = unit
- View.TChart1.Axes.Right.Tag = unit
- View.TChart1.Axes.Right.Visible = True
- View.TChart1.Axes.Right.Automatic = True
- View.TChart1.Axes.Right.MaximumOffset = 5
- series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right
-
- ElseIf View.TChart1.Axes.Right.Tag = unit Then
+ View.MainPlot.Plot.YAxis2.AxisLabel.Label = unit
+ 'TODO: TChart
+ 'View.MainPlot.Plot.YAxis2.Tag = unit
+ View.MainPlot.Plot.YAxis2.IsVisible = True
+ View.MainPlot.Plot.YAxis2.LockLimits(False)
+ 'View.MainPlot.Plot.YAxis2.MaximumOffset = 5
+ series.YAxisIndex = 1
+
+ ElseIf View.MainPlot.Plot.YAxis2.AxisLabel.Label = unit Then
'reuse right axis
- series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right
+ series.YAxisIndex = 1
Else
'check for reusable custom axes
+ Dim axes As IEnumerable(Of ScottPlot.Renderable.Axis)
+ axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+
Dim axisFound As Boolean = False
- For Each axis As Steema.TeeChart.Axis In View.TChart1.Axes.Custom
- If axis.Tag = unit Then
- series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom
- series.CustomVertAxis = axis
+ For Each axis As ScottPlot.Renderable.Axis In axes
+ If axis.AxisLabel.Label = unit Then
+ series.YAxisIndex = axis.AxisIndex
axisFound = True
Exit For
End If
Next
If Not axisFound Then
'create a new custom axis
- Dim axis As Steema.TeeChart.Axis
- Dim number As Integer = View.TChart1.Axes.Custom.Count + 1
- axis = New Steema.TeeChart.Axis(View.TChart1.Chart)
- View.TChart1.Axes.Custom.Add(axis)
- axis.Labels.Font.Name = "GenericSansSerif"
- axis.Labels.Font.Color = Color.Black
- axis.Labels.Font.Size = 10
- axis.Title.Font.Name = "GenericSansSerif"
- axis.Title.Font.Color = Color.Black
- axis.Title.Font.Size = 10
- axis.Title.Text = unit
- axis.Title.Angle = 90
- axis.Tag = unit
- axis.Visible = True
- axis.Automatic = True
- axis.MaximumOffset = 5
- axis.AxisPen.Visible = True
- axis.Grid.Visible = False
+ Dim axis As ScottPlot.Renderable.Axis
+ Dim number As Integer = axes.Count + 1
'Place every second axis on the right
If number Mod 2 = 0 Then
- axis.OtherSide = True
+ axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Right)
+ Else
+ axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Left)
End If
+ axis.AxisLabel.Label = unit
+ 'TODO: TChart
+ 'axis.Tag = unit
+ axis.IsVisible = True
+ axis.LockLimits(False)
'Calculate position
- axis.RelativePosition = Math.Ceiling((number) / 2) * 8
+ axis.SetOffset(Math.Ceiling((number) / 2) * 8)
'assign series to new axis
- series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom
- series.CustomVertAxis = axis
+ series.YAxisIndex = axis.AxisIndex
'update axis dialog
Call Me.UpdateAxisDialog()
@@ -2465,73 +2486,74 @@ Friend Class WaveController
''' List of timestamps for which to show markers
Private Sub showMarkers(timestamps As List(Of DateTime))
- 'Remove any existing marker series
- For i As Integer = View.TChart1.Series.Count - 1 To 0 Step -1
- Try
- If CType(View.TChart1.Series(i).Tag, String) = "_markers" Then
- View.TChart1.Series.RemoveAt(i)
- End If
- Catch ex As Exception
- Log.AddLogEntry(Log.levels.debug, ex.Message)
- End Try
- Next
- View.TChart1.Refresh()
-
- If timestamps.Count = 0 Then
- Exit Sub
- End If
-
- 'loop over series and create a marker series for each
- For i As Integer = 0 To View.TChart1.Series.Count - 1
- Try
- Dim series As Steema.TeeChart.Styles.Series = View.TChart1.Series(i)
- If Not series.Active Then
- 'do not display markers for inactive series
- Continue For
- End If
- 'collect all non-NaN values to display as markers
- Dim markerValues As New Dictionary(Of DateTime, Double)
- For Each t As DateTime In timestamps
- Dim index As Integer = series.XValues.IndexOf(t.ToOADate)
- If index <> -1 Then
- If Not series.IsNull(index) Then
- markerValues.Add(t, series.YValues(index))
- End If
- End If
- Next
- If markerValues.Count > 0 Then
- 'create a new point series for markers
- Dim markers As New Steema.TeeChart.Styles.Points(View.TChart1.Chart)
- markers.Legend.Visible = False
- markers.Title = $"{series.Title} (selection)"
- markers.Tag = "_markers"
- markers.VertAxis = series.VertAxis
- If series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom Then
- markers.CustomVertAxis = series.CustomVertAxis
- End If
- markers.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
- markers.Pointer.Brush.Visible = False
- markers.Color = series.Color
- markers.Pointer.Color = series.Color
- markers.Pointer.Pen.Color = series.Color
- markers.Pointer.Pen.Width = 2
- markers.Marks.Visible = True
- markers.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value
- 'markers.Marks.OnTop = True 'causes crash when markers are panned out of view on the left
- markers.Marks.Callout.Visible = False
- markers.Marks.FontSeriesColor = True
- markers.Marks.Arrow.Visible = False
- markers.Marks.ArrowLength = 5
- markers.Marks.Pen.Color = series.Color
- 'add data points
- For Each t As DateTime In markerValues.Keys
- markers.Add(t, markerValues(t))
- Next
- End If
- Catch ex As Exception
- Log.AddLogEntry(Log.levels.debug, ex.Message)
- End Try
- Next
+ 'TODO: TChart
+ ''Remove any existing marker series
+ 'For i As Integer = View.MainPlot.Series.Count - 1 To 0 Step -1
+ ' Try
+ ' If CType(View.MainPlot.Series(i).Tag, String) = "_markers" Then
+ ' View.MainPlot.Series.RemoveAt(i)
+ ' End If
+ ' Catch ex As Exception
+ ' Log.AddLogEntry(Log.levels.debug, ex.Message)
+ ' End Try
+ 'Next
+ 'View.MainPlot.Refresh()
+
+ 'If timestamps.Count = 0 Then
+ ' Exit Sub
+ 'End If
+
+ ''loop over series and create a marker series for each
+ 'For i As Integer = 0 To View.MainPlot.Series.Count - 1
+ ' Try
+ ' Dim series As Steema.TeeChart.Styles.Series = View.MainPlot.Series(i)
+ ' If Not series.Active Then
+ ' 'do not display markers for inactive series
+ ' Continue For
+ ' End If
+ ' 'collect all non-NaN values to display as markers
+ ' Dim markerValues As New Dictionary(Of DateTime, Double)
+ ' For Each t As DateTime In timestamps
+ ' Dim index As Integer = series.XValues.IndexOf(t.ToOADate)
+ ' If index <> -1 Then
+ ' If Not series.IsNull(index) Then
+ ' markerValues.Add(t, series.YValues(index))
+ ' End If
+ ' End If
+ ' Next
+ ' If markerValues.Count > 0 Then
+ ' 'create a new point series for markers
+ ' Dim markers As New Steema.TeeChart.Styles.Points(View.MainPlot.Chart)
+ ' markers.Legend.Visible = False
+ ' markers.Title = $"{series.Title} (selection)"
+ ' markers.Tag = "_markers"
+ ' markers.VertAxis = series.VertAxis
+ ' If series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom Then
+ ' markers.CustomVertAxis = series.CustomVertAxis
+ ' End If
+ ' markers.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
+ ' markers.Pointer.Brush.Visible = False
+ ' markers.Color = series.Color
+ ' markers.Pointer.Color = series.Color
+ ' markers.Pointer.Pen.Color = series.Color
+ ' markers.Pointer.Pen.Width = 2
+ ' markers.Marks.Visible = True
+ ' markers.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value
+ ' 'markers.Marks.OnTop = True 'causes crash when markers are panned out of view on the left
+ ' markers.Marks.Callout.Visible = False
+ ' markers.Marks.FontSeriesColor = True
+ ' markers.Marks.Arrow.Visible = False
+ ' markers.Marks.ArrowLength = 5
+ ' markers.Marks.Pen.Color = series.Color
+ ' 'add data points
+ ' For Each t As DateTime In markerValues.Keys
+ ' markers.Add(t, markerValues(t))
+ ' Next
+ ' End If
+ ' Catch ex As Exception
+ ' Log.AddLogEntry(Log.levels.debug, ex.Message)
+ ' End Try
+ 'Next
End Sub
@@ -2572,63 +2594,65 @@ Friend Class WaveController
End Sub
Private Sub SeriesPropertiesChanged(id As Integer)
- 'find series in chart
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If series.Tag = id Then
- 'set line display according to interpretation
- If TypeOf series Is Steema.TeeChart.Styles.Line Then
- Dim seriesline As Steema.TeeChart.Styles.Line = series
- Select Case _model.TimeSeries(id).Interpretation
- Case TimeSeries.InterpretationEnum.Instantaneous,
- TimeSeries.InterpretationEnum.Undefined
- seriesline.Stairs = False
- seriesline.InvertedStairs = False
- Case TimeSeries.InterpretationEnum.BlockRight
- seriesline.Stairs = True
- seriesline.InvertedStairs = False
- Case TimeSeries.InterpretationEnum.BlockLeft,
- TimeSeries.InterpretationEnum.CumulativePerTimestep
- seriesline.Stairs = True
- seriesline.InvertedStairs = True
- End Select
- End If
-
- 'update title in chart
- series.Title = _model.TimeSeries(id).Title
-
- 'assign to axis according to unit
- assignSeriesToAxis(series, _model.TimeSeries(id).Unit)
-
- 'TODO: apply the same changes in the overview chart?
- Exit For
- End If
- Next
+ 'TODO: TChart
+ ''find series in chart
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If series.Tag = id Then
+ ' 'set line display according to interpretation
+ ' If TypeOf series Is Steema.TeeChart.Styles.Line Then
+ ' Dim seriesline As Steema.TeeChart.Styles.Line = series
+ ' Select Case _model.TimeSeries(id).Interpretation
+ ' Case TimeSeries.InterpretationEnum.Instantaneous,
+ ' TimeSeries.InterpretationEnum.Undefined
+ ' seriesline.Stairs = False
+ ' seriesline.InvertedStairs = False
+ ' Case TimeSeries.InterpretationEnum.BlockRight
+ ' seriesline.Stairs = True
+ ' seriesline.InvertedStairs = False
+ ' Case TimeSeries.InterpretationEnum.BlockLeft,
+ ' TimeSeries.InterpretationEnum.CumulativePerTimestep
+ ' seriesline.Stairs = True
+ ' seriesline.InvertedStairs = True
+ ' End Select
+ ' End If
+
+ ' 'update title in chart
+ ' series.Title = _model.TimeSeries(id).Title
+
+ ' 'assign to axis according to unit
+ ' assignSeriesToAxis(series, _model.TimeSeries(id).Unit)
+
+ ' 'TODO: apply the same changes in the overview chart?
+ ' Exit For
+ ' End If
+ 'Next
End Sub
Private Sub SeriesRemoved(id As Integer)
- 'Remove series from main chart
- For i As Integer = View.TChart1.Series.Count - 1 To 0 Step -1
- If CType(View.TChart1.Series.Item(i).Tag, String) = "_markers" Then
- 'TODO: marker series belonging to the removed series should be removed as well, skip for now
- Continue For
- End If
- If View.TChart1.Series.Item(i).Tag = id Then
- View.TChart1.Series.RemoveAt(i)
- View.TChart1.Refresh()
- Exit For
- End If
- Next
+ 'TODO: TChart
+ ''Remove series from main chart
+ 'For i As Integer = View.MainPlot.Series.Count - 1 To 0 Step -1
+ ' If CType(View.MainPlot.Series.Item(i).Tag, String) = "_markers" Then
+ ' 'TODO: marker series belonging to the removed series should be removed as well, skip for now
+ ' Continue For
+ ' End If
+ ' If View.MainPlot.Series.Item(i).Tag = id Then
+ ' View.MainPlot.Series.RemoveAt(i)
+ ' View.MainPlot.Refresh()
+ ' Exit For
+ ' End If
+ 'Next
- 'Remove series from overview chart
- For i As Integer = View.TChart2.Series.Count - 1 To 0 Step -1
- If (View.TChart2.Series.Item(i).Tag = id) Then
- View.TChart2.Series.RemoveAt(i)
- View.TChart2.Refresh()
- Exit For
- End If
- Next
+ ''Remove series from overview chart
+ 'For i As Integer = View.OverviewPlot.Series.Count - 1 To 0 Step -1
+ ' If (View.OverviewPlot.Series.Item(i).Tag = id) Then
+ ' View.OverviewPlot.Series.RemoveAt(i)
+ ' View.OverviewPlot.Refresh()
+ ' Exit For
+ ' End If
+ 'Next
End Sub
@@ -2638,20 +2662,21 @@ Friend Class WaveController
''' Id of the TimeSeries whose order was changed
''' Direction in which the series was moved
Private Sub SeriesReordered(id As Integer, direction As Direction)
- 'update series order in chart
- 'TODO: this causes a second, unnecessary event update through TeeEvent which I don't know how to prevent
- Dim index As Integer = 0
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If series.Tag = id Then
- If direction = Direction.Up And index > 0 Then
- View.TChart1.Series.Exchange(index, index - 1)
- ElseIf direction = Direction.Down And index < View.TChart1.Series.Count - 1 Then
- View.TChart1.Series.Exchange(index, index + 1)
- End If
- Exit For
- End If
- index += 1
- Next
+ 'TODO: TChart
+ ''update series order in chart
+ ''TODO: this causes a second, unnecessary event update through TeeEvent which I don't know how to prevent
+ 'Dim index As Integer = 0
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If series.Tag = id Then
+ ' If direction = Direction.Up And index > 0 Then
+ ' View.MainPlot.Series.Exchange(index, index - 1)
+ ' ElseIf direction = Direction.Down And index < View.MainPlot.Series.Count - 1 Then
+ ' View.MainPlot.Series.Exchange(index, index + 1)
+ ' End If
+ ' Exit For
+ ' End If
+ ' index += 1
+ 'Next
End Sub
'''
@@ -2659,16 +2684,17 @@ Friend Class WaveController
'''
'''
Private Sub axisDeleted(axisname As String)
- Dim axisnumber As Integer
- Dim m As Match = Regex.Match(axisname, "Custom (\d+)")
- If m.Success Then
- axisnumber = Integer.Parse(m.Groups(1).Value)
- 'Delete axis from chart
- View.TChart1.Axes.Custom.RemoveAt(axisnumber)
- View.TChart1.Refresh()
- 'update axis dialog
- Call Me.UpdateAxisDialog()
- End If
+ 'TODO: TChart
+ 'Dim axisnumber As Integer
+ 'Dim m As Match = Regex.Match(axisname, "Custom (\d+)")
+ 'If m.Success Then
+ ' axisnumber = Integer.Parse(m.Groups(1).Value)
+ ' 'Delete axis from chart
+ ' View.MainPlot.Axes.Custom.RemoveAt(axisnumber)
+ ' View.MainPlot.Refresh()
+ ' 'update axis dialog
+ ' Call Me.UpdateAxisDialog()
+ 'End If
End Sub
'''
@@ -2677,24 +2703,25 @@ Friend Class WaveController
''' Reassigns all series to their appropriate axis
Private Sub AxisUnitChanged()
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- assignSeriesToAxis(series, _model.TimeSeries(series.Tag).Unit)
- Next
+ 'TODO: TChart
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' assignSeriesToAxis(series, _model.TimeSeries(series.Tag).Unit)
+ 'Next
- 'deactivate unused custom axes
- Dim unitUsed As Boolean
- For Each axis As Steema.TeeChart.Axis In View.TChart1.Axes.Custom
- unitUsed = False
- For Each ts As TimeSeries In _model.TimeSeries.Values
- If ts.Unit = axis.Tag Then
- unitUsed = True
- Exit For
- End If
- Next
- If Not unitUsed Then
- axis.Visible = False
- End If
- Next
+ ''deactivate unused custom axes
+ 'Dim unitUsed As Boolean
+ 'For Each axis As Steema.TeeChart.Axis In View.MainPlot.Axes.Custom
+ ' unitUsed = False
+ ' For Each ts As TimeSeries In _model.TimeSeries.Values
+ ' If ts.Unit = axis.Tag Then
+ ' unitUsed = True
+ ' Exit For
+ ' End If
+ ' Next
+ ' If Not unitUsed Then
+ ' axis.Visible = False
+ ' End If
+ 'Next
End Sub
@@ -2702,15 +2729,16 @@ Friend Class WaveController
''' Update AxisDialog
'''
Private Sub UpdateAxisDialog()
- 'Wrap Left, Right and Custom axes
- Dim axisList As New List(Of AxisWrapper)
- axisList.Add(New AxisWrapper("Left", View.TChart1.Axes.Left))
- axisList.Add(New AxisWrapper("Right", View.TChart1.Axes.Right))
- For i As Integer = 0 To View.TChart1.Axes.Custom.Count - 1
- axisList.Add(New AxisWrapper("Custom " & i, View.TChart1.Axes.Custom(i)))
- Next
+ 'TODO: TChart
+ ''Wrap Left, Right and Custom axes
+ 'Dim axisList As New List(Of AxisWrapper)
+ 'axisList.Add(New AxisWrapper("Left", View.MainPlot.Axes.Left))
+ 'axisList.Add(New AxisWrapper("Right", View.MainPlot.Axes.Right))
+ 'For i As Integer = 0 To View.MainPlot.Axes.Custom.Count - 1
+ ' axisList.Add(New AxisWrapper("Custom " & i, View.MainPlot.Axes.Custom(i)))
+ 'Next
- _axisDialog.Update(axisList)
+ '_axisDialog.Update(axisList)
End Sub
'''
@@ -2761,27 +2789,28 @@ Friend Class WaveController
''' The color palette to apply
Private Sub SetChartColorPalette(colorPalette As Color())
- 'set colorpalette in charts
- View.TChart1.Chart.ColorPalette = colorPalette
- View.TChart2.Chart.ColorPalette = colorPalette
-
- 'change colors of existing series
- Dim counter As Integer = 0
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
- If counter >= colorPalette.Length Then
- 'loop color palette
- counter = 0
- End If
- series.Color = colorPalette(counter)
- 'apply same color to series in overview chart
- For Each series2 As Steema.TeeChart.Styles.Series In View.TChart2.Series
- If series2.Tag = series.Tag Then
- series2.Color = colorPalette(counter)
- Exit For
- End If
- Next
- counter += 1
- Next
+ 'TODO: TChart
+ ''set colorpalette in charts
+ 'View.MainPlot.Chart.ColorPalette = colorPalette
+ 'View.TChart2.Chart.ColorPalette = colorPalette
+
+ ''change colors of existing series
+ 'Dim counter As Integer = 0
+ 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+ ' If counter >= colorPalette.Length Then
+ ' 'loop color palette
+ ' counter = 0
+ ' End If
+ ' series.Color = colorPalette(counter)
+ ' 'apply same color to series in overview chart
+ ' For Each series2 As Steema.TeeChart.Styles.Series In View.TChart2.Series
+ ' If series2.Tag = series.Tag Then
+ ' series2.Color = colorPalette(counter)
+ ' Exit For
+ ' End If
+ ' Next
+ ' counter += 1
+ 'Next
End Sub
'''
@@ -2818,156 +2847,157 @@ Friend Class WaveController
''' Path to TEN file
Private Sub Load_TEN(FileName As String)
- Dim result As DialogResult
- Dim i As Integer
- Dim reihe As TimeSeries
- Dim XMin, XMax As DateTime
-
- Try
-
- 'Log
- Call Log.AddLogEntry(Log.levels.info, $"Loading file '{FileName}' ...")
-
- 'Bereits vorhandene Reihen merken
- Dim existingIds = New List(Of Integer)
- For Each id As Integer In _model.TimeSeries.Ids
- existingIds.Add(id)
- Next
-
- 'Zoom der X-Achse merken
- XMin = View.ChartMinX
- XMax = View.ChartMaxX
- If (XMin <> XMax) Then
- Me.selectionMade = True
- Else
- Me.selectionMade = False
- End If
-
- 'Load TEN file in main chart, this completely replaces the chart!
- Call View.TChart1.Import.Template.Load(FileName)
- 'Clear overview chart
- Call View.TChart2.Series.Clear()
-
- 'Abfrage für Reihenimport
- If (View.TChart1.Series.Count() > 0) Then
- result = MsgBox("Also import time series?", MsgBoxStyle.YesNo)
-
- Select Case result
-
- Case Windows.Forms.DialogResult.Yes
- 'Reihen aus TEN-Datei sollen importiert werden
-
- Dim nSeries As Integer = 0
-
- 'Alle Reihen durchlaufen
- For Each series As Steema.TeeChart.Styles.Series In View.TChart1.Series
-
- 'Nur Zeitreihen behandeln
- If (series.XValues.DateTime) Then
-
- 'Zeitreihe aus dem importierten Diagramm nach intern übertragen
- Log.AddLogEntry(Log.levels.info, $"Importing series '{series.Title}' from TEN file...")
- reihe = New TimeSeries(series.Title)
- For i = 0 To series.Count - 1
- reihe.AddNode(DateTime.FromOADate(series.XValues(i)), series.YValues(i))
- Next
- 'Determine total number of NaN-values and write to log
- If reihe.NaNCount > 0 Then
- Log.AddLogEntry(Log.levels.warning, $"Series '{reihe.Title}' contains {reihe.NaNCount} NaN values!")
- End If
- 'Get the series' unit from the axis title
- Dim axistitle As String = ""
- Select Case series.VertAxis
- Case Steema.TeeChart.Styles.VerticalAxis.Left
- axistitle = View.TChart1.Axes.Left.Title.Text
- Case Steema.TeeChart.Styles.VerticalAxis.Right
- axistitle = View.TChart1.Axes.Right.Title.Text
- Case Steema.TeeChart.Styles.VerticalAxis.Custom
- axistitle = series.CustomVertAxis.Title.Text
- End Select
- reihe.Unit = AxisWrapper.parseUnit(axistitle)
+ 'TODO: TChart
+ 'Dim result As DialogResult
+ 'Dim i As Integer
+ 'Dim reihe As TimeSeries
+ 'Dim XMin, XMax As DateTime
+
+ 'Try
+
+ ' 'Log
+ ' Call Log.AddLogEntry(Log.levels.info, $"Loading file '{FileName}' ...")
+
+ ' 'Bereits vorhandene Reihen merken
+ ' Dim existingIds = New List(Of Integer)
+ ' For Each id As Integer In _model.TimeSeries.Ids
+ ' existingIds.Add(id)
+ ' Next
+
+ ' 'Zoom der X-Achse merken
+ ' XMin = View.ChartMinX
+ ' XMax = View.ChartMaxX
+ ' If (XMin <> XMax) Then
+ ' Me.selectionMade = True
+ ' Else
+ ' Me.selectionMade = False
+ ' End If
+
+ ' 'Load TEN file in main chart, this completely replaces the chart!
+ ' Call View.MainPlot.Import.Template.Load(FileName)
+ ' 'Clear overview chart
+ ' Call View.TChart2.Series.Clear()
+
+ ' 'Abfrage für Reihenimport
+ ' If (View.MainPlot.Series.Count() > 0) Then
+ ' result = MsgBox("Also import time series?", MsgBoxStyle.YesNo)
+
+ ' Select Case result
+
+ ' Case Windows.Forms.DialogResult.Yes
+ ' 'Reihen aus TEN-Datei sollen importiert werden
+
+ ' Dim nSeries As Integer = 0
+
+ ' 'Alle Reihen durchlaufen
+ ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
+
+ ' 'Nur Zeitreihen behandeln
+ ' If (series.XValues.DateTime) Then
+
+ ' 'Zeitreihe aus dem importierten Diagramm nach intern übertragen
+ ' Log.AddLogEntry(Log.levels.info, $"Importing series '{series.Title}' from TEN file...")
+ ' reihe = New TimeSeries(series.Title)
+ ' For i = 0 To series.Count - 1
+ ' reihe.AddNode(DateTime.FromOADate(series.XValues(i)), series.YValues(i))
+ ' Next
+ ' 'Determine total number of NaN-values and write to log
+ ' If reihe.NaNCount > 0 Then
+ ' Log.AddLogEntry(Log.levels.warning, $"Series '{reihe.Title}' contains {reihe.NaNCount} NaN values!")
+ ' End If
+ ' 'Get the series' unit from the axis title
+ ' Dim axistitle As String = ""
+ ' Select Case series.VertAxis
+ ' Case Steema.TeeChart.Styles.VerticalAxis.Left
+ ' axistitle = View.MainPlot.Axes.Left.Title.Text
+ ' Case Steema.TeeChart.Styles.VerticalAxis.Right
+ ' axistitle = View.MainPlot.Axes.Right.Title.Text
+ ' Case Steema.TeeChart.Styles.VerticalAxis.Custom
+ ' axistitle = series.CustomVertAxis.Title.Text
+ ' End Select
+ ' reihe.Unit = AxisWrapper.parseUnit(axistitle)
+
+ ' 'Save datasource
+ ' reihe.DataSource = New TimeSeriesDataSource(FileName, series.Title)
+
+ ' 'Add the series to the model while temporarily disabling event handling
+ ' RemoveHandler _model.SeriesAdded, AddressOf SeriesAdded
+ ' Call _model.Import_Series(reihe)
+ ' AddHandler _model.SeriesAdded, AddressOf SeriesAdded
+
+ ' 'after import in the model, the title might have been changed,
+ ' 'then we need to edit the title in the chart as well
+ ' If reihe.Title <> series.Title Then
+ ' series.Title = reihe.Title
+ ' End If
+
+ ' 'Store the time series id in the Tag property
+ ' series.Tag = reihe.Id
+
+ ' 'Add series to overview
+ ' Call Me.AddSeriesToOverview(reihe)
+
+ ' nSeries += 1
+
+ ' End If
+ ' Next
+
+ ' Log.AddLogEntry(levels.info, $"Imported {nSeries} time series from TEN file.")
+
+ ' 'Update window title
+ ' View.Text = "BlueM.Wave - " & FileName
+
+ ' Case Windows.Forms.DialogResult.No
+ ' 'Reihen aus TEN-Datei sollen nicht importiert werden
+
+ ' 'Alle Reihen aus den Diagrammen löschen (wurden bei TEN-Import automatisch mit eingeladen)
+ ' View.MainPlot.Series.RemoveAllSeries()
+ ' View.TChart2.Series.RemoveAllSeries()
+
+ ' End Select
+
+ ' End If
+
+ ' 'extract units from axis titles and store as tags
+ ' View.MainPlot.Axes.Left.Tag = AxisWrapper.parseUnit(View.MainPlot.Axes.Left.TitleOrName)
+ ' View.MainPlot.Axes.Right.Tag = AxisWrapper.parseUnit(View.MainPlot.Axes.Right.TitleOrName)
+ ' For Each axis As Steema.TeeChart.Axis In View.MainPlot.Axes.Custom
+ ' axis.Tag = AxisWrapper.parseUnit(axis.TitleOrName)
+ ' Next
+
+ ' 'Die vor dem Laden bereits vorhandenen Zeitreihen wieder zu den Diagrammen hinzufügen (durch TEN-Import verloren)
+ ' For Each id As Integer In existingIds
+ ' Call Me.SeriesAdded(_model.TimeSeries(id))
+ ' Next
+
+ ' 'Vorherigen Zoom wiederherstellen
+ ' If (Me.selectionMade) Then
+ ' View.ChartMinX = XMin
+ ' View.ChartMaxX = XMax
+ ' End If
- 'Save datasource
- reihe.DataSource = New TimeSeriesDataSource(FileName, series.Title)
+ ' 'ColorBands neu einrichten (durch TEN-Import verloren)
+ ' Call View.Init_ColorBands()
+
+ ' 'Reset zoom and pan settings
+ ' View.MainPlot.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
+ ' View.MainPlot.Panning.Allow = Steema.TeeChart.ScrollModes.None
+ ' View.MainPlot.Panning.MouseButton = MouseButtons.Right
- 'Add the series to the model while temporarily disabling event handling
- RemoveHandler _model.SeriesAdded, AddressOf SeriesAdded
- Call _model.Import_Series(reihe)
- AddHandler _model.SeriesAdded, AddressOf SeriesAdded
-
- 'after import in the model, the title might have been changed,
- 'then we need to edit the title in the chart as well
- If reihe.Title <> series.Title Then
- series.Title = reihe.Title
- End If
-
- 'Store the time series id in the Tag property
- series.Tag = reihe.Id
-
- 'Add series to overview
- Call Me.AddSeriesToOverview(reihe)
-
- nSeries += 1
-
- End If
- Next
-
- Log.AddLogEntry(levels.info, $"Imported {nSeries} time series from TEN file.")
-
- 'Update window title
- View.Text = "BlueM.Wave - " & FileName
-
- Case Windows.Forms.DialogResult.No
- 'Reihen aus TEN-Datei sollen nicht importiert werden
-
- 'Alle Reihen aus den Diagrammen löschen (wurden bei TEN-Import automatisch mit eingeladen)
- View.TChart1.Series.RemoveAllSeries()
- View.TChart2.Series.RemoveAllSeries()
-
- End Select
-
- End If
-
- 'extract units from axis titles and store as tags
- View.TChart1.Axes.Left.Tag = AxisWrapper.parseUnit(View.TChart1.Axes.Left.TitleOrName)
- View.TChart1.Axes.Right.Tag = AxisWrapper.parseUnit(View.TChart1.Axes.Right.TitleOrName)
- For Each axis As Steema.TeeChart.Axis In View.TChart1.Axes.Custom
- axis.Tag = AxisWrapper.parseUnit(axis.TitleOrName)
- Next
-
- 'Die vor dem Laden bereits vorhandenen Zeitreihen wieder zu den Diagrammen hinzufügen (durch TEN-Import verloren)
- For Each id As Integer In existingIds
- Call Me.SeriesAdded(_model.TimeSeries(id))
- Next
-
- 'Vorherigen Zoom wiederherstellen
- If (Me.selectionMade) Then
- View.ChartMinX = XMin
- View.ChartMaxX = XMax
- End If
-
- 'ColorBands neu einrichten (durch TEN-Import verloren)
- Call View.Init_ColorBands()
-
- 'Reset zoom and pan settings
- View.TChart1.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
- View.TChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None
- View.TChart1.Panning.MouseButton = MouseButtons.Right
-
- 'Charts aktualisieren
- Call Me.UpdateChartExtents()
-
- Call Me.ViewportChanged()
-
- 'Log
- Call Log.AddLogEntry(Log.levels.info, $"TEN file '{FileName}' loaded successfully!")
-
- Call FileImported(FileName)
-
- Catch ex As Exception
- MsgBox("Error while loading:" & eol & ex.Message, MsgBoxStyle.Critical)
- Call Log.AddLogEntry(Log.levels.error, "Error while loading:" & eol & ex.Message)
- End Try
+ ' 'Charts aktualisieren
+ ' Call Me.UpdateChartExtents()
+
+ ' Call Me.ViewportChanged()
+
+ ' 'Log
+ ' Call Log.AddLogEntry(Log.levels.info, $"TEN file '{FileName}' loaded successfully!")
+
+ ' Call FileImported(FileName)
+
+ 'Catch ex As Exception
+ ' MsgBox("Error while loading:" & eol & ex.Message, MsgBoxStyle.Critical)
+ ' Call Log.AddLogEntry(Log.levels.error, "Error while loading:" & eol & ex.Message)
+ 'End Try
End Sub
diff --git a/source/Helpers.vb b/source/Helpers.vb
index 5e3c5f31..21847511 100644
--- a/source/Helpers.vb
+++ b/source/Helpers.vb
@@ -224,78 +224,84 @@ Public Module Helpers
End Function
'''
- ''' Führt Standardformatierung eines TCharts aus
+ ''' Default formatting for a plot
'''
- '''
- Friend Sub FormatChart(ByRef chart As Steema.TeeChart.Chart)
+ '''
+ Friend Sub FormatChart(ByRef plot As ScottPlot.Plot)
'set default color palette
- chart.ColorPalette = Helpers.getColorPalette()
-
- chart.Aspect.View3D = False
- 'chart.BackColor = Color.White
- chart.Panel.Gradient.Visible = False
- chart.Panel.Brush.Color = Color.White
- chart.Walls.Back.Transparent = False
- chart.Walls.Back.Gradient.Visible = False
- chart.Walls.Back.Color = Color.White
-
- 'Header
- chart.Header.Font.Name = "GenericSansSerif"
- chart.Header.Font.Color = Color.Black
- chart.Header.Font.Size = 12
- chart.Header.Text = ""
+ plot.Palette = ScottPlot.Palette.Category10
+
+ 'TODO: TChart
+ 'plot.Aspect.View3D = False
+ ''plot.BackColor = Color.White
+ 'plot.Panel.Gradient.Visible = False
+ 'plot.Panel.Brush.Color = Color.White
+ 'plot.Walls.Back.Transparent = False
+ 'plot.Walls.Back.Gradient.Visible = False
+ 'plot.Walls.Back.Color = Color.White
+
+ ''Header
+ 'plot.Header.Font.Name = "GenericSansSerif"
+ 'plot.Header.Font.Color = Color.Black
+ 'plot.Header.Font.Size = 12
+ 'plot.Header.Text = ""
'Legende
- chart.Legend.Font.Name = "GenericSansSerif"
- chart.Legend.Font.Size = 10
- chart.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
- chart.Legend.FontSeriesColor = True
- chart.Legend.CheckBoxes = True
+ Dim legend As ScottPlot.Renderable.Legend
+ legend = plot.Legend(enable:=True, location:=ScottPlot.Alignment.UpperRight)
+ legend.UpdateLegendItems(plot, includeHidden:=True)
+
+ 'plot.Legend.Font.Name = "GenericSansSerif"
+ 'plot.Legend.Font.Size = 10
+ 'plot.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
+ 'plot.Legend.FontSeriesColor = True
+ 'plot.Legend.CheckBoxes = True
'Achsen
- chart.Axes.DrawBehind = False
+ plot.XAxis.DateTimeFormat(True)
+ 'plot.Axes.DrawBehind = False
- chart.Axes.Left.Title.Font.Name = "GenericSansSerif"
- chart.Axes.Left.Title.Font.Color = Color.Black
- chart.Axes.Left.Title.Font.Size = 10
+ 'plot.Axes.Left.Title.Font.Name = "GenericSansSerif"
+ 'plot.Axes.Left.Title.Font.Color = Color.Black
+ 'plot.Axes.Left.Title.Font.Size = 10
- chart.Axes.Left.Labels.Font.Name = "GenericSansSerif"
- chart.Axes.Left.Labels.Font.Color = Color.Black
- chart.Axes.Left.Labels.Font.Size = 10
+ 'plot.Axes.Left.Labels.Font.Name = "GenericSansSerif"
+ 'plot.Axes.Left.Labels.Font.Color = Color.Black
+ 'plot.Axes.Left.Labels.Font.Size = 10
- chart.Axes.Left.AxisPen.Visible = True
+ 'plot.Axes.Left.AxisPen.Visible = True
- chart.Axes.Left.Grid.Visible = True
- chart.Axes.Left.Grid.Style = Drawing2D.DashStyle.Dash
+ 'plot.Axes.Left.Grid.Visible = True
+ 'plot.Axes.Left.Grid.Style = Drawing2D.DashStyle.Dash
- chart.Axes.Right.Title.Font.Name = "GenericSansSerif"
- chart.Axes.Right.Title.Font.Color = Color.Black
- chart.Axes.Right.Title.Font.Size = 10
+ 'plot.Axes.Right.Title.Font.Name = "GenericSansSerif"
+ 'plot.Axes.Right.Title.Font.Color = Color.Black
+ 'plot.Axes.Right.Title.Font.Size = 10
- chart.Axes.Right.Labels.Font.Name = "GenericSansSerif"
- chart.Axes.Right.Labels.Font.Color = Color.Black
- chart.Axes.Right.Labels.Font.Size = 10
+ 'plot.Axes.Right.Labels.Font.Name = "GenericSansSerif"
+ 'plot.Axes.Right.Labels.Font.Color = Color.Black
+ 'plot.Axes.Right.Labels.Font.Size = 10
- chart.Axes.Right.AxisPen.Visible = True
+ 'plot.Axes.Right.AxisPen.Visible = True
- chart.Axes.Right.Grid.Visible = False
- chart.Axes.Right.Grid.Style = Drawing2D.DashStyle.Dash
+ 'plot.Axes.Right.Grid.Visible = False
+ 'plot.Axes.Right.Grid.Style = Drawing2D.DashStyle.Dash
- chart.Axes.Bottom.Title.Font.Name = "GenericSansSerif"
- chart.Axes.Bottom.Title.Font.Color = Color.Black
- chart.Axes.Bottom.Title.Font.Size = 10
+ 'plot.Axes.Bottom.Title.Font.Name = "GenericSansSerif"
+ 'plot.Axes.Bottom.Title.Font.Color = Color.Black
+ 'plot.Axes.Bottom.Title.Font.Size = 10
- chart.Axes.Bottom.Labels.Font.Name = "GenericSansSerif"
- chart.Axes.Bottom.Labels.Font.Color = Color.Black
- chart.Axes.Bottom.Labels.Font.Size = 10
+ 'plot.Axes.Bottom.Labels.Font.Name = "GenericSansSerif"
+ 'plot.Axes.Bottom.Labels.Font.Color = Color.Black
+ 'plot.Axes.Bottom.Labels.Font.Size = 10
- chart.Axes.Bottom.Automatic = True
+ 'plot.Axes.Bottom.Automatic = True
- chart.Axes.Bottom.AxisPen.Visible = True
+ 'plot.Axes.Bottom.AxisPen.Visible = True
- chart.Axes.Bottom.Grid.Visible = True
- chart.Axes.Bottom.Grid.Style = Drawing2D.DashStyle.Dash
+ 'plot.Axes.Bottom.Grid.Visible = True
+ 'plot.Axes.Bottom.Grid.Style = Drawing2D.DashStyle.Dash
End Sub
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index d83b1d1a..470913e4 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -33,8 +33,6 @@ Partial Class MainWindow
Dim ToolStripSeparator5 As System.Windows.Forms.ToolStripSeparator
Dim ToolStripSeparator4 As System.Windows.Forms.ToolStripSeparator
Dim ToolStripSeparator3 As System.Windows.Forms.ToolStripSeparator
- Dim Margins2 As Steema.TeeChart.Margins = New Steema.TeeChart.Margins()
- Dim Margins3 As Steema.TeeChart.Margins = New Steema.TeeChart.Margins()
Me.ToolStripStatusLabel_Errors = New System.Windows.Forms.ToolStripStatusLabel()
Me.ToolStripStatusLabel_Warnings = New System.Windows.Forms.ToolStripStatusLabel()
Me.ToolStripStatusLabel_Log = New System.Windows.Forms.ToolStripStatusLabel()
@@ -92,7 +90,7 @@ Partial Class MainWindow
Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
- Me.TChart2 = New Steema.TeeChart.TChart()
+ Me.OverviewPlot = New ScottPlot.FormsPlot()
Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
Me.PanelNavigation = New System.Windows.Forms.Panel()
Me.Button_NavEnd = New System.Windows.Forms.Button()
@@ -102,13 +100,13 @@ Partial Class MainWindow
Me.Button_NavBack = New System.Windows.Forms.Button()
Me.NumericUpDown_NavMultiplier = New System.Windows.Forms.NumericUpDown()
Me.ComboBox_NavIncrement = New System.Windows.Forms.ComboBox()
- Me.TChart1 = New Steema.TeeChart.TChart()
Me.Panel_DisplayRange = New System.Windows.Forms.Panel()
Me.Label_Display = New System.Windows.Forms.Label()
Me.NumericUpDown_DisplayRangeMultiplier = New System.Windows.Forms.NumericUpDown()
Me.ComboBox_DisplayRangeUnit = New System.Windows.Forms.ComboBox()
Me.MaskedTextBox_NavEnd = New System.Windows.Forms.MaskedTextBox()
Me.MaskedTextBox_NavStart = New System.Windows.Forms.MaskedTextBox()
+ Me.MainPlot = New ScottPlot.FormsPlot()
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
@@ -668,7 +666,7 @@ Partial Class MainWindow
'
'SplitContainer1.Panel1
'
- Me.SplitContainer1.Panel1.Controls.Add(Me.TChart2)
+ Me.SplitContainer1.Panel1.Controls.Add(Me.OverviewPlot)
Me.SplitContainer1.Panel1MinSize = 100
'
'SplitContainer1.Panel2
@@ -678,2537 +676,121 @@ Partial Class MainWindow
Me.SplitContainer1.SplitterDistance = 140
Me.SplitContainer1.TabIndex = 1
'
- 'TChart2
+ 'OverviewPlot
'
+ Me.OverviewPlot.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.OverviewPlot.Location = New System.Drawing.Point(0, 0)
+ Me.OverviewPlot.Name = "OverviewPlot"
+ Me.OverviewPlot.Size = New System.Drawing.Size(940, 136)
+ Me.OverviewPlot.TabIndex = 0
'
+ 'TableLayoutPanel1
'
+ Me.TableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.[Single]
+ Me.TableLayoutPanel1.ColumnCount = 1
+ Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
+ Me.TableLayoutPanel1.Controls.Add(Me.PanelNavigation, 0, 0)
+ Me.TableLayoutPanel1.Controls.Add(Me.Panel_DisplayRange, 0, 2)
+ Me.TableLayoutPanel1.Controls.Add(Me.MainPlot, 0, 1)
+ Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.TableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
+ Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(0)
+ Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
+ Me.TableLayoutPanel1.RowCount = 3
+ Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 38.0!))
+ Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
+ Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36.0!))
+ Me.TableLayoutPanel1.Size = New System.Drawing.Size(940, 458)
+ Me.TableLayoutPanel1.TabIndex = 3
'
+ 'PanelNavigation
'
+ Me.PanelNavigation.Controls.Add(Me.Button_NavEnd)
+ Me.PanelNavigation.Controls.Add(Me.Button_NavStart)
+ Me.PanelNavigation.Controls.Add(Me.Label_Navigate)
+ Me.PanelNavigation.Controls.Add(Me.Button_NavForward)
+ Me.PanelNavigation.Controls.Add(Me.Button_NavBack)
+ Me.PanelNavigation.Controls.Add(Me.NumericUpDown_NavMultiplier)
+ Me.PanelNavigation.Controls.Add(Me.ComboBox_NavIncrement)
+ Me.PanelNavigation.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.PanelNavigation.Location = New System.Drawing.Point(1, 1)
+ Me.PanelNavigation.Margin = New System.Windows.Forms.Padding(0)
+ Me.PanelNavigation.Name = "PanelNavigation"
+ Me.PanelNavigation.Size = New System.Drawing.Size(938, 38)
+ Me.PanelNavigation.TabIndex = 0
'
+ 'Button_NavEnd
'
+ Me.Button_NavEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.Button_NavEnd.Image = Global.BlueM.Wave.My.Resources.Resources.control_end
+ Me.Button_NavEnd.Location = New System.Drawing.Point(906, 8)
+ Me.Button_NavEnd.Name = "Button_NavEnd"
+ Me.Button_NavEnd.Size = New System.Drawing.Size(23, 23)
+ Me.Button_NavEnd.TabIndex = 6
+ Me.ToolTip1.SetToolTip(Me.Button_NavEnd, "Navigate to end")
+ Me.Button_NavEnd.UseVisualStyleBackColor = True
'
+ 'Button_NavStart
'
+ Me.Button_NavStart.Image = Global.BlueM.Wave.My.Resources.Resources.control_start
+ Me.Button_NavStart.Location = New System.Drawing.Point(8, 8)
+ Me.Button_NavStart.Name = "Button_NavStart"
+ Me.Button_NavStart.Size = New System.Drawing.Size(23, 23)
+ Me.Button_NavStart.TabIndex = 0
+ Me.ToolTip1.SetToolTip(Me.Button_NavStart, "Navigate to start")
+ Me.Button_NavStart.UseVisualStyleBackColor = True
'
+ 'Label_Navigate
'
+ Me.Label_Navigate.Anchor = System.Windows.Forms.AnchorStyles.Top
+ Me.Label_Navigate.AutoSize = True
+ Me.Label_Navigate.Location = New System.Drawing.Point(376, 13)
+ Me.Label_Navigate.Name = "Label_Navigate"
+ Me.Label_Navigate.Size = New System.Drawing.Size(53, 13)
+ Me.Label_Navigate.TabIndex = 2
+ Me.Label_Navigate.Text = "Navigate:"
'
+ 'Button_NavForward
'
- Me.TChart2.Axes.Bottom.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Bottom.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Bottom.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Bottom.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Axes.Bottom.Labels.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Bottom.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Bottom.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Bottom.Labels.Font.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Bottom.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Bottom.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Bottom.Labels.Font.Size = 9
- Me.TChart2.Axes.Bottom.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Bottom.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Bottom.Labels.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Bottom.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Bottom.Labels.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Angle = 0
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Bottom.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Bottom.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Axes.Bottom.Title.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Axes.Bottom.Title.Font.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Bottom.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Bottom.Title.Font.Size = 11
- Me.TChart2.Axes.Bottom.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Bottom.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Bottom.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Bottom.Title.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Bottom.Title.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Bottom.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Depth.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Depth.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Axes.Depth.Labels.Brush.Solid = True
- Me.TChart2.Axes.Depth.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Depth.Labels.Font.Brush.Solid = True
- Me.TChart2.Axes.Depth.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Depth.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Depth.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Depth.Labels.Font.Size = 9
- Me.TChart2.Axes.Depth.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Depth.Labels.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Depth.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Depth.Labels.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Depth.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Angle = 0
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Depth.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Depth.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Axes.Depth.Title.Brush.Solid = True
- Me.TChart2.Axes.Depth.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Axes.Depth.Title.Font.Brush.Solid = True
- Me.TChart2.Axes.Depth.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Depth.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Depth.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Depth.Title.Font.Size = 11
- Me.TChart2.Axes.Depth.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Depth.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Depth.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Depth.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Depth.Title.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Depth.Title.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Depth.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.DepthTop.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.DepthTop.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Axes.DepthTop.Labels.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.DepthTop.Labels.Font.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.DepthTop.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.DepthTop.Labels.Font.Size = 9
- Me.TChart2.Axes.DepthTop.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.DepthTop.Labels.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.DepthTop.Labels.Shadow.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Angle = 0
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.DepthTop.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.DepthTop.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Axes.DepthTop.Title.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Axes.DepthTop.Title.Font.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.DepthTop.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.DepthTop.Title.Font.Size = 11
- Me.TChart2.Axes.DepthTop.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.DepthTop.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.DepthTop.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.DepthTop.Title.Shadow.Brush.Solid = True
- Me.TChart2.Axes.DepthTop.Title.Shadow.Brush.Visible = True
- Me.TChart2.Axes.DepthTop.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Left.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Left.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Axes.Left.Labels.Brush.Solid = True
- Me.TChart2.Axes.Left.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Left.Labels.Font.Brush.Solid = True
- Me.TChart2.Axes.Left.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Left.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Left.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Left.Labels.Font.Size = 9
- Me.TChart2.Axes.Left.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Left.Labels.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Left.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Left.Labels.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Left.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Angle = 90
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Left.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Left.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Axes.Left.Title.Brush.Solid = True
- Me.TChart2.Axes.Left.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Axes.Left.Title.Font.Brush.Solid = True
- Me.TChart2.Axes.Left.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Left.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Left.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Left.Title.Font.Size = 11
- Me.TChart2.Axes.Left.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Left.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Left.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Left.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Left.Title.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Left.Title.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Left.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Right.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Right.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Axes.Right.Labels.Brush.Solid = True
- Me.TChart2.Axes.Right.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Right.Labels.Font.Brush.Solid = True
- Me.TChart2.Axes.Right.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Right.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Right.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Right.Labels.Font.Size = 9
- Me.TChart2.Axes.Right.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Right.Labels.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Right.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Right.Labels.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Right.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Angle = 270
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Right.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Right.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Axes.Right.Title.Brush.Solid = True
- Me.TChart2.Axes.Right.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Axes.Right.Title.Font.Brush.Solid = True
- Me.TChart2.Axes.Right.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Right.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Right.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Right.Title.Font.Size = 11
- Me.TChart2.Axes.Right.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Right.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Right.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Right.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Right.Title.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Right.Title.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Right.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Top.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Top.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Axes.Top.Labels.Brush.Solid = True
- Me.TChart2.Axes.Top.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Top.Labels.Font.Brush.Solid = True
- Me.TChart2.Axes.Top.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Top.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Top.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Top.Labels.Font.Size = 9
- Me.TChart2.Axes.Top.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Top.Labels.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Top.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Top.Labels.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Top.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Angle = 0
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Axes.Top.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Axes.Top.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Axes.Top.Title.Brush.Solid = True
- Me.TChart2.Axes.Top.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Font.Bold = False
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Axes.Top.Title.Font.Brush.Solid = True
- Me.TChart2.Axes.Top.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Top.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Top.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Top.Title.Font.Size = 11
- Me.TChart2.Axes.Top.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Axes.Top.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Axes.Top.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Axes.Top.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Axes.Top.Title.Shadow.Brush.Solid = True
- Me.TChart2.Axes.Top.Title.Shadow.Brush.Visible = True
- Me.TChart2.Axes.Top.UseMaxPixelPos = True
- Me.TChart2.Cursor = System.Windows.Forms.Cursors.Default
- Me.TChart2.Dock = System.Windows.Forms.DockStyle.Fill
- '
- '
- '
- '
- '
- '
- Me.TChart2.Footer.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Footer.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Footer.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Footer.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Footer.Brush.Solid = True
- Me.TChart2.Footer.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Footer.Font.Bold = False
- '
- '
- '
- Me.TChart2.Footer.Font.Brush.Color = System.Drawing.Color.Red
- Me.TChart2.Footer.Font.Brush.Solid = True
- Me.TChart2.Footer.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Footer.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Footer.Font.Shadow.Brush.Solid = True
- Me.TChart2.Footer.Font.Shadow.Brush.Visible = True
- Me.TChart2.Footer.Font.Size = 8
- Me.TChart2.Footer.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Footer.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Footer.ImageBevel.Brush.Solid = True
- Me.TChart2.Footer.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Footer.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Footer.Shadow.Brush.Solid = True
- Me.TChart2.Footer.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Header.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Header.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Header.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Header.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TChart2.Header.Brush.Solid = True
- Me.TChart2.Header.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Header.Font.Bold = False
- '
- '
- '
- Me.TChart2.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Header.Font.Brush.Solid = True
- Me.TChart2.Header.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Header.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Header.Font.Shadow.Brush.Solid = True
- Me.TChart2.Header.Font.Shadow.Brush.Visible = True
- Me.TChart2.Header.Font.Size = 12
- Me.TChart2.Header.Font.SizeFloat = 12.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Header.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Header.ImageBevel.Brush.Solid = True
- Me.TChart2.Header.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Header.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer))
- Me.TChart2.Header.Shadow.Brush.Solid = True
- Me.TChart2.Header.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Legend.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Legend.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Legend.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Legend.Brush.Solid = True
- Me.TChart2.Legend.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Legend.Font.Bold = False
- '
- '
- '
- Me.TChart2.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart2.Legend.Font.Brush.Solid = True
- Me.TChart2.Legend.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Legend.Font.Shadow.Brush.Solid = True
- Me.TChart2.Legend.Font.Shadow.Brush.Visible = True
- Me.TChart2.Legend.Font.Size = 9
- Me.TChart2.Legend.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Legend.ImageBevel.Brush.Solid = True
- Me.TChart2.Legend.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
- Me.TChart2.Legend.Shadow.Brush.Solid = True
- Me.TChart2.Legend.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Symbol.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Legend.Symbol.Shadow.Brush.Solid = True
- Me.TChart2.Legend.Symbol.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Legend.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Legend.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Legend.Title.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Legend.Title.Brush.Solid = True
- Me.TChart2.Legend.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Legend.Title.Font.Bold = True
- '
- '
- '
- Me.TChart2.Legend.Title.Font.Brush.Color = System.Drawing.Color.Black
- Me.TChart2.Legend.Title.Font.Brush.Solid = True
- Me.TChart2.Legend.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Legend.Title.Font.Shadow.Brush.Solid = True
- Me.TChart2.Legend.Title.Font.Shadow.Brush.Visible = True
- Me.TChart2.Legend.Title.Font.Size = 8
- Me.TChart2.Legend.Title.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Legend.Title.ImageBevel.Brush.Solid = True
- Me.TChart2.Legend.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Legend.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Legend.Title.Shadow.Brush.Solid = True
- Me.TChart2.Legend.Title.Shadow.Brush.Visible = True
- Me.TChart2.Location = New System.Drawing.Point(0, 0)
- Me.TChart2.Name = "TChart2"
- '
- '
- '
- '
- '
- '
- Me.TChart2.Panel.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Panel.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Panel.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Panel.Brush.Solid = True
- Me.TChart2.Panel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Panel.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Panel.ImageBevel.Brush.Solid = True
- Me.TChart2.Panel.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Panel.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Panel.Shadow.Brush.Solid = True
- Me.TChart2.Panel.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart2.Printer.Landscape = True
- Margins2.Bottom = 10
- Margins2.Left = 10
- Margins2.Right = 10
- Margins2.Top = 10
- Me.TChart2.Printer.Margins = Margins2
- Me.TChart2.Size = New System.Drawing.Size(940, 136)
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubFooter.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.SubFooter.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.SubFooter.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.SubFooter.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.SubFooter.Brush.Solid = True
- Me.TChart2.SubFooter.Brush.Visible = True
- '
- '
- '
- Me.TChart2.SubFooter.Font.Bold = False
- '
- '
- '
- Me.TChart2.SubFooter.Font.Brush.Color = System.Drawing.Color.Red
- Me.TChart2.SubFooter.Font.Brush.Solid = True
- Me.TChart2.SubFooter.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubFooter.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.SubFooter.Font.Shadow.Brush.Solid = True
- Me.TChart2.SubFooter.Font.Shadow.Brush.Visible = True
- Me.TChart2.SubFooter.Font.Size = 8
- Me.TChart2.SubFooter.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubFooter.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.SubFooter.ImageBevel.Brush.Solid = True
- Me.TChart2.SubFooter.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubFooter.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.SubFooter.Shadow.Brush.Solid = True
- Me.TChart2.SubFooter.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubHeader.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.SubHeader.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.SubHeader.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.SubHeader.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TChart2.SubHeader.Brush.Solid = True
- Me.TChart2.SubHeader.Brush.Visible = True
- '
- '
- '
- Me.TChart2.SubHeader.Font.Bold = False
- '
- '
- '
- Me.TChart2.SubHeader.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.SubHeader.Font.Brush.Solid = True
- Me.TChart2.SubHeader.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubHeader.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.SubHeader.Font.Shadow.Brush.Solid = True
- Me.TChart2.SubHeader.Font.Shadow.Brush.Visible = True
- Me.TChart2.SubHeader.Font.Size = 12
- Me.TChart2.SubHeader.Font.SizeFloat = 12.0!
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubHeader.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.SubHeader.ImageBevel.Brush.Solid = True
- Me.TChart2.SubHeader.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.SubHeader.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer))
- Me.TChart2.SubHeader.Shadow.Brush.Solid = True
- Me.TChart2.SubHeader.Shadow.Brush.Visible = True
- Me.TChart2.TabIndex = 0
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Back.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Walls.Back.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Walls.Back.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Walls.Back.Brush.Color = System.Drawing.Color.Silver
- Me.TChart2.Walls.Back.Brush.Solid = True
- Me.TChart2.Walls.Back.Brush.Visible = False
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Back.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Walls.Back.ImageBevel.Brush.Solid = True
- Me.TChart2.Walls.Back.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Back.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Walls.Back.Shadow.Brush.Solid = True
- Me.TChart2.Walls.Back.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Bottom.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Walls.Bottom.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Walls.Bottom.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Walls.Bottom.Brush.Color = System.Drawing.Color.White
- Me.TChart2.Walls.Bottom.Brush.Solid = True
- Me.TChart2.Walls.Bottom.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Bottom.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Walls.Bottom.ImageBevel.Brush.Solid = True
- Me.TChart2.Walls.Bottom.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Bottom.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Walls.Bottom.Shadow.Brush.Solid = True
- Me.TChart2.Walls.Bottom.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Left.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Walls.Left.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Walls.Left.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Walls.Left.Brush.Color = System.Drawing.Color.LightYellow
- Me.TChart2.Walls.Left.Brush.Solid = True
- Me.TChart2.Walls.Left.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Left.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Walls.Left.ImageBevel.Brush.Solid = True
- Me.TChart2.Walls.Left.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Left.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Walls.Left.Shadow.Brush.Solid = True
- Me.TChart2.Walls.Left.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Right.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart2.Walls.Right.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart2.Walls.Right.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart2.Walls.Right.Brush.Color = System.Drawing.Color.LightYellow
- Me.TChart2.Walls.Right.Brush.Solid = True
- Me.TChart2.Walls.Right.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Right.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart2.Walls.Right.ImageBevel.Brush.Solid = True
- Me.TChart2.Walls.Right.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Walls.Right.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart2.Walls.Right.Shadow.Brush.Solid = True
- Me.TChart2.Walls.Right.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart2.Zoom.Brush.Color = System.Drawing.Color.LightBlue
- Me.TChart2.Zoom.Brush.Solid = True
- Me.TChart2.Zoom.Brush.Visible = True
- '
- 'TableLayoutPanel1
- '
- Me.TableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.[Single]
- Me.TableLayoutPanel1.ColumnCount = 1
- Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
- Me.TableLayoutPanel1.Controls.Add(Me.PanelNavigation, 0, 0)
- Me.TableLayoutPanel1.Controls.Add(Me.TChart1, 0, 1)
- Me.TableLayoutPanel1.Controls.Add(Me.Panel_DisplayRange, 0, 2)
- Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.TableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
- Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(0)
- Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
- Me.TableLayoutPanel1.RowCount = 3
- Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 38.0!))
- Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
- Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36.0!))
- Me.TableLayoutPanel1.Size = New System.Drawing.Size(940, 458)
- Me.TableLayoutPanel1.TabIndex = 3
- '
- 'PanelNavigation
- '
- Me.PanelNavigation.Controls.Add(Me.Button_NavEnd)
- Me.PanelNavigation.Controls.Add(Me.Button_NavStart)
- Me.PanelNavigation.Controls.Add(Me.Label_Navigate)
- Me.PanelNavigation.Controls.Add(Me.Button_NavForward)
- Me.PanelNavigation.Controls.Add(Me.Button_NavBack)
- Me.PanelNavigation.Controls.Add(Me.NumericUpDown_NavMultiplier)
- Me.PanelNavigation.Controls.Add(Me.ComboBox_NavIncrement)
- Me.PanelNavigation.Dock = System.Windows.Forms.DockStyle.Fill
- Me.PanelNavigation.Location = New System.Drawing.Point(1, 1)
- Me.PanelNavigation.Margin = New System.Windows.Forms.Padding(0)
- Me.PanelNavigation.Name = "PanelNavigation"
- Me.PanelNavigation.Size = New System.Drawing.Size(938, 38)
- Me.PanelNavigation.TabIndex = 0
- '
- 'Button_NavEnd
- '
- Me.Button_NavEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
- Me.Button_NavEnd.Image = Global.BlueM.Wave.My.Resources.Resources.control_end
- Me.Button_NavEnd.Location = New System.Drawing.Point(906, 8)
- Me.Button_NavEnd.Name = "Button_NavEnd"
- Me.Button_NavEnd.Size = New System.Drawing.Size(23, 23)
- Me.Button_NavEnd.TabIndex = 6
- Me.ToolTip1.SetToolTip(Me.Button_NavEnd, "Navigate to end")
- Me.Button_NavEnd.UseVisualStyleBackColor = True
- '
- 'Button_NavStart
- '
- Me.Button_NavStart.Image = Global.BlueM.Wave.My.Resources.Resources.control_start
- Me.Button_NavStart.Location = New System.Drawing.Point(8, 8)
- Me.Button_NavStart.Name = "Button_NavStart"
- Me.Button_NavStart.Size = New System.Drawing.Size(23, 23)
- Me.Button_NavStart.TabIndex = 0
- Me.ToolTip1.SetToolTip(Me.Button_NavStart, "Navigate to start")
- Me.Button_NavStart.UseVisualStyleBackColor = True
- '
- 'Label_Navigate
- '
- Me.Label_Navigate.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.Label_Navigate.AutoSize = True
- Me.Label_Navigate.Location = New System.Drawing.Point(376, 13)
- Me.Label_Navigate.Name = "Label_Navigate"
- Me.Label_Navigate.Size = New System.Drawing.Size(53, 13)
- Me.Label_Navigate.TabIndex = 2
- Me.Label_Navigate.Text = "Navigate:"
- '
- 'Button_NavForward
- '
- Me.Button_NavForward.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
- Me.Button_NavForward.Image = CType(resources.GetObject("Button_NavForward.Image"), System.Drawing.Image)
- Me.Button_NavForward.Location = New System.Drawing.Point(831, 8)
- Me.Button_NavForward.Name = "Button_NavForward"
- Me.Button_NavForward.Size = New System.Drawing.Size(69, 23)
- Me.Button_NavForward.TabIndex = 5
- Me.ToolTip1.SetToolTip(Me.Button_NavForward, "Navigate forwards")
- Me.Button_NavForward.UseVisualStyleBackColor = True
- '
- 'Button_NavBack
- '
- Me.Button_NavBack.Image = CType(resources.GetObject("Button_NavBack.Image"), System.Drawing.Image)
- Me.Button_NavBack.Location = New System.Drawing.Point(37, 8)
- Me.Button_NavBack.Name = "Button_NavBack"
- Me.Button_NavBack.Size = New System.Drawing.Size(69, 23)
- Me.Button_NavBack.TabIndex = 1
- Me.ToolTip1.SetToolTip(Me.Button_NavBack, "Navigate backwards")
- Me.Button_NavBack.UseVisualStyleBackColor = True
- '
- 'NumericUpDown_NavMultiplier
- '
- Me.NumericUpDown_NavMultiplier.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.NumericUpDown_NavMultiplier.Location = New System.Drawing.Point(435, 9)
- Me.NumericUpDown_NavMultiplier.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
- Me.NumericUpDown_NavMultiplier.Name = "NumericUpDown_NavMultiplier"
- Me.NumericUpDown_NavMultiplier.Size = New System.Drawing.Size(40, 20)
- Me.NumericUpDown_NavMultiplier.TabIndex = 3
- Me.NumericUpDown_NavMultiplier.Value = New Decimal(New Integer() {1, 0, 0, 0})
- '
- 'ComboBox_NavIncrement
- '
- Me.ComboBox_NavIncrement.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.ComboBox_NavIncrement.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
- Me.ComboBox_NavIncrement.FormattingEnabled = True
- Me.ComboBox_NavIncrement.Items.AddRange(New Object() {"Centuries", "Decades", "Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"})
- Me.ComboBox_NavIncrement.Location = New System.Drawing.Point(481, 9)
- Me.ComboBox_NavIncrement.Name = "ComboBox_NavIncrement"
- Me.ComboBox_NavIncrement.Size = New System.Drawing.Size(81, 21)
- Me.ComboBox_NavIncrement.TabIndex = 4
- '
- 'TChart1
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Bottom.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Bottom.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Bottom.Labels.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Bottom.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Bottom.Labels.Font.Size = 9
- Me.TChart1.Axes.Bottom.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Bottom.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Bottom.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Bottom.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Bottom.Title.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Bottom.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Bottom.Title.Font.Size = 11
- Me.TChart1.Axes.Bottom.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Bottom.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Bottom.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Depth.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Depth.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Depth.Labels.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Depth.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Depth.Labels.Font.Size = 9
- Me.TChart1.Axes.Depth.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Depth.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Depth.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Depth.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Depth.Title.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Depth.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Depth.Title.Font.Size = 11
- Me.TChart1.Axes.Depth.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Depth.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Depth.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.DepthTop.Labels.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.DepthTop.Labels.Font.Size = 9
- Me.TChart1.Axes.DepthTop.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.DepthTop.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.DepthTop.Title.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.DepthTop.Title.Font.Size = 11
- Me.TChart1.Axes.DepthTop.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.DepthTop.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.DepthTop.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Left.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Left.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Left.Labels.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Left.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Left.Labels.Font.Size = 9
- Me.TChart1.Axes.Left.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Left.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Angle = 90
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Left.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Left.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Left.Title.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Left.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Left.Title.Font.Size = 11
- Me.TChart1.Axes.Left.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Left.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Left.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Right.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Right.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Right.Labels.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Right.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Right.Labels.Font.Size = 9
- Me.TChart1.Axes.Right.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Right.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Angle = 270
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Right.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Right.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Right.Title.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Right.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Right.Title.Font.Size = 11
- Me.TChart1.Axes.Right.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Right.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Right.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Top.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Top.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Top.Labels.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Top.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Top.Labels.Font.Size = 9
- Me.TChart1.Axes.Top.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Top.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Top.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Top.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Top.Title.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Top.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Top.Title.Font.Size = 11
- Me.TChart1.Axes.Top.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Top.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Top.UseMaxPixelPos = True
- Me.TChart1.Dock = System.Windows.Forms.DockStyle.Fill
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Footer.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Footer.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Footer.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Footer.Brush.Solid = True
- Me.TChart1.Footer.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Footer.Font.Bold = False
- '
- '
- '
- Me.TChart1.Footer.Font.Brush.Color = System.Drawing.Color.Red
- Me.TChart1.Footer.Font.Brush.Solid = True
- Me.TChart1.Footer.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Footer.Font.Shadow.Brush.Solid = True
- Me.TChart1.Footer.Font.Shadow.Brush.Visible = True
- Me.TChart1.Footer.Font.Size = 8
- Me.TChart1.Footer.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Footer.ImageBevel.Brush.Solid = True
- Me.TChart1.Footer.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Footer.Shadow.Brush.Solid = True
- Me.TChart1.Footer.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Header.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Header.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Header.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TChart1.Header.Brush.Solid = True
- Me.TChart1.Header.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Header.Font.Bold = False
- '
- '
- '
- Me.TChart1.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Header.Font.Brush.Solid = True
- Me.TChart1.Header.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Header.Font.Shadow.Brush.Solid = True
- Me.TChart1.Header.Font.Shadow.Brush.Visible = True
- Me.TChart1.Header.Font.Size = 12
- Me.TChart1.Header.Font.SizeFloat = 12.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Header.ImageBevel.Brush.Solid = True
- Me.TChart1.Header.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer))
- Me.TChart1.Header.Shadow.Brush.Solid = True
- Me.TChart1.Header.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Legend.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Legend.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Legend.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Legend.Brush.Solid = True
- Me.TChart1.Legend.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Legend.Font.Bold = False
- '
- '
- '
- Me.TChart1.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Legend.Font.Brush.Solid = True
- Me.TChart1.Legend.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Font.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Font.Shadow.Brush.Visible = True
- Me.TChart1.Legend.Font.Size = 9
- Me.TChart1.Legend.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Legend.ImageBevel.Brush.Solid = True
- Me.TChart1.Legend.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
- Me.TChart1.Legend.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Symbol.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Symbol.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Symbol.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Legend.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Legend.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Legend.Title.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Legend.Title.Brush.Solid = True
- Me.TChart1.Legend.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Legend.Title.Font.Bold = True
- '
- '
- '
- Me.TChart1.Legend.Title.Font.Brush.Color = System.Drawing.Color.Black
- Me.TChart1.Legend.Title.Font.Brush.Solid = True
- Me.TChart1.Legend.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Legend.Title.Font.Size = 8
- Me.TChart1.Legend.Title.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Legend.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Legend.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Title.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Title.Shadow.Brush.Visible = True
- Me.TChart1.Location = New System.Drawing.Point(1, 40)
- Me.TChart1.Margin = New System.Windows.Forms.Padding(0)
- Me.TChart1.Name = "TChart1"
- '
- '
- '
- '
- '
- '
- Me.TChart1.Panel.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Panel.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Panel.Brush.Solid = True
- Me.TChart1.Panel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Panel.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Panel.ImageBevel.Brush.Solid = True
- Me.TChart1.Panel.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Panel.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Panel.Shadow.Brush.Solid = True
- Me.TChart1.Panel.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Printer.Landscape = True
- Margins3.Bottom = 10
- Margins3.Left = 10
- Margins3.Right = 10
- Margins3.Top = 10
- Me.TChart1.Printer.Margins = Margins3
- Me.TChart1.Size = New System.Drawing.Size(938, 380)
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.SubFooter.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.SubFooter.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.SubFooter.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.SubFooter.Brush.Solid = True
- Me.TChart1.SubFooter.Brush.Visible = True
- '
- '
- '
- Me.TChart1.SubFooter.Font.Bold = False
- '
- '
- '
- Me.TChart1.SubFooter.Font.Brush.Color = System.Drawing.Color.Red
- Me.TChart1.SubFooter.Font.Brush.Solid = True
- Me.TChart1.SubFooter.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.SubFooter.Font.Shadow.Brush.Solid = True
- Me.TChart1.SubFooter.Font.Shadow.Brush.Visible = True
- Me.TChart1.SubFooter.Font.Size = 8
- Me.TChart1.SubFooter.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.SubFooter.ImageBevel.Brush.Solid = True
- Me.TChart1.SubFooter.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.SubFooter.Shadow.Brush.Solid = True
- Me.TChart1.SubFooter.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.SubHeader.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.SubHeader.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.SubHeader.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TChart1.SubHeader.Brush.Solid = True
- Me.TChart1.SubHeader.Brush.Visible = True
- '
- '
- '
- Me.TChart1.SubHeader.Font.Bold = False
- '
- '
- '
- Me.TChart1.SubHeader.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.SubHeader.Font.Brush.Solid = True
- Me.TChart1.SubHeader.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.SubHeader.Font.Shadow.Brush.Solid = True
- Me.TChart1.SubHeader.Font.Shadow.Brush.Visible = True
- Me.TChart1.SubHeader.Font.Size = 12
- Me.TChart1.SubHeader.Font.SizeFloat = 12.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.SubHeader.ImageBevel.Brush.Solid = True
- Me.TChart1.SubHeader.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer))
- Me.TChart1.SubHeader.Shadow.Brush.Solid = True
- Me.TChart1.SubHeader.Shadow.Brush.Visible = True
- Me.TChart1.TabIndex = 1
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Back.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Back.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Back.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Back.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Walls.Back.Brush.Solid = True
- Me.TChart1.Walls.Back.Brush.Visible = False
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Back.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Back.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Back.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Back.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Back.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Back.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Bottom.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Bottom.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Bottom.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Bottom.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Walls.Bottom.Brush.Solid = True
- Me.TChart1.Walls.Bottom.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Bottom.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Bottom.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Bottom.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Bottom.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Bottom.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Bottom.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Left.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Left.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Left.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Left.Brush.Color = System.Drawing.Color.LightYellow
- Me.TChart1.Walls.Left.Brush.Solid = True
- Me.TChart1.Walls.Left.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Left.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Left.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Left.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Left.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Left.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Left.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Right.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Right.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Right.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Right.Brush.Color = System.Drawing.Color.LightYellow
- Me.TChart1.Walls.Right.Brush.Solid = True
- Me.TChart1.Walls.Right.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Right.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Right.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Right.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Right.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Right.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Right.Shadow.Brush.Visible = True
+ Me.Button_NavForward.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.Button_NavForward.Image = CType(resources.GetObject("Button_NavForward.Image"), System.Drawing.Image)
+ Me.Button_NavForward.Location = New System.Drawing.Point(831, 8)
+ Me.Button_NavForward.Name = "Button_NavForward"
+ Me.Button_NavForward.Size = New System.Drawing.Size(69, 23)
+ Me.Button_NavForward.TabIndex = 5
+ Me.ToolTip1.SetToolTip(Me.Button_NavForward, "Navigate forwards")
+ Me.Button_NavForward.UseVisualStyleBackColor = True
'
+ 'Button_NavBack
'
+ Me.Button_NavBack.Image = CType(resources.GetObject("Button_NavBack.Image"), System.Drawing.Image)
+ Me.Button_NavBack.Location = New System.Drawing.Point(37, 8)
+ Me.Button_NavBack.Name = "Button_NavBack"
+ Me.Button_NavBack.Size = New System.Drawing.Size(69, 23)
+ Me.Button_NavBack.TabIndex = 1
+ Me.ToolTip1.SetToolTip(Me.Button_NavBack, "Navigate backwards")
+ Me.Button_NavBack.UseVisualStyleBackColor = True
'
+ 'NumericUpDown_NavMultiplier
'
+ Me.NumericUpDown_NavMultiplier.Anchor = System.Windows.Forms.AnchorStyles.Top
+ Me.NumericUpDown_NavMultiplier.Location = New System.Drawing.Point(435, 9)
+ Me.NumericUpDown_NavMultiplier.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
+ Me.NumericUpDown_NavMultiplier.Name = "NumericUpDown_NavMultiplier"
+ Me.NumericUpDown_NavMultiplier.Size = New System.Drawing.Size(40, 20)
+ Me.NumericUpDown_NavMultiplier.TabIndex = 3
+ Me.NumericUpDown_NavMultiplier.Value = New Decimal(New Integer() {1, 0, 0, 0})
'
+ 'ComboBox_NavIncrement
'
- Me.TChart1.Zoom.Brush.Color = System.Drawing.Color.LightBlue
- Me.TChart1.Zoom.Brush.Solid = True
- Me.TChart1.Zoom.Brush.Visible = True
+ Me.ComboBox_NavIncrement.Anchor = System.Windows.Forms.AnchorStyles.Top
+ Me.ComboBox_NavIncrement.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
+ Me.ComboBox_NavIncrement.FormattingEnabled = True
+ Me.ComboBox_NavIncrement.Items.AddRange(New Object() {"Centuries", "Decades", "Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"})
+ Me.ComboBox_NavIncrement.Location = New System.Drawing.Point(481, 9)
+ Me.ComboBox_NavIncrement.Name = "ComboBox_NavIncrement"
+ Me.ComboBox_NavIncrement.Size = New System.Drawing.Size(81, 21)
+ Me.ComboBox_NavIncrement.TabIndex = 4
'
'Panel_DisplayRange
'
@@ -3274,6 +856,14 @@ Partial Class MainWindow
Me.MaskedTextBox_NavStart.TabIndex = 0
Me.MaskedTextBox_NavStart.ValidatingType = GetType(Date)
'
+ 'MainPlot
+ '
+ Me.MainPlot.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.MainPlot.Location = New System.Drawing.Point(4, 43)
+ Me.MainPlot.Name = "MainPlot"
+ Me.MainPlot.Size = New System.Drawing.Size(932, 374)
+ Me.MainPlot.TabIndex = 3
+ '
'ProgressBar1
'
Me.ProgressBar1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -3326,7 +916,6 @@ Partial Class MainWindow
Friend WithEvents OpenFileDialog1 As System.Windows.Forms.OpenFileDialog
Friend WithEvents SplitContainer1 As System.Windows.Forms.SplitContainer
- Friend WithEvents TChart2 As Steema.TeeChart.TChart
Friend WithEvents ToolStripButton_New As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripDropDownButton_Open As System.Windows.Forms.ToolStripDropDownButton
Friend WithEvents ToolStripDropDownButton_Save As System.Windows.Forms.ToolStripDropDownButton
@@ -3353,7 +942,6 @@ Partial Class MainWindow
Friend WithEvents ComboBox_DisplayRangeUnit As System.Windows.Forms.ComboBox
Friend WithEvents MaskedTextBox_NavEnd As System.Windows.Forms.MaskedTextBox
Friend WithEvents MaskedTextBox_NavStart As System.Windows.Forms.MaskedTextBox
- Friend WithEvents TChart1 As Steema.TeeChart.TChart
Friend WithEvents PanelNavigation As System.Windows.Forms.Panel
Friend WithEvents NumericUpDown_NavMultiplier As System.Windows.Forms.NumericUpDown
Friend WithEvents ComboBox_NavIncrement As System.Windows.Forms.ComboBox
@@ -3401,4 +989,6 @@ Partial Class MainWindow
Friend WithEvents Button_NavStart As Button
Friend WithEvents Button_NavEnd As Button
Friend WithEvents ToolTip1 As ToolTip
+ Friend WithEvents MainPlot As ScottPlot.FormsPlot
+ Friend WithEvents OverviewPlot As ScottPlot.FormsPlot
End Class
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 9ab2fe8f..8d7062f7 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -138,12 +138,6 @@
120, 3
-
- False
-
-
- False
-
@@ -178,12 +172,6 @@
g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC
-
- False
-
-
- False
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -254,18 +242,18 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25xG
- rUJk6S2DFBWUGVKYc05zuTBJgRpO0TIR3bokXhRpMnM2MpREkQq5uFq5tRZCW9RYq8CXHtivi1zHmq76
- bOflnN/n9z3ndxhruI2lqGdIaCGHykL24dyo3ZgTdeKCkKuv0OLqvoDSZRvjNQrE3kFR0GMQkm59sWwB
- 5yNOXQHi6uPKXDoeOactDDo058R0+Z/EkuNyicrjC6eSy2Eu6Y/UeAORq4v+n3mv/T9SHJ2YalaDBafb
- OOtv4jEKLbHkBV8YIf3hK9Rq9AbCDWRgpd7rj9RSjUq8vu/JMx0YOXWbY6G1BKSxLOTWF8kWP4ULKPl6
- XI7UxWTWNROkSXCgbnR6SsmRWZV5IVpLYB/KiS7o+AiVVLWWuvaEk9UEFLeMA8LvBWszC5lWM6O0lsBO
- sKKxgXn9YUl2LQGZtYOQUTUAR8QPgHfTAl1mN2ANZtjD1sCUaoMGTrwk5OrhyjyBFTZabYCeMRK6Rz2r
- YqfJDfVdNlAPuIAlJSAJVQKtJZjXci3z3TwyNqg0Mb4q12gmoUpthUrVExDdGgdJ6wS06hyQJdQDY6f0
- F63GcWjy0bn7WPB5B6ZKFfRD58graDe+oFLn4Q7uBCnVpKXXAezLBOw7VAejNVl8Wk1gV+eLHdQ/p3C1
- sPfsXdjF0sC2422QWY6DXDsDrEsGQJgt8HGuHWytGIxVoLtpNcG0ioNOKjgWq5IVig3LpmBGNx+VwynR
- Qzh4ogm+vDXA1yUC3j+Tgzk3O2rcqMk69jeGNiXfgJmOIvA5NRB8o4dl1z142S8C1Rnkw+PK9C105d95
- JM0S2BTnYWmiCd5NNMNs10UwS9K+jfAObKVL/o1JnCEgStPhqZwNw+XoZ4KfvoM++n9MFce29xUdVuBl
- zKT4DoPxGz/xlyzmeBdoAAAAAElFTkSuQmCC
+ LUXGUsogRQVlhhTmnNNcLkxSoIbTq2UiunVJvCjSZOZsZCiJIhVycbVyay2EtqixVoEvPbBfF7mONV31
+ 2c7LOb/P73vO7zDWcRvLUM+wyEIOl4fsI3lRuzE36sSFIVd/kcXVcwGlyzbHaxRKvEPioMcgIt36Evki
+ LkCcukLE1c+Tu3R8cl5bFHRg5yR0+Z/EkuNyqdrjC6eSK2Ee6Y/UegORq0v+n/mv/T9SHF1c9RzGDc60
+ czbexGMUWWLJi74wQvrDV6jV5A2EG8nAaoPXH6mjGpV6fd+TZzu55PRtjoXWEpDG8pBbXyxf+hQupOTr
+ cTlSH5NZ10yQJsWBulHOtIojt6ryQ7SWwD6cG13UCRAqqXo9df0Jp2sIKGmdAETQB9YWFjKjYUZpLYGd
+ yInGBub1h6XZdQRk1g1BRvUgHJM8AP5NC3Sb3cBtNMM+NgbT6k0aOPHSkKuXJ/cEVtlojQF6x0noGfOs
+ iV0mNzR020Az6AKWjIAkVAW0lmBBy7Ms9PDJ2KDSJPiaXItNQbXGClXqJyC+NQHStklo0zkgS6QHxm7Z
+ L1qN48AK0Pn73ODzTq46VTgAXaOvoMP4gkpdgDu4E2RUk9Y+B7AvE3DgSD2M1WYJaDWBXVMgcVD/nMLT
+ wv6zd2EPC4MdJ9shswIHhXYWWJcMgDBb4eN8B9jauDBeie6l1QQzag46peRYrCpWKDYsm5IZ3XpcAWfE
+ D+HwqWb48tYAX5cJeP9MAea87KhxsyYbONgU2pJ8A2Y7i8HnxCD4Rg8rrnvwckAM6lzkw+Oq9G105d95
+ JMsS2pTnYXmyGd5NtsBc90UwS9O+jfIPbadL/o1JkiEkytLhqYINIxXoZ0KQvos++n9MlSd29hcfVeLl
+ zKT4DoPxGyNZlyJhSJPFAAAAAElFTkSuQmCC
@@ -310,9 +298,6 @@
1GNPK3gAAAAASUVORK5CYII=
-
- 458, 4
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAAK/INwWK6QAAAAlwSFlzAAAO
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index e6171579..f2e3efc7 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -33,10 +33,12 @@ Friend Class MainWindow
Friend isInitializing As Boolean
'ColorBand that is shown while zooming in main chart
- Friend colorBandZoom As Steema.TeeChart.Tools.ColorBand
+ 'TODO: TChart
+ 'Friend colorBandZoom As Steema.TeeChart.Tools.ColorBand
'ColorBand representing current view extent of main chart in OverviewChart
- Friend colorBandOverview As Steema.TeeChart.Tools.ColorBand
+ 'TODO: TChart
+ 'Friend colorBandOverview As Steema.TeeChart.Tools.ColorBand
'Cursors
Friend cursor_pan As Cursor
@@ -61,7 +63,7 @@ Friend Class MainWindow
Friend Property ChartMinX As DateTime
Get
Try
- Return DateTime.FromOADate(Me.TChart1.Axes.Bottom.Minimum)
+ Return DateTime.FromOADate(Me.MainPlot.Plot.XAxis.Dims.Min)
Catch ex As ArgumentException
Return Constants.minOADate
End Try
@@ -70,14 +72,14 @@ Friend Class MainWindow
If value < Constants.minOADate Then
value = Constants.minOADate
End If
- Me.TChart1.Axes.Bottom.Minimum = value.ToOADate()
+ Me.MainPlot.Plot.XAxis.Dims.SetAxis(min:=value.ToOADate(), max:=Nothing)
End Set
End Property
Friend Property ChartMaxX As DateTime
Get
Try
- Return DateTime.FromOADate(Me.TChart1.Axes.Bottom.Maximum)
+ Return DateTime.FromOADate(Me.MainPlot.Plot.XAxis.Dims.Max)
Catch ex As ArgumentException
Return Constants.maxOADate
End Try
@@ -86,7 +88,7 @@ Friend Class MainWindow
If value > Constants.maxOADate Then
value = Constants.maxOADate
End If
- Me.TChart1.Axes.Bottom.Maximum = value.ToOADate()
+ Me.MainPlot.Plot.XAxis.Dims.SetAxis(min:=Nothing, max:=value.ToOADate())
End Set
End Property
@@ -96,7 +98,7 @@ Friend Class MainWindow
Me.isInitializing = True
- ' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
+ ' Dieser Aufruf ist für den Windows Form-Designer erforderlich.
InitializeComponent()
'Charts einrichten
@@ -129,38 +131,44 @@ Friend Class MainWindow
'*********************
Friend Sub Init_Charts()
- 'Charts zurücksetzen
- Me.TChart1.Clear()
- Call Helpers.FormatChart(Me.TChart1.Chart)
-
- Me.TChart2.Clear()
- Call Helpers.FormatChart(Me.TChart2.Chart)
- Me.TChart2.Panel.Brush.Color = Color.FromArgb(239, 239, 239)
- Me.TChart2.Walls.Back.Color = Color.FromArgb(239, 239, 239)
- Me.TChart2.Header.Visible = False
- Me.TChart2.Legend.Visible = False
-
- 'Disable TeeChart builtin zooming and panning functionality
- Me.TChart1.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
- Me.TChart1.Zoom.History = False
- Me.TChart1.Zoom.Animated = True
- Me.TChart1.Panning.Allow = Steema.TeeChart.ScrollModes.None
-
- Me.TChart2.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
- Me.TChart2.Panning.Allow = Steema.TeeChart.ScrollModes.None
-
- 'Achsen
- Me.TChart1.Axes.Bottom.Automatic = False
- Me.TChart1.Axes.Bottom.Labels.Angle = 90
- Me.TChart1.Axes.Bottom.Labels.DateTimeFormat = Helpers.CurrentDateFormat
- Me.TChart1.Axes.Right.Title.Angle = 90
-
- Me.TChart2.Axes.Left.Labels.Font.Color = Color.FromArgb(100, 100, 100)
- Me.TChart2.Axes.Left.Labels.Font.Size = 8
- Me.TChart2.Axes.Bottom.Labels.Font.Color = Color.FromArgb(100, 100, 100)
- Me.TChart2.Axes.Bottom.Labels.Font.Size = 8
- Me.TChart2.Axes.Bottom.Automatic = False
- Me.TChart2.Axes.Bottom.Labels.DateTimeFormat = Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern 'date only without time
+ 'Charts zurücksetzen
+ Me.MainPlot.Plot.Clear()
+
+ Call Helpers.FormatChart(Me.MainPlot.Plot)
+
+ Me.OverviewPlot.Plot.Clear()
+ Call Helpers.FormatChart(Me.OverviewPlot.Plot)
+
+ Me.MainPlot.Refresh()
+ Me.OverviewPlot.Refresh()
+
+ 'TODO: TChart
+ 'Me.TChart2.Panel.Brush.Color = Color.FromArgb(239, 239, 239)
+ 'Me.TChart2.Walls.Back.Color = Color.FromArgb(239, 239, 239)
+ 'Me.TChart2.Header.Visible = False
+ 'Me.TChart2.Legend.Visible = False
+
+ ''Disable TeeChart builtin zooming and panning functionality
+ 'Me.MainPlot.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
+ 'Me.MainPlot.Zoom.History = False
+ 'Me.MainPlot.Zoom.Animated = True
+ 'Me.MainPlot.Panning.Allow = Steema.TeeChart.ScrollModes.None
+
+ 'Me.TChart2.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
+ 'Me.TChart2.Panning.Allow = Steema.TeeChart.ScrollModes.None
+
+ ''Achsen
+ 'Me.MainPlot.Axes.Bottom.Automatic = False
+ 'Me.MainPlot.Axes.Bottom.Labels.Angle = 90
+ 'Me.MainPlot.Axes.Bottom.Labels.DateTimeFormat = Helpers.CurrentDateFormat
+ 'Me.MainPlot.Axes.Right.Title.Angle = 90
+
+ 'Me.TChart2.Axes.Left.Labels.Font.Color = Color.FromArgb(100, 100, 100)
+ 'Me.TChart2.Axes.Left.Labels.Font.Size = 8
+ 'Me.TChart2.Axes.Bottom.Labels.Font.Color = Color.FromArgb(100, 100, 100)
+ 'Me.TChart2.Axes.Bottom.Labels.Font.Size = 8
+ 'Me.TChart2.Axes.Bottom.Automatic = False
+ 'Me.TChart2.Axes.Bottom.Labels.DateTimeFormat = Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern 'date only without time
'ColorBand einrichten
Call Me.Init_ColorBands()
@@ -172,27 +180,28 @@ Friend Class MainWindow
'''
Friend Sub Init_ColorBands()
- colorBandOverview = New Steema.TeeChart.Tools.ColorBand()
- Me.TChart2.Tools.Add(colorBandOverview)
- colorBandOverview.Axis = Me.TChart2.Axes.Bottom
- colorBandOverview.Brush.Color = Color.Coral
- colorBandOverview.Brush.Transparency = 50
- colorBandOverview.ResizeEnd = False
- colorBandOverview.ResizeStart = False
- colorBandOverview.EndLinePen.Visible = False
- colorBandOverview.StartLinePen.Visible = False
-
- colorBandZoom = New Steema.TeeChart.Tools.ColorBand()
- Me.TChart1.Tools.Add(colorBandZoom)
- colorBandZoom.Axis = Me.TChart1.Axes.Bottom
- colorBandZoom.Color = Color.Black
- colorBandZoom.Pen.Color = Color.Black
- colorBandZoom.Pen.Style = Drawing2D.DashStyle.Dash
- colorBandZoom.Brush.Visible = False
- colorBandZoom.ResizeEnd = False
- colorBandZoom.ResizeStart = False
- colorBandZoom.EndLinePen.Visible = True
- colorBandZoom.StartLinePen.Visible = True
+ 'TODO: TChart
+ 'colorBandOverview = New Steema.TeeChart.Tools.ColorBand()
+ 'Me.OverviewPlot.Tools.Add(colorBandOverview)
+ 'colorBandOverview.Axis = Me.OverviewPlot.Axes.Bottom
+ 'colorBandOverview.Brush.Color = Color.Coral
+ 'colorBandOverview.Brush.Transparency = 50
+ 'colorBandOverview.ResizeEnd = False
+ 'colorBandOverview.ResizeStart = False
+ 'colorBandOverview.EndLinePen.Visible = False
+ 'colorBandOverview.StartLinePen.Visible = False
+
+ 'colorBandZoom = New Steema.TeeChart.Tools.ColorBand()
+ 'Me.MainPlot.Tools.Add(colorBandZoom)
+ 'colorBandZoom.Axis = Me.MainPlot.Axes.Bottom
+ 'colorBandZoom.Color = Color.Black
+ 'colorBandZoom.Pen.Color = Color.Black
+ 'colorBandZoom.Pen.Style = Drawing2D.DashStyle.Dash
+ 'colorBandZoom.Brush.Visible = False
+ 'colorBandZoom.ResizeEnd = False
+ 'colorBandZoom.ResizeStart = False
+ 'colorBandZoom.EndLinePen.Visible = True
+ 'colorBandZoom.StartLinePen.Visible = True
End Sub
Private Overloads Sub Close() Implements IView.Close
diff --git a/source/Wave.vbproj b/source/Wave.vbproj
index 47021e13..94499ac5 100644
--- a/source/Wave.vbproj
+++ b/source/Wave.vbproj
@@ -1,605 +1,608 @@
-
-
-
-
- Debug
- AnyCPU
- {CE4132A2-2E2F-4F54-B66D-1BAA928D499E}
- WinExe
- Sub Main
- BlueM.Wave
- Wave
- 512
- Empty
- v4.8
- true
- false
-
-
- On
-
-
- Binary
-
-
- Off
-
-
- On
-
-
- Resources\Wave.ico
-
-
- true
- true
- true
- bin\x64\Debug\
- Wave.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
- full
- x64
- false
-
-
- true
- bin\x64\Release\
- Wave.xml
- true
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
- None
- x64
- false
-
-
- true
- true
- true
- bin\x86\Debug\
- Wave.xml
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
- full
- x86
- true
-
-
- true
- bin\x86\Release\
- Wave.xml
- true
- 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
- None
- x86
- true
-
-
-
- False
- lib\MathParserNet\MathParserNet.dll
-
-
- False
- lib\modelEAU\modelEAU.SWMM.DllAdapter.dll
-
-
-
-
- False
- lib\SQLite\System.Data.SQLite.dll
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AnalysisResultChart.vb
-
-
- Form
-
-
- AnalysisDialog.vb
-
-
- Form
-
-
-
- AnalysisResultTable.vb
-
-
- Form
-
-
-
- AnnualRecurrenceProbability_Dialog.vb
-
-
- Form
-
-
-
- Autocorrelation_Dialog.vb
-
-
- Form
-
-
-
-
- AccumulateDialog.vb
-
-
- Form
-
-
- ChangeTimestepDialog.vb
-
-
- Form
-
-
-
-
- Comparison_Dialog.vb
-
-
- Form
-
-
-
-
-
-
- AnnualStatistics_Dialog.vb
-
-
- Form
-
-
- GoodnessOfFit_Dialog.vb
-
-
- Form
-
-
-
- HistogramDialog.vb
-
-
- Form
-
-
-
- LinearRegression_Dialog.vb
-
-
- Form
-
-
-
- MonthlyStatisticsDialog.vb
-
-
- Form
-
-
-
-
-
- TimestepAnalysisDialog.vb
-
-
- Form
-
-
- SaveProjectFileDialog.vb
-
-
- Form
-
-
- SelectSeriesDialog.vb
-
-
- Form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- AboutBox.vb
-
-
- Form
-
-
- AxisDialog.vb
-
-
- Form
-
-
- ConvertErrorValuesDialog.vb
-
-
- Form
-
-
- CutDialog.vb
-
-
- Form
-
-
- CalculatorDialog.vb
-
-
- Form
-
-
- ExportDiag.vb
-
-
- Form
-
-
- ImportCSVDialog.vb
-
-
- Form
-
-
- LogWindow.vb
-
-
- Form
-
-
- MergeSeriesDialog.vb
-
-
- Form
-
-
- MetadataDialog.vb
-
-
- Form
-
-
- SeriesEditorDialog.vb
-
-
- Form
-
-
-
-
- DFS0_ExportDialog.vb
-
-
- Form
-
-
-
-
-
-
-
-
-
- HYDRO_AS-2D_Diag.vb
-
-
- Form
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- True
- Application.myapp
- True
-
-
- True
- True
- Resources.resx
-
-
- True
- Settings.settings
- True
-
-
-
- MainWindow.vb
-
-
- Form
-
-
- PropertiesWindow.vb
-
-
- Form
-
-
- ValuesWindow.vb
-
-
- Form
-
-
-
-
-
- AnalysisResultChart.vb
-
-
- AnalysisDialog.vb
-
-
- AnalysisResultTable.vb
-
-
- AnnualRecurrenceProbability_Dialog.vb
-
-
- Autocorrelation_Dialog.vb
-
-
- AccumulateDialog.vb
-
-
- ChangeTimestepDialog.vb
-
-
- Comparison_Dialog.vb
-
-
- AnnualStatistics_Dialog.vb
-
-
- GoodnessOfFit_Dialog.vb
-
-
- HistogramDialog.vb
-
-
- LinearRegression_Dialog.vb
-
-
- MonthlyStatisticsDialog.vb
-
-
- TimestepAnalysisDialog.vb
-
-
- AboutBox.vb
-
-
- AxisDialog.vb
-
-
- ConvertErrorValuesDialog.vb
-
-
- CutDialog.vb
-
-
- CalculatorDialog.vb
-
-
- SaveProjectFileDialog.vb
-
-
- ExportDiag.vb
-
-
- SelectSeriesDialog.vb
-
-
- ImportCSVDialog.vb
-
-
- LogWindow.vb
-
-
- MergeSeriesDialog.vb
-
-
- MetadataDialog.vb
-
-
- SeriesEditorDialog.vb
-
-
- DFS0_ExportDialog.vb
-
-
- HYDRO_AS-2D_Diag.vb
-
-
- VbMyResourcesResXFileCodeGenerator
- Resources.Designer.vb
- My.Resources
- Designer
-
-
-
- MainWindow.vb
-
-
- PropertiesWindow.vb
-
-
- ValuesWindow.vb
-
-
-
-
- Always
-
-
-
-
- MyApplicationCodeGenerator
- Application.Designer.vb
-
-
-
-
- SettingsSingleFileGenerator
- My
- Settings.Designer.vb
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 22.0.3
-
-
- 1.16.0
-
-
- 5.0.0
-
-
- 13.0.3
-
-
- 4.2023.4.18
-
-
-
-
+
+
+
+
+ Debug
+ AnyCPU
+ {CE4132A2-2E2F-4F54-B66D-1BAA928D499E}
+ WinExe
+ Sub Main
+ BlueM.Wave
+ Wave
+ 512
+ Empty
+ v4.8
+ true
+ false
+
+
+ On
+
+
+ Binary
+
+
+ Off
+
+
+ On
+
+
+ Resources\Wave.ico
+
+
+ true
+ true
+ true
+ bin\x64\Debug\
+ Wave.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ full
+ x64
+ false
+
+
+ true
+ bin\x64\Release\
+ Wave.xml
+ true
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ None
+ x64
+ false
+
+
+ true
+ true
+ true
+ bin\x86\Debug\
+ Wave.xml
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ full
+ x86
+ true
+
+
+ true
+ bin\x86\Release\
+ Wave.xml
+ true
+ 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022
+ None
+ x86
+ true
+
+
+
+ False
+ lib\MathParserNet\MathParserNet.dll
+
+
+ False
+ lib\modelEAU\modelEAU.SWMM.DllAdapter.dll
+
+
+
+
+ False
+ lib\SQLite\System.Data.SQLite.dll
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AnalysisResultChart.vb
+
+
+ Form
+
+
+ AnalysisDialog.vb
+
+
+ Form
+
+
+
+ AnalysisResultTable.vb
+
+
+ Form
+
+
+
+ AnnualRecurrenceProbability_Dialog.vb
+
+
+ Form
+
+
+
+ Autocorrelation_Dialog.vb
+
+
+ Form
+
+
+
+
+ AccumulateDialog.vb
+
+
+ Form
+
+
+ ChangeTimestepDialog.vb
+
+
+ Form
+
+
+
+
+ Comparison_Dialog.vb
+
+
+ Form
+
+
+
+
+
+
+ AnnualStatistics_Dialog.vb
+
+
+ Form
+
+
+ GoodnessOfFit_Dialog.vb
+
+
+ Form
+
+
+
+ HistogramDialog.vb
+
+
+ Form
+
+
+
+ LinearRegression_Dialog.vb
+
+
+ Form
+
+
+
+ MonthlyStatisticsDialog.vb
+
+
+ Form
+
+
+
+
+
+ TimestepAnalysisDialog.vb
+
+
+ Form
+
+
+ SaveProjectFileDialog.vb
+
+
+ Form
+
+
+ SelectSeriesDialog.vb
+
+
+ Form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ AboutBox.vb
+
+
+ Form
+
+
+ AxisDialog.vb
+
+
+ Form
+
+
+ ConvertErrorValuesDialog.vb
+
+
+ Form
+
+
+ CutDialog.vb
+
+
+ Form
+
+
+ CalculatorDialog.vb
+
+
+ Form
+
+
+ ExportDiag.vb
+
+
+ Form
+
+
+ ImportCSVDialog.vb
+
+
+ Form
+
+
+ LogWindow.vb
+
+
+ Form
+
+
+ MergeSeriesDialog.vb
+
+
+ Form
+
+
+ MetadataDialog.vb
+
+
+ Form
+
+
+ SeriesEditorDialog.vb
+
+
+ Form
+
+
+
+
+ DFS0_ExportDialog.vb
+
+
+ Form
+
+
+
+
+
+
+
+
+
+ HYDRO_AS-2D_Diag.vb
+
+
+ Form
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ Application.myapp
+ True
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+
+ MainWindow.vb
+
+
+ Form
+
+
+ PropertiesWindow.vb
+
+
+ Form
+
+
+ ValuesWindow.vb
+
+
+ Form
+
+
+
+
+
+ AnalysisResultChart.vb
+
+
+ AnalysisDialog.vb
+
+
+ AnalysisResultTable.vb
+
+
+ AnnualRecurrenceProbability_Dialog.vb
+
+
+ Autocorrelation_Dialog.vb
+
+
+ AccumulateDialog.vb
+
+
+ ChangeTimestepDialog.vb
+
+
+ Comparison_Dialog.vb
+
+
+ AnnualStatistics_Dialog.vb
+
+
+ GoodnessOfFit_Dialog.vb
+
+
+ HistogramDialog.vb
+
+
+ LinearRegression_Dialog.vb
+
+
+ MonthlyStatisticsDialog.vb
+
+
+ TimestepAnalysisDialog.vb
+
+
+ AboutBox.vb
+
+
+ AxisDialog.vb
+
+
+ ConvertErrorValuesDialog.vb
+
+
+ CutDialog.vb
+
+
+ CalculatorDialog.vb
+
+
+ SaveProjectFileDialog.vb
+
+
+ ExportDiag.vb
+
+
+ SelectSeriesDialog.vb
+
+
+ ImportCSVDialog.vb
+
+
+ LogWindow.vb
+
+
+ MergeSeriesDialog.vb
+
+
+ MetadataDialog.vb
+
+
+ SeriesEditorDialog.vb
+
+
+ DFS0_ExportDialog.vb
+
+
+ HYDRO_AS-2D_Diag.vb
+
+
+ VbMyResourcesResXFileCodeGenerator
+ Resources.Designer.vb
+ My.Resources
+ Designer
+
+
+
+ MainWindow.vb
+
+
+ PropertiesWindow.vb
+
+
+ ValuesWindow.vb
+
+
+
+
+ Always
+
+
+
+
+ MyApplicationCodeGenerator
+ Application.Designer.vb
+
+
+
+
+ SettingsSingleFileGenerator
+ My
+ Settings.Designer.vb
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 22.0.3
+
+
+ 1.16.0
+
+
+ 5.0.0
+
+
+ 13.0.3
+
+
+ 4.2023.4.18
+
+
+ 4.1.69
+
+
+
+
copy $(ProjectDir)..\COPYING $(TargetDir)COPYING
copy $(ProjectDir)..\COPYING.LESSER $(TargetDir)COPYING.LESSER
copy $(ProjectDir)lib\MathNet\MathNet.Numerics.license.txt $(TargetDir)MathNet.Numerics.license.txt
copy $(ProjectDir)lib\MathParserNet\MathParserNet.license.html $(TargetDir)MathParserNet.license.html
copy $(ProjectDir)lib\Newtonsoft.Json\Newtonsoft.Json.LICENSE.md $(TargetDir)Newtonsoft.Json.LICENSE.md
copy $(ProjectDir)lib\DHI.DFS\DHI.DFS.license.txt $(TargetDir)DHI.DFS.license.txt
-copy $(ProjectDir)lib\SQLite\$(PlatformName)\SQLite.Interop.dll $(TargetDir)SQLite.Interop.dll
-
+copy $(ProjectDir)lib\SQLite\$(PlatformName)\SQLite.Interop.dll $(TargetDir)SQLite.Interop.dll
+
\ No newline at end of file
From 7eeb26a7d34da2fc74afdba95c4716fe5b71129a Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 13:15:59 +0100
Subject: [PATCH 02/57] implement assignSeriesToAxis()
---
source/Controllers/WaveController.vb | 104 +++++++++++----------------
1 file changed, 43 insertions(+), 61 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 5dd201a1..2388fffe 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2287,9 +2287,8 @@ Friend Class WaveController
Line1.MarkerShape = ScottPlot.MarkerShape.none
End If
- 'TODO: TChart
'Y-Achsenzuordnung
- 'assignSeriesToAxis(Line1, ts.Unit)
+ assignSeriesToAxis(Line1, ts.Unit)
'Interpretation
Select Case ts.Interpretation
@@ -2413,69 +2412,52 @@ Friend Class WaveController
'TODO: for now, assign series to axes by matching the axis label to the unit
- If IsNothing(View.MainPlot.Plot.YAxis) Then
- 'use left axis for the first time
- View.MainPlot.Plot.YAxis.AxisLabel.Label = unit
- 'TODO: TChart
- 'View.MainPlot.Plot.YAxis.Tag = unit
- View.MainPlot.Plot.YAxis.IsVisible = True
- View.MainPlot.Plot.YAxis.LockLimits(False)
- 'View.MainPlot.Plot.YAxis.MaximumOffset = 5
- series.YAxisIndex = 0
-
- ElseIf View.MainPlot.Plot.YAxis.AxisLabel.Label = unit Then
- 'reuse left axis
- series.YAxisIndex = 0
-
- ElseIf IsNothing(View.MainPlot.Plot.YAxis2) Then
- 'use right axis for the first time
- View.MainPlot.Plot.YAxis2.AxisLabel.Label = unit
- 'TODO: TChart
- 'View.MainPlot.Plot.YAxis2.Tag = unit
- View.MainPlot.Plot.YAxis2.IsVisible = True
- View.MainPlot.Plot.YAxis2.LockLimits(False)
- 'View.MainPlot.Plot.YAxis2.MaximumOffset = 5
- series.YAxisIndex = 1
-
- ElseIf View.MainPlot.Plot.YAxis2.AxisLabel.Label = unit Then
- 'reuse right axis
- series.YAxisIndex = 1
- Else
- 'check for reusable custom axes
- Dim axes As IEnumerable(Of ScottPlot.Renderable.Axis)
- axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ 'check for reusable custom axes
+ Dim axes As IEnumerable(Of ScottPlot.Renderable.Axis)
+ axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
- Dim axisFound As Boolean = False
- For Each axis As ScottPlot.Renderable.Axis In axes
- If axis.AxisLabel.Label = unit Then
- series.YAxisIndex = axis.AxisIndex
- axisFound = True
- Exit For
- End If
- Next
- If Not axisFound Then
- 'create a new custom axis
- Dim axis As ScottPlot.Renderable.Axis
- Dim number As Integer = axes.Count + 1
- 'Place every second axis on the right
- If number Mod 2 = 0 Then
- axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Right)
- Else
- axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Left)
- End If
- axis.AxisLabel.Label = unit
- 'TODO: TChart
- 'axis.Tag = unit
+ Dim axisFound As Boolean = False
+ For Each axis As ScottPlot.Renderable.Axis In axes
+ If axis.AxisLabel.Label = "" Then
+ 'this axis hasn't been used yet
axis.IsVisible = True
- axis.LockLimits(False)
- 'Calculate position
- axis.SetOffset(Math.Ceiling((number) / 2) * 8)
- 'assign series to new axis
- series.YAxisIndex = axis.AxisIndex
+ axis.Ticks(enable:=True)
+ axis.AxisTicks.IsVisible = True
+ axis.AxisLabel.IsVisible = True
+ axis.AxisLabel.Label = unit
- 'update axis dialog
- Call Me.UpdateAxisDialog()
+ series.YAxisIndex = axis.AxisIndex
+ axisFound = True
+ Exit For
+ ElseIf axis.AxisLabel.Label = unit Then
+ 'suitable axis found
+ series.YAxisIndex = axis.AxisIndex
+ axisFound = True
+ Exit For
End If
+ Next
+ If Not axisFound Then
+ 'create a new custom axis
+ Dim axis As ScottPlot.Renderable.Axis
+ Dim number As Integer = axes.Count + 1
+ 'Place every second axis on the right
+ If number Mod 2 = 0 Then
+ axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Right)
+ Else
+ axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Left)
+ End If
+ axis.AxisLabel.Label = unit
+ 'TODO: TChart
+ 'axis.Tag = unit
+ axis.IsVisible = True
+ axis.LockLimits(False)
+ 'Calculate position
+ 'axis.SetOffset(Math.Ceiling((number) / 2) * 8)
+ 'assign series to new axis
+ series.YAxisIndex = axis.AxisIndex
+
+ 'update axis dialog
+ Call Me.UpdateAxisDialog()
End If
End Sub
From 191b7d0f8b8b0f6a85914820d690c0e5bd734bb2 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 13:27:27 +0100
Subject: [PATCH 03/57] implement AddSeriesToOverview
---
source/Controllers/WaveController.vb | 73 ++++++++++------------------
source/Views/MainWindow.vb | 8 +--
2 files changed, 31 insertions(+), 50 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 2388fffe..be9d9510 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2324,58 +2324,39 @@ Friend Class WaveController
''' the TimeSeries to add
Private Sub AddSeriesToOverview(ts As TimeSeries)
- 'TODO: TChart
- ''Linien instanzieren
- 'Dim Line2 As New Steema.TeeChart.Styles.FastLine(View.TChart2.Chart)
-
- ''Do not paint NaN values
- 'Line2.TreatNaNAsNull = True
- 'Line2.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
+ 'Linien instanzieren
+ Dim Line2 As ScottPlot.Plottable.ScatterPlot
+ Line2 = View.OverviewPlot.Plot.AddScatterLines(ts.Dates.Select(Function(t As DateTime) t.ToOADate()).ToArray(), ts.Values.ToArray())
- ''X-Werte als Zeitdaten einstellen
- 'Line2.XValues.DateTime = True
+ 'Do not paint NaN values
+ Line2.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
+ 'TODO: TChart
''Store id as Tag property
'Line2.Tag = ts.Id
- ''Namen vergeben
- 'Line2.Title = ts.Title
+ 'Namen vergeben
+ Line2.Label = ts.Title
- ''set display options
- 'If Not ts.DisplayOptions.Color.IsEmpty Then
- ' Line2.Color = ts.DisplayOptions.Color
- 'End If
- 'Line2.LinePen.Style = ts.DisplayOptions.LineStyle
- 'Line2.LinePen.Width = ts.DisplayOptions.LineWidth
-
- ''Stützstellen zur Serie hinzufügen
- 'Line2.BeginUpdate()
- 'If Double.IsNaN(ts.FirstValue) Then
- ' 'TeeChart throws an OverflowException when attempting to display a FastLine that begins with a NaN value as a step function!
- ' 'To avoid this we generally do not add NaN values at the beginning of the time series to the FastLine (#67)
- ' Dim isNaN As Boolean = True
- ' For Each node As KeyValuePair(Of DateTime, Double) In ts.Nodes
- ' If isNaN Then
- ' isNaN = isNaN And Double.IsNaN(node.Value)
- ' End If
- ' If Not isNaN Then
- ' Line2.Add(node.Key, node.Value)
- ' End If
- ' Next
- 'Else
- ' Line2.Add(ts.Dates.ToArray(), ts.Values.ToArray())
- 'End If
- 'Line2.EndUpdate()
-
- ''Interpretation
- 'Select Case ts.Interpretation
- ' Case TimeSeries.InterpretationEnum.BlockRight
- ' Line2.Stairs = True
- ' Case TimeSeries.InterpretationEnum.BlockLeft,
- ' TimeSeries.InterpretationEnum.CumulativePerTimestep
- ' Line2.Stairs = True
- ' Line2.InvertedStairs = True
- 'End Select
+ 'set display options
+ If Not ts.DisplayOptions.Color.IsEmpty Then
+ Line2.Color = ts.DisplayOptions.Color
+ End If
+ Line2.LineStyle = ts.DisplayOptions.LineStyle
+ Line2.LineWidth = ts.DisplayOptions.LineWidth
+
+ 'Interpretation
+ Select Case ts.Interpretation
+ Case TimeSeries.InterpretationEnum.BlockRight
+ Line2.StepDisplay = True
+ Line2.StepDisplayRight = True
+ Case TimeSeries.InterpretationEnum.BlockLeft,
+ TimeSeries.InterpretationEnum.CumulativePerTimestep
+ Line2.StepDisplay = True
+ Line2.StepDisplayRight = False
+ End Select
+
+ View.OverviewPlot.Refresh()
End Sub
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index f2e3efc7..41a5a929 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -131,15 +131,15 @@ Friend Class MainWindow
'*********************
Friend Sub Init_Charts()
- 'Charts zurücksetzen
+ 'initialize main plot
Me.MainPlot.Plot.Clear()
-
Call Helpers.FormatChart(Me.MainPlot.Plot)
+ Me.MainPlot.Refresh()
+ 'initialize overview plot
Me.OverviewPlot.Plot.Clear()
Call Helpers.FormatChart(Me.OverviewPlot.Plot)
-
- Me.MainPlot.Refresh()
+ Me.OverviewPlot.Plot.Legend.IsVisible = False
Me.OverviewPlot.Refresh()
'TODO: TChart
From 9c0ce25f453701fc823b65be4411ea4f88d8ee84 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 13:31:22 +0100
Subject: [PATCH 04/57] fix xaxis updates not being displayed
---
source/Controllers/WaveController.vb | 2 ++
source/Views/MainWindow.vb | 2 ++
2 files changed, 4 insertions(+)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index be9d9510..b3004844 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2206,6 +2206,8 @@ Friend Class WaveController
'TODO: Update Y-Axis extents
'View.OverviewPlot.Plot.YAxis.Dims.
+ View.MainPlot.Refresh()
+ View.OverviewPlot.Refresh()
End If
End Sub
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index 41a5a929..23d094cf 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -73,6 +73,7 @@ Friend Class MainWindow
value = Constants.minOADate
End If
Me.MainPlot.Plot.XAxis.Dims.SetAxis(min:=value.ToOADate(), max:=Nothing)
+ Me.MainPlot.Refresh()
End Set
End Property
@@ -89,6 +90,7 @@ Friend Class MainWindow
value = Constants.maxOADate
End If
Me.MainPlot.Plot.XAxis.Dims.SetAxis(min:=Nothing, max:=value.ToOADate())
+ Me.MainPlot.Refresh()
End Set
End Property
From cb23b31505e0b0d959e8ace8701199a4858f1456 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 13:38:15 +0100
Subject: [PATCH 05/57] disable zoom and pan in overview chart
---
source/Views/MainWindow.vb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index 23d094cf..70542935 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -142,6 +142,8 @@ Friend Class MainWindow
Me.OverviewPlot.Plot.Clear()
Call Helpers.FormatChart(Me.OverviewPlot.Plot)
Me.OverviewPlot.Plot.Legend.IsVisible = False
+ Me.OverviewPlot.Configuration.Pan = False
+ Me.OverviewPlot.Configuration.Zoom = False
Me.OverviewPlot.Refresh()
'TODO: TChart
From 1575d132172733f44dee709282212c7572bed3ff Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 14:10:57 +0100
Subject: [PATCH 06/57] implement ViewExtentRectangle for overview chart
---
source/Controllers/WaveController.vb | 6 +++---
source/Views/MainWindow.vb | 25 ++++++++++---------------
2 files changed, 13 insertions(+), 18 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index b3004844..eac0dcf5 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2217,9 +2217,9 @@ Friend Class WaveController
'''
'''
Private Sub UpdateOverviewZoomExtent()
- 'TODO: TChart
- 'View.colorBandOverview.Start = View.ChartMinX.ToOADate()
- 'View.colorBandOverview.End = View.ChartMaxX.ToOADate()
+ Dim limits As ScottPlot.AxisLimits = View.OverviewPlot.Plot.GetAxisLimits()
+ View.ViewExtentRectangle.Rectangle = New ScottPlot.CoordinateRect(View.ChartMinX.ToOADate(), View.ChartMaxX.ToOADate(), limits.YMin, limits.YMax)
+ View.OverviewPlot.Refresh()
End Sub
'''
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index 70542935..4ed9e11c 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -32,13 +32,12 @@ Friend Class MainWindow
'''
Friend isInitializing As Boolean
- 'ColorBand that is shown while zooming in main chart
'TODO: TChart
- 'Friend colorBandZoom As Steema.TeeChart.Tools.ColorBand
+ 'ColorBand that Is shown while zooming In main chart
+ 'Friend colorBandZoom As ScottPlot.Plottable.RectanglePlot
- 'ColorBand representing current view extent of main chart in OverviewChart
- 'TODO: TChart
- 'Friend colorBandOverview As Steema.TeeChart.Tools.ColorBand
+ 'Rectangle representing current view extent of main chart in overview chart
+ Friend ViewExtentRectangle As ScottPlot.Plottable.RectanglePlot
'Cursors
Friend cursor_pan As Cursor
@@ -136,6 +135,7 @@ Friend Class MainWindow
'initialize main plot
Me.MainPlot.Plot.Clear()
Call Helpers.FormatChart(Me.MainPlot.Plot)
+ Me.MainPlot.Configuration.LockVerticalAxis = True 'TODO: this only locks YAxis1
Me.MainPlot.Refresh()
'initialize overview plot
@@ -184,17 +184,12 @@ Friend Class MainWindow
'''
Friend Sub Init_ColorBands()
- 'TODO: TChart
- 'colorBandOverview = New Steema.TeeChart.Tools.ColorBand()
- 'Me.OverviewPlot.Tools.Add(colorBandOverview)
- 'colorBandOverview.Axis = Me.OverviewPlot.Axes.Bottom
- 'colorBandOverview.Brush.Color = Color.Coral
- 'colorBandOverview.Brush.Transparency = 50
- 'colorBandOverview.ResizeEnd = False
- 'colorBandOverview.ResizeStart = False
- 'colorBandOverview.EndLinePen.Visible = False
- 'colorBandOverview.StartLinePen.Visible = False
+ Dim limits As ScottPlot.AxisLimits = Me.OverviewPlot.Plot.GetAxisLimits()
+ ViewExtentRectangle = Me.OverviewPlot.Plot.AddRectangle(limits.XMin, limits.XMax, limits.YMin, limits.YMax)
+ ViewExtentRectangle.BorderColor = Color.Coral
+ ViewExtentRectangle.HatchColor = Color.Coral
+ 'TODO: TChart
'colorBandZoom = New Steema.TeeChart.Tools.ColorBand()
'Me.MainPlot.Tools.Add(colorBandZoom)
'colorBandZoom.Axis = Me.MainPlot.Axes.Bottom
From 448ae4c4b5da83fe2ab04bbb570240e395aa8d41 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 16:07:19 +0100
Subject: [PATCH 07/57] set fixed Y axes bounds and reset all axes in
FormatChart
---
source/Controllers/WaveController.vb | 31 ++++++++++-
source/Helpers.vb | 78 +++++-----------------------
2 files changed, 43 insertions(+), 66 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index eac0dcf5..cded1a92 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2409,11 +2409,28 @@ Friend Class WaveController
axis.AxisLabel.IsVisible = True
axis.AxisLabel.Label = unit
+ 'set axis bounds
+ Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
+ axis.Dims.SetAxis(serieslimits.YMin, serieslimits.YMax)
+ axis.SetBoundary(serieslimits.YMin, serieslimits.YMax)
+ axis.SetInnerBoundary(serieslimits.YMin, serieslimits.YMax)
+
+ 'assign series to new axis
series.YAxisIndex = axis.AxisIndex
axisFound = True
Exit For
ElseIf axis.AxisLabel.Label = unit Then
- 'suitable axis found
+ 'suitable existing axis found
+
+ 'update axis bounds
+ Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
+ Dim axisMin As Double = axis.Dims.Min
+ Dim axisMax As Double = axis.Dims.Max
+ axis.Dims.SetAxis(Math.Min(axisMin, serieslimits.YMin), Math.Max(axisMax, serieslimits.YMax))
+ axis.SetBoundary(Math.Min(axisMin, serieslimits.YMin), Math.Max(axisMax, serieslimits.YMax))
+ axis.SetInnerBoundary(Math.Min(axisMin, serieslimits.YMin), Math.Max(axisMax, serieslimits.YMax))
+
+ 'assign series to new axis
series.YAxisIndex = axis.AxisIndex
axisFound = True
Exit For
@@ -2423,19 +2440,29 @@ Friend Class WaveController
'create a new custom axis
Dim axis As ScottPlot.Renderable.Axis
Dim number As Integer = axes.Count + 1
+
'Place every second axis on the right
If number Mod 2 = 0 Then
axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Right)
Else
axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Left)
End If
+
axis.AxisLabel.Label = unit
+
'TODO: TChart
'axis.Tag = unit
axis.IsVisible = True
- axis.LockLimits(False)
+
'Calculate position
'axis.SetOffset(Math.Ceiling((number) / 2) * 8)
+
+ 'set axis bounds
+ Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
+ axis.Dims.SetAxis(serieslimits.YMin, serieslimits.YMax)
+ axis.SetBoundary(serieslimits.YMin, serieslimits.YMax)
+ axis.SetInnerBoundary(serieslimits.YMin, serieslimits.YMax)
+
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
diff --git a/source/Helpers.vb b/source/Helpers.vb
index 21847511..1a88b4da 100644
--- a/source/Helpers.vb
+++ b/source/Helpers.vb
@@ -224,7 +224,7 @@ Public Module Helpers
End Function
'''
- ''' Default formatting for a plot
+ ''' Default formatting for a chart
'''
'''
Friend Sub FormatChart(ByRef plot As ScottPlot.Plot)
@@ -232,77 +232,27 @@ Public Module Helpers
'set default color palette
plot.Palette = ScottPlot.Palette.Category10
- 'TODO: TChart
- 'plot.Aspect.View3D = False
- ''plot.BackColor = Color.White
- 'plot.Panel.Gradient.Visible = False
- 'plot.Panel.Brush.Color = Color.White
- 'plot.Walls.Back.Transparent = False
- 'plot.Walls.Back.Gradient.Visible = False
- 'plot.Walls.Back.Color = Color.White
-
- ''Header
- 'plot.Header.Font.Name = "GenericSansSerif"
- 'plot.Header.Font.Color = Color.Black
- 'plot.Header.Font.Size = 12
- 'plot.Header.Text = ""
-
- 'Legende
+ 'legend
Dim legend As ScottPlot.Renderable.Legend
legend = plot.Legend(enable:=True, location:=ScottPlot.Alignment.UpperRight)
legend.UpdateLegendItems(plot, includeHidden:=True)
- 'plot.Legend.Font.Name = "GenericSansSerif"
- 'plot.Legend.Font.Size = 10
- 'plot.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Series
- 'plot.Legend.FontSeriesColor = True
- 'plot.Legend.CheckBoxes = True
-
- 'Achsen
+ 'X axis
plot.XAxis.DateTimeFormat(True)
- 'plot.Axes.DrawBehind = False
-
- 'plot.Axes.Left.Title.Font.Name = "GenericSansSerif"
- 'plot.Axes.Left.Title.Font.Color = Color.Black
- 'plot.Axes.Left.Title.Font.Size = 10
-
- 'plot.Axes.Left.Labels.Font.Name = "GenericSansSerif"
- 'plot.Axes.Left.Labels.Font.Color = Color.Black
- 'plot.Axes.Left.Labels.Font.Size = 10
-
- 'plot.Axes.Left.AxisPen.Visible = True
-
- 'plot.Axes.Left.Grid.Visible = True
- 'plot.Axes.Left.Grid.Style = Drawing2D.DashStyle.Dash
-
- 'plot.Axes.Right.Title.Font.Name = "GenericSansSerif"
- 'plot.Axes.Right.Title.Font.Color = Color.Black
- 'plot.Axes.Right.Title.Font.Size = 10
-
- 'plot.Axes.Right.Labels.Font.Name = "GenericSansSerif"
- 'plot.Axes.Right.Labels.Font.Color = Color.Black
- 'plot.Axes.Right.Labels.Font.Size = 10
-
- 'plot.Axes.Right.AxisPen.Visible = True
-
- 'plot.Axes.Right.Grid.Visible = False
- 'plot.Axes.Right.Grid.Style = Drawing2D.DashStyle.Dash
-
- 'plot.Axes.Bottom.Title.Font.Name = "GenericSansSerif"
- 'plot.Axes.Bottom.Title.Font.Color = Color.Black
- 'plot.Axes.Bottom.Title.Font.Size = 10
-
- 'plot.Axes.Bottom.Labels.Font.Name = "GenericSansSerif"
- 'plot.Axes.Bottom.Labels.Font.Color = Color.Black
- 'plot.Axes.Bottom.Labels.Font.Size = 10
-
- 'plot.Axes.Bottom.Automatic = True
- 'plot.Axes.Bottom.AxisPen.Visible = True
+ 'reset left Y axis
+ plot.YAxis.Label("")
+ plot.YAxis.Dims.ResetLimits()
- 'plot.Axes.Bottom.Grid.Visible = True
- 'plot.Axes.Bottom.Grid.Style = Drawing2D.DashStyle.Dash
+ 'hide right Y axis
+ plot.YAxis2.Label("")
+ plot.YAxis2.Dims.ResetLimits()
+ plot.YAxis2.IsVisible = False
+ 'remove any additional axes
+ For axisIndex As Integer = 2 To plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True).Count() - 1
+ plot.RemoveAxis(plot.GetAxesMatching(axisIndex:=axisIndex).First)
+ Next
End Sub
Public Enum Direction
From 54ead6885c6053ac590b9be098b4ed673f2dd0ae Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 16:27:46 +0100
Subject: [PATCH 08/57] add some padding to Y axes min and max values
---
source/Controllers/WaveController.vb | 33 +++++++++++++++++-----------
1 file changed, 20 insertions(+), 13 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index cded1a92..6de2a4a1 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2395,7 +2395,14 @@ Friend Class WaveController
'TODO: for now, assign series to axes by matching the axis label to the unit
- 'check for reusable custom axes
+ 'determine min and max values with some padding
+ Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
+ Dim span As Double = serieslimits.YMax - serieslimits.YMin
+ Dim padding As Double = 0.05 * span
+ Dim min As Double = serieslimits.YMin - padding
+ Dim max As Double = serieslimits.YMax + padding
+
+ 'check for reusable axes
Dim axes As IEnumerable(Of ScottPlot.Renderable.Axis)
axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
@@ -2410,10 +2417,9 @@ Friend Class WaveController
axis.AxisLabel.Label = unit
'set axis bounds
- Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
- axis.Dims.SetAxis(serieslimits.YMin, serieslimits.YMax)
- axis.SetBoundary(serieslimits.YMin, serieslimits.YMax)
- axis.SetInnerBoundary(serieslimits.YMin, serieslimits.YMax)
+ axis.Dims.SetAxis(min, max)
+ axis.SetBoundary(min, max)
+ axis.SetInnerBoundary(min, max)
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
@@ -2423,12 +2429,14 @@ Friend Class WaveController
'suitable existing axis found
'update axis bounds
- Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
Dim axisMin As Double = axis.Dims.Min
Dim axisMax As Double = axis.Dims.Max
- axis.Dims.SetAxis(Math.Min(axisMin, serieslimits.YMin), Math.Max(axisMax, serieslimits.YMax))
- axis.SetBoundary(Math.Min(axisMin, serieslimits.YMin), Math.Max(axisMax, serieslimits.YMax))
- axis.SetInnerBoundary(Math.Min(axisMin, serieslimits.YMin), Math.Max(axisMax, serieslimits.YMax))
+ Dim newMin As Double = Math.Min(axisMin, min)
+ Dim newMax As Double = Math.Max(axisMax, max)
+
+ axis.Dims.SetAxis(newMin, newMax)
+ axis.SetBoundary(newMin, newMax)
+ axis.SetInnerBoundary(newMin, newMax)
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
@@ -2458,10 +2466,9 @@ Friend Class WaveController
'axis.SetOffset(Math.Ceiling((number) / 2) * 8)
'set axis bounds
- Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
- axis.Dims.SetAxis(serieslimits.YMin, serieslimits.YMax)
- axis.SetBoundary(serieslimits.YMin, serieslimits.YMax)
- axis.SetInnerBoundary(serieslimits.YMin, serieslimits.YMax)
+ axis.Dims.SetAxis(min, max)
+ axis.SetBoundary(min, max)
+ axis.SetInnerBoundary(min, max)
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
From 41b281b94494e0bb9ce61421a9a13979e8aec7eb Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 17:20:01 +0100
Subject: [PATCH 09/57] use ScottPlot's inbuilt zoom and drag functionality and
handle AxesChanged events for updating the rest of the UI. Issue: AxesChanged
events happen too often, the zoom history becomes almost useless.
---
source/Controllers/WaveController.vb | 27 ++++++++++++++-------
source/Views/MainWindow.vb | 35 ++++++++++++++--------------
2 files changed, 35 insertions(+), 27 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 6de2a4a1..16f0ee92 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -181,9 +181,8 @@ Friend Class WaveController
AddHandler _axisDialog.AxisDeleted, AddressOf axisDeleted
AddHandler _axisDialog.AxisUnitChanged, AddressOf AxisUnitChanged
- 'add chart event listener
- 'TODO: TChart
- 'Me.View.TChart.TChart1.Listeners.Add(Me)
+ 'main chart events
+ AddHandler Me.View.MainPlot.AxesChanged, AddressOf AxesChanged
'model events
AddHandler _model.FileImported, AddressOf FileImported
@@ -1550,6 +1549,16 @@ Friend Class WaveController
End If
End Sub
+ '''
+ ''' Handles main chart axes changed event
+ '''
+ '''
+ '''
+ Private Sub AxesChanged(sender As Object, e As EventArgs)
+ Call Me.SaveZoomSnapshot()
+ Call Me.ViewportChanged()
+ End Sub
+
'''
''' Handles main chart MouseDown event
''' Start a zooming or panning process, save zoom snapshot
@@ -1576,10 +1585,10 @@ Friend Class WaveController
' Me.ChartMouseZoomDragging = True
' Me.ChartMouseDragStartX = e.X
- ' View.colorBandZoom.MainPlot = View.MainPlot.MainPlot
- ' View.colorBandZoom.Active = True
- ' View.colorBandZoom.Start = startValue
- ' View.colorBandZoom.End = startValue
+ ' View.ZoomRectangle.MainPlot = View.MainPlot.MainPlot
+ ' View.ZoomRectangle.Active = True
+ ' View.ZoomRectangle.Start = startValue
+ ' View.ZoomRectangle.End = startValue
' Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(startValue))
' End If
@@ -1607,7 +1616,7 @@ Friend Class WaveController
'If Me.ChartMouseZoomDragging Then
' Dim endValue As Double
' endValue = View.MainPlot.Series(0).XScreenToValue(e.X)
- ' View.colorBandZoom.End = endValue
+ ' View.ZoomRectangle.End = endValue
'ElseIf Me.ChartMousePanning Then
' Dim xMin, xMax As Double
@@ -1669,7 +1678,7 @@ Friend Class WaveController
' Call Me.ViewportChanged()
' End If
' 'hide colorband
- ' View.colorBandZoom.Active = False
+ ' View.ZoomRectangle.Active = False
'ElseIf Me.ChartMousePanning Then
' 'complete the pan process
' Call Me.ViewportChanged()
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index 4ed9e11c..ac1903a4 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -33,8 +33,8 @@ Friend Class MainWindow
Friend isInitializing As Boolean
'TODO: TChart
- 'ColorBand that Is shown while zooming In main chart
- 'Friend colorBandZoom As ScottPlot.Plottable.RectanglePlot
+ 'Rectangle that is shown while zooming in main chart
+ 'Friend ZoomRectangle As ScottPlot.Plottable.RectanglePlot
'Rectangle representing current view extent of main chart in overview chart
Friend ViewExtentRectangle As ScottPlot.Plottable.RectanglePlot
@@ -175,32 +175,31 @@ Friend Class MainWindow
'Me.TChart2.Axes.Bottom.Labels.DateTimeFormat = Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern 'date only without time
'ColorBand einrichten
- Call Me.Init_ColorBands()
+ Call Me.InitializeRectangles()
End Sub
'''
- ''' Initialize color bands
+ ''' Initialize the chart rectangles
'''
- Friend Sub Init_ColorBands()
+ Friend Sub InitializeRectangles()
- Dim limits As ScottPlot.AxisLimits = Me.OverviewPlot.Plot.GetAxisLimits()
+ Dim limits As ScottPlot.AxisLimits
+
+ 'view extent rectangle
+ limits = Me.OverviewPlot.Plot.GetAxisLimits()
ViewExtentRectangle = Me.OverviewPlot.Plot.AddRectangle(limits.XMin, limits.XMax, limits.YMin, limits.YMax)
ViewExtentRectangle.BorderColor = Color.Coral
ViewExtentRectangle.HatchColor = Color.Coral
- 'TODO: TChart
- 'colorBandZoom = New Steema.TeeChart.Tools.ColorBand()
- 'Me.MainPlot.Tools.Add(colorBandZoom)
- 'colorBandZoom.Axis = Me.MainPlot.Axes.Bottom
- 'colorBandZoom.Color = Color.Black
- 'colorBandZoom.Pen.Color = Color.Black
- 'colorBandZoom.Pen.Style = Drawing2D.DashStyle.Dash
- 'colorBandZoom.Brush.Visible = False
- 'colorBandZoom.ResizeEnd = False
- 'colorBandZoom.ResizeStart = False
- 'colorBandZoom.EndLinePen.Visible = True
- 'colorBandZoom.StartLinePen.Visible = True
+ ''zoom rectangle
+ 'limits = Me.MainPlot.Plot.GetAxisLimits()
+ 'ZoomRectangle = Me.MainPlot.Plot.AddRectangle(limits.XMin, limits.XMax, limits.YMin, limits.YMax)
+ 'ZoomRectangle.BorderColor = Color.Black
+ 'ZoomRectangle.BorderLineStyle = ScottPlot.LineStyle.Dash
+ 'ZoomRectangle.HatchColor = Color.Empty
+ 'ZoomRectangle.IsVisible = False
+
End Sub
Private Overloads Sub Close() Implements IView.Close
From 12e19f1c4f3b6a0ffa239b0f348baae572db7bbf Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 17:51:40 +0100
Subject: [PATCH 10/57] restore previous custom zoom and pan implementation but
with ScottPlot
---
source/Controllers/WaveController.vb | 201 +++++++++++++--------------
source/Views/MainWindow.vb | 21 +--
2 files changed, 107 insertions(+), 115 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 16f0ee92..16412004 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -181,9 +181,6 @@ Friend Class WaveController
AddHandler _axisDialog.AxisDeleted, AddressOf axisDeleted
AddHandler _axisDialog.AxisUnitChanged, AddressOf AxisUnitChanged
- 'main chart events
- AddHandler Me.View.MainPlot.AxesChanged, AddressOf AxesChanged
-
'model events
AddHandler _model.FileImported, AddressOf FileImported
AddHandler _model.SeriesAdded, AddressOf SeriesAdded
@@ -1549,58 +1546,48 @@ Friend Class WaveController
End If
End Sub
- '''
- ''' Handles main chart axes changed event
- '''
- '''
- '''
- Private Sub AxesChanged(sender As Object, e As EventArgs)
- Call Me.SaveZoomSnapshot()
- Call Me.ViewportChanged()
- End Sub
-
'''
''' Handles main chart MouseDown event
''' Start a zooming or panning process, save zoom snapshot
'''
Private Sub Chart_MouseDown(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- 'TODO: TChart
- 'If e.Button = Windows.Forms.MouseButtons.Left Then
- ' 'start zoom process
- ' If View.MainPlot.Series.Count > 0 Then
+ If e.Button = Windows.Forms.MouseButtons.Left Then
+ 'start zoom process
+ If View.MainPlot.Plot.GetPlottables().Length > 0 Then
- ' Dim startValue As Double
- ' startValue = View.MainPlot.Series(0).XScreenToValue(e.X)
+ Dim startValue As Double
+ startValue = View.MainPlot.Plot.GetCoordinateX(e.X)
- ' If startValue < View.ChartMinX.ToOADate() Or
- ' startValue > View.ChartMaxX.ToOADate() Then
- ' 'click outside of chart, don't start zoom process
- ' Exit Sub
- ' End If
+ If startValue < View.ChartMinX.ToOADate() Or
+ startValue > View.ChartMaxX.ToOADate() Then
+ 'click outside of chart, don't start zoom process
+ Exit Sub
+ End If
- ' View.MainPlot.Cursor = View.cursor_zoom
- ' Call Me.SaveZoomSnapshot()
+ View.MainPlot.Cursor = View.cursor_zoom
+ Call Me.SaveZoomSnapshot()
- ' Me.ChartMouseZoomDragging = True
- ' Me.ChartMouseDragStartX = e.X
+ Me.ChartMouseZoomDragging = True
+ Me.ChartMouseDragStartX = e.X
- ' View.ZoomRectangle.MainPlot = View.MainPlot.MainPlot
- ' View.ZoomRectangle.Active = True
- ' View.ZoomRectangle.Start = startValue
- ' View.ZoomRectangle.End = startValue
+ View.ZoomRectangle.X1 = startValue
+ View.ZoomRectangle.X2 = startValue
+ View.ZoomRectangle.IsVisible = True
- ' Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(startValue))
- ' End If
+ View.MainPlot.Refresh()
- 'ElseIf e.Button = MouseButtons.Right Then
- ' 'start pan process
- ' Me.ChartMousePanning = True
- ' Me.ChartMouseDragStartX = e.X
- ' Me.ChartMousePanDisplayRange = View.MainPlot.Axes.Bottom.Maximum - View.MainPlot.Axes.Bottom.Minimum
- ' Call Me.SaveZoomSnapshot()
- ' View.MainPlot.Cursor = View.cursor_pan
- 'End If
+ Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(startValue))
+ End If
+
+ ElseIf e.Button = MouseButtons.Right Then
+ 'start pan process
+ Me.ChartMousePanning = True
+ Me.ChartMouseDragStartX = e.X
+ Me.ChartMousePanDisplayRange = View.MainPlot.Plot.XAxis.Dims.Span
+ Call Me.SaveZoomSnapshot()
+ View.MainPlot.Cursor = View.cursor_pan
+ End If
End Sub
@@ -1612,33 +1599,33 @@ Friend Class WaveController
'''
Private Sub Chart_MouseMove(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- 'TODO: TChart
- 'If Me.ChartMouseZoomDragging Then
- ' Dim endValue As Double
- ' endValue = View.MainPlot.Series(0).XScreenToValue(e.X)
- ' View.ZoomRectangle.End = endValue
-
- 'ElseIf Me.ChartMousePanning Then
- ' Dim xMin, xMax As Double
- ' Dim panDistance As Double = View.MainPlot.Series(0).XScreenToValue(Me.ChartMouseDragStartX) - View.MainPlot.Series(0).XScreenToValue(e.X)
- ' xMin = View.MainPlot.Axes.Bottom.Minimum + panDistance
- ' xMax = View.MainPlot.Axes.Bottom.Maximum + panDistance
- ' 'prevent panning beyond displayable range (#68)
- ' If xMin < Constants.minOADate.ToOADate() Then
- ' xMin = Constants.minOADate.ToOADate()
- ' xMax = xMin + Me.ChartMousePanDisplayRange
- ' End If
- ' If xMax > Constants.maxOADate.ToOADate() Then
- ' xMax = Constants.maxOADate.ToOADate()
- ' xMin = xMax - Me.ChartMousePanDisplayRange
- ' End If
- ' 'set the new viewport
- ' View.ChartMinX = DateTime.FromOADate(xMin)
- ' View.ChartMaxX = DateTime.FromOADate(xMax)
- ' Me.selectionMade = True
- ' 'update drag start point
- ' Me.ChartMouseDragStartX = e.X
- 'End If
+ If Me.ChartMouseZoomDragging Then
+ Dim endValue As Double
+ endValue = View.MainPlot.Plot.GetCoordinateX(e.X)
+ View.ZoomRectangle.X2 = endValue
+ View.MainPlot.Refresh()
+
+ ElseIf Me.ChartMousePanning Then
+ Dim xMin, xMax As Double
+ Dim panDistance As Double = View.MainPlot.Plot.GetCoordinateX(Me.ChartMouseDragStartX) - View.MainPlot.Plot.GetCoordinateX(e.X)
+ xMin = View.MainPlot.Plot.XAxis.Dims.Min + panDistance
+ xMax = View.MainPlot.Plot.XAxis.Dims.Max + panDistance
+ 'prevent panning beyond displayable range (#68)
+ If xMin < Constants.minOADate.ToOADate() Then
+ xMin = Constants.minOADate.ToOADate()
+ xMax = xMin + Me.ChartMousePanDisplayRange
+ End If
+ If xMax > Constants.maxOADate.ToOADate() Then
+ xMax = Constants.maxOADate.ToOADate()
+ xMin = xMax - Me.ChartMousePanDisplayRange
+ End If
+ 'set the new viewport
+ View.ChartMinX = DateTime.FromOADate(xMin)
+ View.ChartMaxX = DateTime.FromOADate(xMax)
+ Me.selectionMade = True
+ 'update drag start point
+ Me.ChartMouseDragStartX = e.X
+ End If
End Sub
'''
@@ -1646,45 +1633,47 @@ Friend Class WaveController
''' Complete any started zoom or pan process, update cursor
'''
Private Sub Chart_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- 'TODO: TChart
- 'If Me.ChartMouseZoomDragging Then
- ' 'complete the zoom process
- ' Me.ChartMouseZoomDragging = False
- ' 'only zoom if at least 5 pixels difference to start of drag operation
- ' If Math.Abs(e.X - Me.ChartMouseDragStartX) > 5 Then
- ' 'determine start and end dates of zoom
- ' Dim mouseValue, startValue, endValue As Double
- ' 'prevent zooming beyond the displayable date range (#68)
- ' mouseValue = View.MainPlot.Series(0).XScreenToValue(e.X)
- ' mouseValue = Math.Max(mouseValue, Constants.minOADate.ToOADate)
- ' mouseValue = Math.Min(mouseValue, Constants.maxOADate.ToOADate)
- ' 'set start and end depending on zoom direction
- ' If e.X > Me.ChartMouseDragStartX Then
- ' startValue = View.MainPlot.Series(0).XScreenToValue(Me.ChartMouseDragStartX)
- ' endValue = mouseValue
- ' Else
- ' startValue = mouseValue
- ' endValue = View.MainPlot.Series(0).XScreenToValue(Me.ChartMouseDragStartX)
- ' End If
- ' Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
+ If Me.ChartMouseZoomDragging Then
+ 'complete the zoom process
+ Me.ChartMouseZoomDragging = False
+ 'only zoom if at least 5 pixels difference to start of drag operation
+ If Math.Abs(e.X - Me.ChartMouseDragStartX) > 5 Then
+ 'determine start and end dates of zoom
+ Dim mouseValue, startValue, endValue As Double
+ 'prevent zooming beyond the displayable date range (#68)
+ mouseValue = View.MainPlot.Plot.GetCoordinateX(e.X)
+ mouseValue = Math.Max(mouseValue, Constants.minOADate.ToOADate)
+ mouseValue = Math.Min(mouseValue, Constants.maxOADate.ToOADate)
+ 'set start and end depending on zoom direction
+ If e.X > Me.ChartMouseDragStartX Then
+ startValue = View.MainPlot.Plot.GetCoordinateX(Me.ChartMouseDragStartX)
+ endValue = mouseValue
+ Else
+ startValue = mouseValue
+ endValue = View.MainPlot.Plot.GetCoordinateX(Me.ChartMouseDragStartX)
+ End If
+ Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
- ' 'save the current zoom snapshot
- ' Call Me.SaveZoomSnapshot()
+ 'save the current zoom snapshot
+ Call Me.SaveZoomSnapshot()
- ' 'set the new viewport
- ' View.ChartMinX = DateTime.FromOADate(startValue)
- ' View.ChartMaxX = DateTime.FromOADate(endValue)
- ' Me.selectionMade = True
- ' Call Me.ViewportChanged()
- ' End If
- ' 'hide colorband
- ' View.ZoomRectangle.Active = False
- 'ElseIf Me.ChartMousePanning Then
- ' 'complete the pan process
- ' Call Me.ViewportChanged()
- ' Me.ChartMousePanning = False
- 'End If
- 'View.MainPlot.Cursor = Cursors.Default
+ 'set the new viewport
+ View.ChartMinX = DateTime.FromOADate(startValue)
+ View.ChartMaxX = DateTime.FromOADate(endValue)
+ Me.selectionMade = True
+ Call Me.ViewportChanged()
+ End If
+ 'hide zoom rectangle
+ View.ZoomRectangle.IsVisible = False
+
+ View.MainPlot.Refresh()
+
+ ElseIf Me.ChartMousePanning Then
+ 'complete the pan process
+ Call Me.ViewportChanged()
+ Me.ChartMousePanning = False
+ End If
+ View.MainPlot.Cursor = Cursors.Default
End Sub
'''
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index ac1903a4..9a8b4814 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -32,9 +32,8 @@ Friend Class MainWindow
'''
Friend isInitializing As Boolean
- 'TODO: TChart
'Rectangle that is shown while zooming in main chart
- 'Friend ZoomRectangle As ScottPlot.Plottable.RectanglePlot
+ Friend ZoomRectangle As ScottPlot.Plottable.HSpan
'Rectangle representing current view extent of main chart in overview chart
Friend ViewExtentRectangle As ScottPlot.Plottable.RectanglePlot
@@ -135,6 +134,8 @@ Friend Class MainWindow
'initialize main plot
Me.MainPlot.Plot.Clear()
Call Helpers.FormatChart(Me.MainPlot.Plot)
+ Me.MainPlot.Configuration.Pan = False
+ Me.MainPlot.Configuration.Zoom = False
Me.MainPlot.Configuration.LockVerticalAxis = True 'TODO: this only locks YAxis1
Me.MainPlot.Refresh()
@@ -192,13 +193,15 @@ Friend Class MainWindow
ViewExtentRectangle.BorderColor = Color.Coral
ViewExtentRectangle.HatchColor = Color.Coral
- ''zoom rectangle
- 'limits = Me.MainPlot.Plot.GetAxisLimits()
- 'ZoomRectangle = Me.MainPlot.Plot.AddRectangle(limits.XMin, limits.XMax, limits.YMin, limits.YMax)
- 'ZoomRectangle.BorderColor = Color.Black
- 'ZoomRectangle.BorderLineStyle = ScottPlot.LineStyle.Dash
- 'ZoomRectangle.HatchColor = Color.Empty
- 'ZoomRectangle.IsVisible = False
+ 'zoom rectangle
+ limits = Me.MainPlot.Plot.GetAxisLimits()
+ ZoomRectangle = Me.MainPlot.Plot.AddHorizontalSpan(limits.XMin, limits.XMax)
+ ZoomRectangle.DragEnabled = False
+ ZoomRectangle.Color = Color.FromArgb(0, Color.Empty)
+ ZoomRectangle.BorderColor = Color.Black
+ ZoomRectangle.BorderLineStyle = ScottPlot.LineStyle.Dash
+ ZoomRectangle.BorderLineWidth = 1
+ ZoomRectangle.IsVisible = False
End Sub
From 4d8c5fc244674b40fd3a263ffcc72f19b8d4301f Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 17:58:40 +0100
Subject: [PATCH 11/57] make the ViewExtentRectangle an HSpan
---
source/Controllers/WaveController.vb | 3 ++-
source/Views/MainWindow.vb | 8 +++++---
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 16412004..8bbd51d6 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2216,7 +2216,8 @@ Friend Class WaveController
'''
Private Sub UpdateOverviewZoomExtent()
Dim limits As ScottPlot.AxisLimits = View.OverviewPlot.Plot.GetAxisLimits()
- View.ViewExtentRectangle.Rectangle = New ScottPlot.CoordinateRect(View.ChartMinX.ToOADate(), View.ChartMaxX.ToOADate(), limits.YMin, limits.YMax)
+ View.ViewExtentRectangle.X1 = View.ChartMinX.ToOADate()
+ View.ViewExtentRectangle.X2 = View.ChartMaxX.ToOADate()
View.OverviewPlot.Refresh()
End Sub
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index 9a8b4814..cec54f54 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -36,7 +36,7 @@ Friend Class MainWindow
Friend ZoomRectangle As ScottPlot.Plottable.HSpan
'Rectangle representing current view extent of main chart in overview chart
- Friend ViewExtentRectangle As ScottPlot.Plottable.RectanglePlot
+ Friend ViewExtentRectangle As ScottPlot.Plottable.HSpan
'Cursors
Friend cursor_pan As Cursor
@@ -189,9 +189,11 @@ Friend Class MainWindow
'view extent rectangle
limits = Me.OverviewPlot.Plot.GetAxisLimits()
- ViewExtentRectangle = Me.OverviewPlot.Plot.AddRectangle(limits.XMin, limits.XMax, limits.YMin, limits.YMax)
+ ViewExtentRectangle = Me.OverviewPlot.Plot.AddHorizontalSpan(limits.XMin, limits.XMax)
+ ViewExtentRectangle.Color = Color.FromArgb(100, Color.Coral)
ViewExtentRectangle.BorderColor = Color.Coral
- ViewExtentRectangle.HatchColor = Color.Coral
+ ViewExtentRectangle.BorderLineStyle = ScottPlot.LineStyle.Solid
+ ViewExtentRectangle.BorderLineWidth = 1
'zoom rectangle
limits = Me.MainPlot.Plot.GetAxisLimits()
From 04bc8c14feed47b2ebc22aaefa4f7ab0bbadbcd9 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 18:17:29 +0100
Subject: [PATCH 12/57] implement mouse events in overview plot
---
source/Controllers/WaveController.vb | 303 ++++++++++++++-------------
1 file changed, 153 insertions(+), 150 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 8bbd51d6..267b335c 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -1735,40 +1735,41 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseDown(sender As Object, e As MouseEventArgs)
- 'If View.OverviewPlot.Series.Count > 0 Then
+ If View.OverviewPlot.Plot.GetPlottables().Count > 0 Then
- ' If e.Button = MouseButtons.Left Then
- ' 'start zoom process
+ If e.Button = MouseButtons.Left Then
+ 'start zoom process
- ' View.OverviewPlot.Cursor = View.cursor_zoom
+ View.OverviewPlot.Cursor = View.cursor_zoom
- ' Me.OverviewChartMouseDragging = True
- ' Me.OverviewChartMouseDragStartX = e.X
+ Me.OverviewChartMouseDragging = True
+ Me.OverviewChartMouseDragStartX = e.X
- ' 'set start and end value of colorband to mouse position
- ' Dim xMouse As Double
- ' xMouse = View.OverviewPlot.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
+ 'set start and end value of colorband to mouse position
+ Dim xMouse As Double
+ xMouse = View.OverviewPlot.Plot.GetCoordinateX(Me.OverviewChartMouseDragStartX)
- ' 'prevent zoom starting beyond displayable date range (#68)
- ' xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
- ' xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
+ 'prevent zoom starting beyond displayable date range (#68)
+ xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
+ xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
- ' View.colorBandOverview.Start = xMouse
- ' View.colorBandOverview.End = xMouse
+ View.ViewExtentRectangle.X1 = xMouse
+ View.ViewExtentRectangle.X2 = xMouse
+ View.OverviewPlot.Refresh()
- ' Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(xMouse))
+ Log.AddLogEntry(Log.levels.debug, "Zoom start at " & DateTime.FromOADate(xMouse))
- ' ElseIf e.Button = MouseButtons.Right Then
- ' 'start panning process
+ ElseIf e.Button = MouseButtons.Right Then
+ 'start panning process
- ' View.OverviewPlot.Cursor = View.cursor_pan
+ View.OverviewPlot.Cursor = View.cursor_pan
- ' Me.OverviewChartMouseDragging = True
- ' Me.OverviewChartMouseDragStartX = e.X
- ' Me.OverviewChartMouseDragOffset = e.X - View.OverviewPlot.Series(0).ValuePointToScreenPoint(View.colorBandOverview.Start, 0).X
+ Me.OverviewChartMouseDragging = True
+ Me.OverviewChartMouseDragStartX = e.X
+ Me.OverviewChartMouseDragOffset = e.X - View.OverviewPlot.Plot.GetPixelX(View.ViewExtentRectangle.X1)
- ' End If
- 'End If
+ End If
+ End If
End Sub
'''
@@ -1779,41 +1780,42 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseMove(sender As Object, e As MouseEventArgs)
- 'TODO: TChart
- 'If Me.OverviewChartMouseDragging Then
+ If Me.OverviewChartMouseDragging Then
- ' If e.Button = MouseButtons.Left Then
- ' 'move the end of the colorband to the mouse pointer
- ' Dim xMouse As Double = View.OverviewPlot.Series(0).XScreenToValue(e.X)
+ If e.Button = MouseButtons.Left Then
+ 'move the end of the colorband to the mouse pointer
+ Dim xMouse As Double = View.OverviewPlot.Plot.GetCoordinateX(e.X)
- ' 'restrict to displayable date range (#68)
- ' xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
- ' xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
+ 'restrict to displayable date range (#68)
+ xMouse = Math.Max(xMouse, Constants.minOADate.ToOADate)
+ xMouse = Math.Min(xMouse, Constants.maxOADate.ToOADate)
- ' View.colorBandOverview.End = xMouse
+ View.ViewExtentRectangle.X2 = xMouse
+ View.OverviewPlot.Refresh()
- ' ElseIf e.Button = MouseButtons.Right Then
- ' 'move the whole color band while maintaining its width
- ' Dim width As Double = View.colorBandOverview.End - View.colorBandOverview.Start
+ ElseIf e.Button = MouseButtons.Right Then
+ 'move the whole color band while maintaining its width
+ Dim width As Double = View.ViewExtentRectangle.X2 - View.ViewExtentRectangle.X1
- ' Dim startValue, endValue As Double
- ' startValue = View.OverviewPlot.Series(0).XScreenToValue(e.X - Me.OverviewChartMouseDragOffset)
- ' endValue = startValue + width
+ Dim startValue, endValue As Double
+ startValue = View.OverviewPlot.Plot.GetCoordinateX(e.X - Me.OverviewChartMouseDragOffset)
+ endValue = startValue + width
- ' 'restrict to displayable date range (#68)
- ' If startValue < Constants.minOADate.ToOADate Then
- ' startValue = Constants.minOADate.ToOADate
- ' endValue = startValue + width
- ' End If
- ' If endValue > Constants.maxOADate.ToOADate Then
- ' endValue = Constants.maxOADate.ToOADate
- ' startValue = endValue - width
- ' End If
+ 'restrict to displayable date range (#68)
+ If startValue < Constants.minOADate.ToOADate Then
+ startValue = Constants.minOADate.ToOADate
+ endValue = startValue + width
+ End If
+ If endValue > Constants.maxOADate.ToOADate Then
+ endValue = Constants.maxOADate.ToOADate
+ startValue = endValue - width
+ End If
- ' View.colorBandOverview.Start = startValue
- ' View.colorBandOverview.End = endValue
- ' End If
- 'End If
+ View.ViewExtentRectangle.X1 = startValue
+ View.ViewExtentRectangle.X2 = endValue
+ View.OverviewPlot.Refresh()
+ End If
+ End If
End Sub
'''
@@ -1824,62 +1826,62 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs)
- 'TODO: TChart
- 'View.OverviewPlot.Cursor = Cursors.Default
+ View.OverviewPlot.Cursor = Cursors.Default
- 'If Me.OverviewChartMouseDragging Then
+ If Me.OverviewChartMouseDragging Then
- ' Me.OverviewChartMouseDragging = False
+ Me.OverviewChartMouseDragging = False
- ' If e.Button = MouseButtons.Left Then
- ' 'complete the zoom process
+ If e.Button = MouseButtons.Left Then
+ 'complete the zoom process
- ' 'determine start and end of zoom
- ' If e.X <> Me.OverviewChartMouseDragStartX Then
- ' 'set start and end depending on zoom direction
- ' Dim startValue, endValue As Double
- ' If e.X > Me.OverviewChartMouseDragStartX Then
- ' startValue = View.OverviewPlot.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
- ' endValue = View.OverviewPlot.Series(0).XScreenToValue(e.X)
- ' Else
- ' startValue = View.OverviewPlot.Series(0).XScreenToValue(e.X)
- ' endValue = View.OverviewPlot.Series(0).XScreenToValue(Me.OverviewChartMouseDragStartX)
- ' End If
- ' 'restrict to displayable date range (#68)
- ' startValue = Math.Max(startValue, Constants.minOADate.ToOADate)
- ' endValue = Math.Min(endValue, Constants.maxOADate.ToOADate)
+ 'determine start and end of zoom
+ If e.X <> Me.OverviewChartMouseDragStartX Then
+ 'set start and end depending on zoom direction
+ Dim startValue, endValue As Double
+ If e.X > Me.OverviewChartMouseDragStartX Then
+ startValue = View.OverviewPlot.Plot.GetCoordinateX(Me.OverviewChartMouseDragStartX)
+ endValue = View.OverviewPlot.Plot.GetCoordinateX(e.X)
+ Else
+ startValue = View.OverviewPlot.Plot.GetCoordinateX(e.X)
+ endValue = View.OverviewPlot.Plot.GetCoordinateX(Me.OverviewChartMouseDragStartX)
+ End If
+ 'restrict to displayable date range (#68)
+ startValue = Math.Max(startValue, Constants.minOADate.ToOADate)
+ endValue = Math.Min(endValue, Constants.maxOADate.ToOADate)
- ' Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
+ Log.AddLogEntry(Log.levels.debug, "Zoom end at " & DateTime.FromOADate(endValue))
- ' 'adjust colorband
- ' View.colorBandOverview.Start = startValue
- ' View.colorBandOverview.End = endValue
+ 'adjust colorband
+ View.ViewExtentRectangle.X1 = startValue
+ View.ViewExtentRectangle.X2 = endValue
+ View.OverviewPlot.Refresh()
- ' 'save the current zoom snapshot
- ' Call Me.SaveZoomSnapshot()
+ 'save the current zoom snapshot
+ Call Me.SaveZoomSnapshot()
- ' 'set the new viewport on the main chart
- ' View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
- ' View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
+ 'set the new viewport on the main chart
+ View.ChartMinX = DateTime.FromOADate(View.ViewExtentRectangle.X1)
+ View.ChartMaxX = DateTime.FromOADate(View.ViewExtentRectangle.X2)
- ' Me.selectionMade = True
- ' Call Me.ViewportChanged()
- ' End If
+ Me.selectionMade = True
+ Call Me.ViewportChanged()
+ End If
- ' ElseIf e.Button = MouseButtons.Right Then
- ' 'complete the pan process
+ ElseIf e.Button = MouseButtons.Right Then
+ 'complete the pan process
- ' 'save the current zoom snapshot
- ' Call Me.SaveZoomSnapshot()
+ 'save the current zoom snapshot
+ Call Me.SaveZoomSnapshot()
- ' 'set the new viewport on the main chart
- ' View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
- ' View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
+ 'set the new viewport on the main chart
+ View.ChartMinX = DateTime.FromOADate(View.ViewExtentRectangle.X1)
+ View.ChartMaxX = DateTime.FromOADate(View.ViewExtentRectangle.X2)
- ' Me.selectionMade = True
- ' Call Me.ViewportChanged()
- ' End If
- 'End If
+ Me.selectionMade = True
+ Call Me.ViewportChanged()
+ End If
+ End If
End Sub
'''
@@ -1890,70 +1892,71 @@ Friend Class WaveController
Private Sub OverviewChart_MouseWheel(sender As Object, e As MouseEventArgs)
'TODO: TChart
- 'Try
- ' ' Update the drawing based upon the mouse wheel scrolling.
- ' ' "The UI should scroll when the accumulated delta is plus or minus 120.
- ' ' The UI should scroll the number of logical lines returned by the
- ' ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
- ' 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
- ' 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
- ' Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
-
- ' If numberOfTextLinesToMove = 0 Then
- ' Exit Sub
- ' End If
+ Try
+ ' Update the drawing based upon the mouse wheel scrolling.
+ ' "The UI should scroll when the accumulated delta is plus or minus 120.
+ ' The UI should scroll the number of logical lines returned by the
+ ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
+ 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
+ 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
+ Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
+
+ If numberOfTextLinesToMove = 0 Then
+ Exit Sub
+ End If
- ' 'zoom while centering on mouse
- ' Dim newStart As Double
- ' Dim newEnd As Double
- ' Dim mouseOADate As Double = View.OverviewPlot.Series(0).XScreenToValue(e.X)
- ' Dim currentExtent As Double = View.colorBandOverview.End - View.colorBandOverview.Start
-
- ' If mouseOADate >= View.colorBandOverview.Start And mouseOADate <= View.colorBandOverview.End Then
- ' 'zoom by 25% if mouse is inside color band
- ' Dim newExtent As Double
- ' If numberOfTextLinesToMove > 0 Then
- ' newExtent = currentExtent * 0.75
- ' Else
- ' newExtent = currentExtent * 1.25
- ' End If
+ 'zoom while centering on mouse
+ Dim newStart As Double
+ Dim newEnd As Double
+ Dim mouseOADate As Double = View.OverviewPlot.Plot.GetCoordinateX(e.X)
+ Dim currentExtent As Double = View.ViewExtentRectangle.X2 - View.ViewExtentRectangle.X1
+
+ If mouseOADate >= View.ViewExtentRectangle.X1 And mouseOADate <= View.ViewExtentRectangle.X2 Then
+ 'zoom by 25% if mouse is inside color band
+ Dim newExtent As Double
+ If numberOfTextLinesToMove > 0 Then
+ newExtent = currentExtent * 0.75
+ Else
+ newExtent = currentExtent * 1.25
+ End If
- ' 'set new viewport, centering on mouse
- ' newStart = mouseOADate - (newExtent / 2)
- ' newEnd = mouseOADate + (newExtent / 2)
+ 'set new viewport, centering on mouse
+ newStart = mouseOADate - (newExtent / 2)
+ newEnd = mouseOADate + (newExtent / 2)
- ' Else
- ' 'pan by 25% of current extent if mouse is outside of color band
- ' Dim delta As Double = currentExtent * 0.25
- ' If mouseOADate > View.colorBandOverview.End Then
- ' 'pan right
- ' newStart = View.colorBandOverview.Start + delta
- ' newEnd = View.colorBandOverview.End + delta
- ' Else
- ' 'pan left
- ' newStart = View.colorBandOverview.Start - delta
- ' newEnd = View.colorBandOverview.End - delta
- ' End If
- ' End If
+ Else
+ 'pan by 25% of current extent if mouse is outside of color band
+ Dim delta As Double = currentExtent * 0.25
+ If mouseOADate > View.ViewExtentRectangle.X2 Then
+ 'pan right
+ newStart = View.ViewExtentRectangle.X1 + delta
+ newEnd = View.ViewExtentRectangle.X2 + delta
+ Else
+ 'pan left
+ newStart = View.ViewExtentRectangle.X1 - delta
+ newEnd = View.ViewExtentRectangle.X2 - delta
+ End If
+ End If
- ' 'set the new colorband
- ' View.colorBandOverview.Start = newStart
- ' View.colorBandOverview.End = newEnd
+ 'set the new colorband
+ View.ViewExtentRectangle.X1 = newStart
+ View.ViewExtentRectangle.X2 = newEnd
+ View.OverviewPlot.Refresh()
- ' 'save the current zoom snapshot
- ' Call Me.SaveZoomSnapshot()
+ 'save the current zoom snapshot
+ Call Me.SaveZoomSnapshot()
- ' 'set the new viewport on the main chart
- ' View.ChartMinX = DateTime.FromOADate(View.colorBandOverview.Start)
- ' View.ChartMaxX = DateTime.FromOADate(View.colorBandOverview.End)
+ 'set the new viewport on the main chart
+ View.ChartMinX = DateTime.FromOADate(View.ViewExtentRectangle.X1)
+ View.ChartMaxX = DateTime.FromOADate(View.ViewExtentRectangle.X2)
- ' Me.selectionMade = True
- ' Call Me.ViewportChanged()
+ Me.selectionMade = True
+ Call Me.ViewportChanged()
- 'Catch ex As ArgumentException
- ' 'can happen when zooming out too far, invalid OADate
- ' Log.AddLogEntry(levels.debug, $"Exception in OverviewChart_MouseWheel: {ex}")
- 'End Try
+ Catch ex As ArgumentException
+ 'can happen when zooming out too far, invalid OADate
+ Log.AddLogEntry(levels.debug, $"Exception in OverviewChart_MouseWheel: {ex}")
+ End Try
End Sub
From cdd3c6cb65ef1a25738df6b581f22390e0982e11 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Thu, 21 Dec 2023 18:19:20 +0100
Subject: [PATCH 13/57] implement mouse wheel scroll in main chart
---
source/Controllers/WaveController.vb | 71 ++++++++++++++--------------
1 file changed, 35 insertions(+), 36 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 267b335c..345860f7 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -1683,47 +1683,46 @@ Friend Class WaveController
'''
Private Sub Chart_MouseWheel(sender As Object, e As MouseEventArgs)
- 'TODO: TChart
- 'Try
- ' ' Update the drawing based upon the mouse wheel scrolling.
- ' ' "The UI should scroll when the accumulated delta is plus or minus 120.
- ' ' The UI should scroll the number of logical lines returned by the
- ' ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
- ' 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
- ' 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
- ' Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
-
- ' 'zoom while centering on mouse
- ' Dim currentExtent As TimeSpan = View.ChartMaxX - View.ChartMinX
- ' Dim newExtent As Long
- ' If numberOfTextLinesToMove > 0 Then
- ' 'zoom in 25%
- ' newExtent = currentExtent.Ticks * 0.75
- ' Else
- ' 'zoom out 25%
- ' newExtent = currentExtent.Ticks * 1.25
- ' End If
+ Try
+ ' Update the drawing based upon the mouse wheel scrolling.
+ ' "The UI should scroll when the accumulated delta is plus or minus 120.
+ ' The UI should scroll the number of logical lines returned by the
+ ' SystemInformation.MouseWheelScrollLines property for every delta value reached."
+ 'https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.mousewheel?f1url=%3FappId%3DDev16IDEF1%26l%3DEN-US%26k%3Dk(System.Windows.Forms.Control.MouseWheel)%3Bk(TargetFrameworkMoniker-.NETFramework%2CVersion%253Dv4.8)%3Bk(DevLang-VB)%26rd%3Dtrue&view=windowsdesktop-7.0#remarks
+ 'TODO: scale mousewheel zoom with numberOfTextLinesToMove
+ Dim numberOfTextLinesToMove As Integer = CInt(e.Delta * SystemInformation.MouseWheelScrollLines / 120)
- ' 'determine mouse position and its left-right ratio in relation to x axis
- ' Dim centerOADate As Double = View.MainPlot.Series(0).XScreenToValue(e.X)
- ' Dim centerDate As DateTime = DateTime.FromOADate(centerOADate)
- ' Dim leftRatio As Double = (centerDate - View.ChartMinX).Ticks / currentExtent.Ticks
- ' Dim rightRatio As Double = 1 - leftRatio
+ 'zoom while centering on mouse
+ Dim currentExtent As TimeSpan = View.ChartMaxX - View.ChartMinX
+ Dim newExtent As Long
+ If numberOfTextLinesToMove > 0 Then
+ 'zoom in 25%
+ newExtent = currentExtent.Ticks * 0.75
+ Else
+ 'zoom out 25%
+ newExtent = currentExtent.Ticks * 1.25
+ End If
- ' 'save the current zoom snapshot
- ' Call Me.SaveZoomSnapshot()
+ 'determine mouse position and its left-right ratio in relation to x axis
+ Dim centerOADate As Double = View.MainPlot.Plot.GetCoordinateX(e.X)
+ Dim centerDate As DateTime = DateTime.FromOADate(centerOADate)
+ Dim leftRatio As Double = (centerDate - View.ChartMinX).Ticks / currentExtent.Ticks
+ Dim rightRatio As Double = 1 - leftRatio
- ' 'set new viewport
- ' View.ChartMinX = centerDate - New TimeSpan(ticks:=newExtent * leftRatio)
- ' View.ChartMaxX = centerDate + New TimeSpan(ticks:=newExtent * rightRatio)
+ 'save the current zoom snapshot
+ Call Me.SaveZoomSnapshot()
- ' Me.selectionMade = True
- ' Call Me.ViewportChanged()
+ 'set new viewport
+ View.ChartMinX = centerDate - New TimeSpan(ticks:=newExtent * leftRatio)
+ View.ChartMaxX = centerDate + New TimeSpan(ticks:=newExtent * rightRatio)
- 'Catch ex As ArgumentOutOfRangeException
- ' 'can happen when zooming out too far, TimeSpan becomes too big or DateTime is not representable
- ' Log.AddLogEntry(levels.debug, $"Exception in Chart_MouseWheel: {ex}")
- 'End Try
+ Me.selectionMade = True
+ Call Me.ViewportChanged()
+
+ Catch ex As ArgumentOutOfRangeException
+ 'can happen when zooming out too far, TimeSpan becomes too big or DateTime is not representable
+ Log.AddLogEntry(levels.debug, $"Exception in Chart_MouseWheel: {ex}")
+ End Try
End Sub
From 2de91f27d7418dc54a56c62f151fa5164b181578 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 11:34:40 +0100
Subject: [PATCH 14/57] add a TOC panel to the main window, store chart series
in order to be able to activate/deactivate them
---
source/Controllers/WaveController.vb | 39 ++++++++-
source/Views/MainWindow.Designer.vb | 120 ++++++++++++++++++++-------
source/Views/MainWindow.resx | 39 ++++++---
3 files changed, 150 insertions(+), 48 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 345860f7..20e023e1 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -47,6 +47,11 @@ Friend Class WaveController
End Get
End Property
+ '''
+ ''' Dictionary of series in the chart, key corresponds to TimeSeries ID
+ '''
+ Friend ChartSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+
Private selectionMade As Boolean 'Flag zeigt an, ob bereits ein Auswahlbereich ausgewählt wurde
'''
@@ -82,6 +87,9 @@ Friend Class WaveController
Me.View.SetController(Me)
+ 'Initialize chart series container
+ Me.ChartSeries = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+
'Initialize zoom history
Me.ZoomHistory = New List(Of (xmin As Double, xmax As Double))
Me.ZoomHistoryIndex = 0
@@ -157,6 +165,9 @@ Friend Class WaveController
AddHandler Me.View.DragEnter, AddressOf Wave_DragEnter
AddHandler Me.View.DragDrop, AddressOf Wave_DragDrop
+ 'TOC events
+ AddHandler Me.View.CheckedListBox_Series.ItemCheck, AddressOf SeriesActiveChanged
+
'navigation events
AddHandler Me.View.MaskedTextBox_NavStart.KeyDown, AddressOf navigationKeyDown
AddHandler Me.View.MaskedTextBox_NavEnd.KeyDown, AddressOf navigationKeyDown
@@ -309,6 +320,9 @@ Friend Class WaveController
If (Not res = Windows.Forms.DialogResult.OK) Then Exit Sub
End If
+ 'Clear chart series
+ Me.ChartSeries.Clear()
+
'Charts zurücksetzen
Call View.Init_Charts()
@@ -2273,10 +2287,6 @@ Friend Class WaveController
'Do not paint NaN values
Line1.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
- 'Store id as Tag property
- 'TODO: TChart
- 'Line1.Tag = ts.Id
-
'Namen vergeben
Line1.Label = ts.Title
@@ -2304,6 +2314,9 @@ Friend Class WaveController
Line1.StepDisplayRight = False
End Select
+ 'Store chart series
+ Me.ChartSeries.Add(ts.Id, Line1)
+
'Add series to overview chart
Call Me.AddSeriesToOverview(ts)
@@ -2319,6 +2332,9 @@ Friend Class WaveController
Log.AddLogEntry(Log.levels.warning, $"Series '{ts.Title}' contains {ts.NaNCount} NaN values!")
End If
+ 'add series to TOC
+ View.CheckedListBox_Series.Items.Add(ts, isChecked:=True)
+
End Sub
'''
@@ -2480,6 +2496,21 @@ Friend Class WaveController
End Sub
+ '''
+ ''' Handles a series being activated/deactivated in the TOC
+ '''
+ '''
+ '''
+ Private Sub SeriesActiveChanged(sender As Object, e As ItemCheckEventArgs)
+
+ Dim id As Integer = View.CheckedListBox_Series.Items(e.Index).Id
+
+ If Me.ChartSeries.ContainsKey(id) Then
+ Me.ChartSeries(id).IsVisible = (e.NewValue = CheckState.Checked)
+ End If
+ Me.View.MainPlot.Refresh()
+ End Sub
+
'''
''' Shows markers at the given timestamps in the chart
'''
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 470913e4..4ff2a8c5 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -100,16 +100,19 @@ Partial Class MainWindow
Me.Button_NavBack = New System.Windows.Forms.Button()
Me.NumericUpDown_NavMultiplier = New System.Windows.Forms.NumericUpDown()
Me.ComboBox_NavIncrement = New System.Windows.Forms.ComboBox()
+ Me.MainPlot = New ScottPlot.FormsPlot()
Me.Panel_DisplayRange = New System.Windows.Forms.Panel()
Me.Label_Display = New System.Windows.Forms.Label()
Me.NumericUpDown_DisplayRangeMultiplier = New System.Windows.Forms.NumericUpDown()
Me.ComboBox_DisplayRangeUnit = New System.Windows.Forms.ComboBox()
Me.MaskedTextBox_NavEnd = New System.Windows.Forms.MaskedTextBox()
Me.MaskedTextBox_NavStart = New System.Windows.Forms.MaskedTextBox()
- Me.MainPlot = New ScottPlot.FormsPlot()
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
+ Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
+ Me.GroupBox1 = New System.Windows.Forms.GroupBox()
+ Me.CheckedListBox_Series = New System.Windows.Forms.CheckedListBox()
ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
@@ -130,6 +133,11 @@ Partial Class MainWindow
CType(Me.NumericUpDown_NavMultiplier, System.ComponentModel.ISupportInitialize).BeginInit()
Me.Panel_DisplayRange.SuspendLayout()
CType(Me.NumericUpDown_DisplayRangeMultiplier, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SplitContainer2.Panel1.SuspendLayout()
+ Me.SplitContainer2.Panel2.SuspendLayout()
+ Me.SplitContainer2.SuspendLayout()
+ Me.GroupBox1.SuspendLayout()
Me.SuspendLayout()
'
'ToolStripSeparator1
@@ -656,11 +664,9 @@ Partial Class MainWindow
'
'SplitContainer1
'
- Me.SplitContainer1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
- Or System.Windows.Forms.AnchorStyles.Left) _
- Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.SplitContainer1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
- Me.SplitContainer1.Location = New System.Drawing.Point(0, 34)
+ Me.SplitContainer1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.SplitContainer1.Location = New System.Drawing.Point(0, 0)
Me.SplitContainer1.Name = "SplitContainer1"
Me.SplitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal
'
@@ -672,8 +678,8 @@ Partial Class MainWindow
'SplitContainer1.Panel2
'
Me.SplitContainer1.Panel2.Controls.Add(Me.TableLayoutPanel1)
- Me.SplitContainer1.Size = New System.Drawing.Size(944, 606)
- Me.SplitContainer1.SplitterDistance = 140
+ Me.SplitContainer1.Size = New System.Drawing.Size(820, 605)
+ Me.SplitContainer1.SplitterDistance = 139
Me.SplitContainer1.TabIndex = 1
'
'OverviewPlot
@@ -681,7 +687,7 @@ Partial Class MainWindow
Me.OverviewPlot.Dock = System.Windows.Forms.DockStyle.Fill
Me.OverviewPlot.Location = New System.Drawing.Point(0, 0)
Me.OverviewPlot.Name = "OverviewPlot"
- Me.OverviewPlot.Size = New System.Drawing.Size(940, 136)
+ Me.OverviewPlot.Size = New System.Drawing.Size(816, 135)
Me.OverviewPlot.TabIndex = 0
'
'TableLayoutPanel1
@@ -690,17 +696,18 @@ Partial Class MainWindow
Me.TableLayoutPanel1.ColumnCount = 1
Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TableLayoutPanel1.Controls.Add(Me.PanelNavigation, 0, 0)
- Me.TableLayoutPanel1.Controls.Add(Me.Panel_DisplayRange, 0, 2)
Me.TableLayoutPanel1.Controls.Add(Me.MainPlot, 0, 1)
+ Me.TableLayoutPanel1.Controls.Add(Me.Panel_DisplayRange, 0, 2)
Me.TableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.TableLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.TableLayoutPanel1.Margin = New System.Windows.Forms.Padding(0)
Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
- Me.TableLayoutPanel1.RowCount = 3
+ Me.TableLayoutPanel1.RowCount = 4
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 38.0!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36.0!))
- Me.TableLayoutPanel1.Size = New System.Drawing.Size(940, 458)
+ Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
+ Me.TableLayoutPanel1.Size = New System.Drawing.Size(816, 458)
Me.TableLayoutPanel1.TabIndex = 3
'
'PanelNavigation
@@ -716,14 +723,14 @@ Partial Class MainWindow
Me.PanelNavigation.Location = New System.Drawing.Point(1, 1)
Me.PanelNavigation.Margin = New System.Windows.Forms.Padding(0)
Me.PanelNavigation.Name = "PanelNavigation"
- Me.PanelNavigation.Size = New System.Drawing.Size(938, 38)
+ Me.PanelNavigation.Size = New System.Drawing.Size(814, 38)
Me.PanelNavigation.TabIndex = 0
'
'Button_NavEnd
'
Me.Button_NavEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button_NavEnd.Image = Global.BlueM.Wave.My.Resources.Resources.control_end
- Me.Button_NavEnd.Location = New System.Drawing.Point(906, 8)
+ Me.Button_NavEnd.Location = New System.Drawing.Point(782, 8)
Me.Button_NavEnd.Name = "Button_NavEnd"
Me.Button_NavEnd.Size = New System.Drawing.Size(23, 23)
Me.Button_NavEnd.TabIndex = 6
@@ -744,7 +751,7 @@ Partial Class MainWindow
'
Me.Label_Navigate.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.Label_Navigate.AutoSize = True
- Me.Label_Navigate.Location = New System.Drawing.Point(376, 13)
+ Me.Label_Navigate.Location = New System.Drawing.Point(314, 13)
Me.Label_Navigate.Name = "Label_Navigate"
Me.Label_Navigate.Size = New System.Drawing.Size(53, 13)
Me.Label_Navigate.TabIndex = 2
@@ -754,7 +761,7 @@ Partial Class MainWindow
'
Me.Button_NavForward.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button_NavForward.Image = CType(resources.GetObject("Button_NavForward.Image"), System.Drawing.Image)
- Me.Button_NavForward.Location = New System.Drawing.Point(831, 8)
+ Me.Button_NavForward.Location = New System.Drawing.Point(707, 8)
Me.Button_NavForward.Name = "Button_NavForward"
Me.Button_NavForward.Size = New System.Drawing.Size(69, 23)
Me.Button_NavForward.TabIndex = 5
@@ -774,7 +781,7 @@ Partial Class MainWindow
'NumericUpDown_NavMultiplier
'
Me.NumericUpDown_NavMultiplier.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.NumericUpDown_NavMultiplier.Location = New System.Drawing.Point(435, 9)
+ Me.NumericUpDown_NavMultiplier.Location = New System.Drawing.Point(373, 9)
Me.NumericUpDown_NavMultiplier.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.NumericUpDown_NavMultiplier.Name = "NumericUpDown_NavMultiplier"
Me.NumericUpDown_NavMultiplier.Size = New System.Drawing.Size(40, 20)
@@ -787,11 +794,19 @@ Partial Class MainWindow
Me.ComboBox_NavIncrement.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox_NavIncrement.FormattingEnabled = True
Me.ComboBox_NavIncrement.Items.AddRange(New Object() {"Centuries", "Decades", "Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"})
- Me.ComboBox_NavIncrement.Location = New System.Drawing.Point(481, 9)
+ Me.ComboBox_NavIncrement.Location = New System.Drawing.Point(419, 9)
Me.ComboBox_NavIncrement.Name = "ComboBox_NavIncrement"
Me.ComboBox_NavIncrement.Size = New System.Drawing.Size(81, 21)
Me.ComboBox_NavIncrement.TabIndex = 4
'
+ 'MainPlot
+ '
+ Me.MainPlot.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.MainPlot.Location = New System.Drawing.Point(4, 43)
+ Me.MainPlot.Name = "MainPlot"
+ Me.MainPlot.Size = New System.Drawing.Size(808, 353)
+ Me.MainPlot.TabIndex = 3
+ '
'Panel_DisplayRange
'
Me.Panel_DisplayRange.Controls.Add(Me.Label_Display)
@@ -800,17 +815,17 @@ Partial Class MainWindow
Me.Panel_DisplayRange.Controls.Add(Me.MaskedTextBox_NavEnd)
Me.Panel_DisplayRange.Controls.Add(Me.MaskedTextBox_NavStart)
Me.Panel_DisplayRange.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel_DisplayRange.Location = New System.Drawing.Point(1, 421)
+ Me.Panel_DisplayRange.Location = New System.Drawing.Point(1, 400)
Me.Panel_DisplayRange.Margin = New System.Windows.Forms.Padding(0)
Me.Panel_DisplayRange.Name = "Panel_DisplayRange"
- Me.Panel_DisplayRange.Size = New System.Drawing.Size(938, 36)
+ Me.Panel_DisplayRange.Size = New System.Drawing.Size(814, 36)
Me.Panel_DisplayRange.TabIndex = 2
'
'Label_Display
'
Me.Label_Display.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.Label_Display.AutoSize = True
- Me.Label_Display.Location = New System.Drawing.Point(381, 12)
+ Me.Label_Display.Location = New System.Drawing.Point(319, 12)
Me.Label_Display.Name = "Label_Display"
Me.Label_Display.Size = New System.Drawing.Size(44, 13)
Me.Label_Display.TabIndex = 1
@@ -819,7 +834,7 @@ Partial Class MainWindow
'NumericUpDown_DisplayRangeMultiplier
'
Me.NumericUpDown_DisplayRangeMultiplier.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.NumericUpDown_DisplayRangeMultiplier.Location = New System.Drawing.Point(431, 8)
+ Me.NumericUpDown_DisplayRangeMultiplier.Location = New System.Drawing.Point(369, 8)
Me.NumericUpDown_DisplayRangeMultiplier.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.NumericUpDown_DisplayRangeMultiplier.Name = "NumericUpDown_DisplayRangeMultiplier"
Me.NumericUpDown_DisplayRangeMultiplier.Size = New System.Drawing.Size(40, 20)
@@ -832,7 +847,7 @@ Partial Class MainWindow
Me.ComboBox_DisplayRangeUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox_DisplayRangeUnit.FormattingEnabled = True
Me.ComboBox_DisplayRangeUnit.Items.AddRange(New Object() {"", "Centuries", "Decades", "Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"})
- Me.ComboBox_DisplayRangeUnit.Location = New System.Drawing.Point(477, 8)
+ Me.ComboBox_DisplayRangeUnit.Location = New System.Drawing.Point(415, 8)
Me.ComboBox_DisplayRangeUnit.Name = "ComboBox_DisplayRangeUnit"
Me.ComboBox_DisplayRangeUnit.Size = New System.Drawing.Size(81, 21)
Me.ComboBox_DisplayRangeUnit.TabIndex = 3
@@ -841,7 +856,7 @@ Partial Class MainWindow
'
Me.MaskedTextBox_NavEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MaskedTextBox_NavEnd.Culture = New System.Globalization.CultureInfo("")
- Me.MaskedTextBox_NavEnd.Location = New System.Drawing.Point(829, 8)
+ Me.MaskedTextBox_NavEnd.Location = New System.Drawing.Point(705, 8)
Me.MaskedTextBox_NavEnd.Name = "MaskedTextBox_NavEnd"
Me.MaskedTextBox_NavEnd.Size = New System.Drawing.Size(100, 20)
Me.MaskedTextBox_NavEnd.TabIndex = 4
@@ -856,14 +871,6 @@ Partial Class MainWindow
Me.MaskedTextBox_NavStart.TabIndex = 0
Me.MaskedTextBox_NavStart.ValidatingType = GetType(Date)
'
- 'MainPlot
- '
- Me.MainPlot.Dock = System.Windows.Forms.DockStyle.Fill
- Me.MainPlot.Location = New System.Drawing.Point(4, 43)
- Me.MainPlot.Name = "MainPlot"
- Me.MainPlot.Size = New System.Drawing.Size(932, 374)
- Me.MainPlot.TabIndex = 3
- '
'ProgressBar1
'
Me.ProgressBar1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -874,6 +881,47 @@ Partial Class MainWindow
Me.ProgressBar1.Step = 1
Me.ProgressBar1.TabIndex = 2
'
+ 'SplitContainer2
+ '
+ Me.SplitContainer2.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.SplitContainer2.FixedPanel = System.Windows.Forms.FixedPanel.Panel1
+ Me.SplitContainer2.Location = New System.Drawing.Point(0, 34)
+ Me.SplitContainer2.Name = "SplitContainer2"
+ '
+ 'SplitContainer2.Panel1
+ '
+ Me.SplitContainer2.Panel1.AutoScroll = True
+ Me.SplitContainer2.Panel1.Controls.Add(Me.GroupBox1)
+ '
+ 'SplitContainer2.Panel2
+ '
+ Me.SplitContainer2.Panel2.Controls.Add(Me.SplitContainer1)
+ Me.SplitContainer2.Size = New System.Drawing.Size(944, 605)
+ Me.SplitContainer2.SplitterDistance = 120
+ Me.SplitContainer2.TabIndex = 7
+ '
+ 'GroupBox1
+ '
+ Me.GroupBox1.Controls.Add(Me.CheckedListBox_Series)
+ Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
+ Me.GroupBox1.Name = "GroupBox1"
+ Me.GroupBox1.Size = New System.Drawing.Size(120, 605)
+ Me.GroupBox1.TabIndex = 2
+ Me.GroupBox1.TabStop = False
+ Me.GroupBox1.Text = "Series"
+ '
+ 'CheckedListBox_Series
+ '
+ Me.CheckedListBox_Series.BackColor = System.Drawing.SystemColors.Control
+ Me.CheckedListBox_Series.CheckOnClick = True
+ Me.CheckedListBox_Series.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.CheckedListBox_Series.FormattingEnabled = True
+ Me.CheckedListBox_Series.Location = New System.Drawing.Point(3, 16)
+ Me.CheckedListBox_Series.Name = "CheckedListBox_Series"
+ Me.CheckedListBox_Series.Size = New System.Drawing.Size(114, 586)
+ Me.CheckedListBox_Series.TabIndex = 0
+ '
'MainWindow
'
Me.AllowDrop = True
@@ -881,9 +929,9 @@ Partial Class MainWindow
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(944, 661)
+ Me.Controls.Add(Me.SplitContainer2)
Me.Controls.Add(Me.ProgressBar1)
Me.Controls.Add(ToolStrip1)
- Me.Controls.Add(Me.SplitContainer1)
Me.Controls.Add(StatusStrip1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.KeyPreview = True
@@ -905,6 +953,11 @@ Partial Class MainWindow
Me.Panel_DisplayRange.ResumeLayout(False)
Me.Panel_DisplayRange.PerformLayout()
CType(Me.NumericUpDown_DisplayRangeMultiplier, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.SplitContainer2.Panel1.ResumeLayout(False)
+ Me.SplitContainer2.Panel2.ResumeLayout(False)
+ CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.SplitContainer2.ResumeLayout(False)
+ Me.GroupBox1.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -991,4 +1044,7 @@ Partial Class MainWindow
Friend WithEvents ToolTip1 As ToolTip
Friend WithEvents MainPlot As ScottPlot.FormsPlot
Friend WithEvents OverviewPlot As ScottPlot.FormsPlot
+ Friend WithEvents SplitContainer2 As SplitContainer
+ Friend WithEvents CheckedListBox_Series As CheckedListBox
+ Friend WithEvents GroupBox1 As GroupBox
End Class
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 8d7062f7..6a5a5288 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -138,6 +138,12 @@
120, 3
+
+ False
+
+
+ False
+
@@ -172,6 +178,12 @@
g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC
+
+ False
+
+
+ False
+
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -242,18 +254,18 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25xG
- LUXGUsogRQVlhhTmnNNcLkxSoIbTq2UiunVJvCjSZOZsZCiJIhVycbVyay2EtqixVoEvPbBfF7mONV31
- 2c7LOb/P73vO7zDWcRvLUM+wyEIOl4fsI3lRuzE36sSFIVd/kcXVcwGlyzbHaxRKvEPioMcgIt36Evki
- LkCcukLE1c+Tu3R8cl5bFHRg5yR0+Z/EkuNyqdrjC6eSK2Ee6Y/UegORq0v+n/mv/T9SHF1c9RzGDc60
- czbexGMUWWLJi74wQvrDV6jV5A2EG8nAaoPXH6mjGpV6fd+TZzu55PRtjoXWEpDG8pBbXyxf+hQupOTr
- cTlSH5NZ10yQJsWBulHOtIojt6ryQ7SWwD6cG13UCRAqqXo9df0Jp2sIKGmdAETQB9YWFjKjYUZpLYGd
- yInGBub1h6XZdQRk1g1BRvUgHJM8AP5NC3Sb3cBtNMM+NgbT6k0aOPHSkKuXJ/cEVtlojQF6x0noGfOs
- iV0mNzR020Az6AKWjIAkVAW0lmBBy7Ms9PDJ2KDSJPiaXItNQbXGClXqJyC+NQHStklo0zkgS6QHxm7Z
- L1qN48AK0Pn73ODzTq46VTgAXaOvoMP4gkpdgDu4E2RUk9Y+B7AvE3DgSD2M1WYJaDWBXVMgcVD/nMLT
- wv6zd2EPC4MdJ9shswIHhXYWWJcMgDBb4eN8B9jauDBeie6l1QQzag46peRYrCpWKDYsm5IZ3XpcAWfE
- D+HwqWb48tYAX5cJeP9MAea87KhxsyYbONgU2pJ8A2Y7i8HnxCD4Rg8rrnvwckAM6lzkw+Oq9G105d95
- JMsS2pTnYXmyGd5NtsBc90UwS9O+jfIPbadL/o1JkiEkytLhqYINIxXoZ0KQvos++n9MlSd29hcfVeLl
- zKT4DoPxGyNZlyJhSJPFAAAAAElFTkSuQmCC
+ mjHGUsogRQVlhhTmnNNcLkxSoIZTtExEty6J9yrSZOZsZCiJIhVycbVyay2EtqixVoEvPbBfF7mONV31
+ 2c7LOb/P73vO7zDWcRNlqGdYZCGHy0P2kbyonciNOjFhyNVfZHH1XEDpss3xEkKJd0gc9BhFpNtQIl/E
+ BIhTX4i4+nlyl55PzuuKgg7tOQld/iex5Lhcqvb4wqnkSphH+iO13kDk6pL/Z/5r/48URxdXPaflBmfa
+ ORtv4iFElljyoi+MkP7wFWo1eQPhRjKw2uD1R+qoRqVe3/fk2U4uOX2bY6G1BCRRHnIbiuVLn8KFlHw9
+ LkfqYzLrmgnSpBhQN8qbVnHkVlV+iNYS2Idzo4t6AUIlVa+nrj8hpwaHktYJQAR9YG1hITMaZpTWEtjx
+ nGhsYF5/WJpdh0Nm3RBkVA/CMckD4N+0QLfZDdxGM+xja2FavUkDJ1YacvXy5J7AKhutMULvOAk9Y541
+ scvkhoZuG2gGXcCS4ZCEqoDWEizoeJaFHj4ZG1SaBFuTa7VTUK2xQpX6CYhvTYC0bRLa9A7IEhmAsVv2
+ i1bjOLQF6Px9bvB5J1edKhyArtFX0EG8oFIX4A7mBBnVpLXPAezLOBw4Ug9jtVkCWk1g1xRIHNQ/p/B0
+ sP/sXdjD0sKOk+2QWYGBQjcLrEtGQJit8HG+A2xtXBivRPfSaoIZNQedUnIsVhUrFBuWTcmMbj2ugNPi
+ h3D4VDN8eWuEr8s4vH+mAHNedpTYrMkGDjaFtiTfgNnOYvA5tRB8Y4AV1z14OSAG9Rnkw+Oq9G105d95
+ JMsS2pTnYXmyGd5NtsBc90UwS9O+jfIPbadL/o1JkiHEy9LhqYINIxXoZ1yQvos++n9MlSd29hcfVWLl
+ zKT4DoPxG/hmlxMj78n5AAAAAElFTkSuQmCC
@@ -316,6 +328,9 @@
222, 3
+
+ 458, 4
+
25
From 24194ae871a24124d43e97c58d2d2fb8e23ec6d6 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 11:44:59 +0100
Subject: [PATCH 15/57] fix right margin on charts, rename method
---
source/Controllers/WaveController.vb | 2 +-
source/Helpers.vb | 1 -
source/Views/MainWindow.vb | 42 +++++-----------------------
3 files changed, 8 insertions(+), 37 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 20e023e1..7415a045 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -324,7 +324,7 @@ Friend Class WaveController
Me.ChartSeries.Clear()
'Charts zurücksetzen
- Call View.Init_Charts()
+ Call View.InitializeCharts()
'Reset Zoom history
Me.ZoomHistory.Clear()
diff --git a/source/Helpers.vb b/source/Helpers.vb
index 1a88b4da..6d5fcefb 100644
--- a/source/Helpers.vb
+++ b/source/Helpers.vb
@@ -247,7 +247,6 @@ Public Module Helpers
'hide right Y axis
plot.YAxis2.Label("")
plot.YAxis2.Dims.ResetLimits()
- plot.YAxis2.IsVisible = False
'remove any additional axes
For axisIndex As Integer = 2 To plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True).Count() - 1
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index cec54f54..fe461a16 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -103,7 +103,7 @@ Friend Class MainWindow
'Charts einrichten
'-----------------
- Call Me.Init_Charts()
+ Call Me.InitializeCharts()
'Navigation initialisieren
Me.ComboBox_NavIncrement.SelectedItem = "Days"
@@ -126,17 +126,16 @@ Friend Class MainWindow
End Sub
-
- 'Charts neu einrichten
- '*********************
- Friend Sub Init_Charts()
+ '''
+ ''' Initializes/resets the charts
+ '''
+ Friend Sub InitializeCharts()
'initialize main plot
Me.MainPlot.Plot.Clear()
Call Helpers.FormatChart(Me.MainPlot.Plot)
Me.MainPlot.Configuration.Pan = False
Me.MainPlot.Configuration.Zoom = False
- Me.MainPlot.Configuration.LockVerticalAxis = True 'TODO: this only locks YAxis1
Me.MainPlot.Refresh()
'initialize overview plot
@@ -147,35 +146,7 @@ Friend Class MainWindow
Me.OverviewPlot.Configuration.Zoom = False
Me.OverviewPlot.Refresh()
- 'TODO: TChart
- 'Me.TChart2.Panel.Brush.Color = Color.FromArgb(239, 239, 239)
- 'Me.TChart2.Walls.Back.Color = Color.FromArgb(239, 239, 239)
- 'Me.TChart2.Header.Visible = False
- 'Me.TChart2.Legend.Visible = False
-
- ''Disable TeeChart builtin zooming and panning functionality
- 'Me.MainPlot.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
- 'Me.MainPlot.Zoom.History = False
- 'Me.MainPlot.Zoom.Animated = True
- 'Me.MainPlot.Panning.Allow = Steema.TeeChart.ScrollModes.None
-
- 'Me.TChart2.Zoom.Direction = Steema.TeeChart.ZoomDirections.None
- 'Me.TChart2.Panning.Allow = Steema.TeeChart.ScrollModes.None
-
- ''Achsen
- 'Me.MainPlot.Axes.Bottom.Automatic = False
- 'Me.MainPlot.Axes.Bottom.Labels.Angle = 90
- 'Me.MainPlot.Axes.Bottom.Labels.DateTimeFormat = Helpers.CurrentDateFormat
- 'Me.MainPlot.Axes.Right.Title.Angle = 90
-
- 'Me.TChart2.Axes.Left.Labels.Font.Color = Color.FromArgb(100, 100, 100)
- 'Me.TChart2.Axes.Left.Labels.Font.Size = 8
- 'Me.TChart2.Axes.Bottom.Labels.Font.Color = Color.FromArgb(100, 100, 100)
- 'Me.TChart2.Axes.Bottom.Labels.Font.Size = 8
- 'Me.TChart2.Axes.Bottom.Automatic = False
- 'Me.TChart2.Axes.Bottom.Labels.DateTimeFormat = Globalization.CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern 'date only without time
-
- 'ColorBand einrichten
+ 'initialize rectangles
Call Me.InitializeRectangles()
End Sub
@@ -194,6 +165,7 @@ Friend Class MainWindow
ViewExtentRectangle.BorderColor = Color.Coral
ViewExtentRectangle.BorderLineStyle = ScottPlot.LineStyle.Solid
ViewExtentRectangle.BorderLineWidth = 1
+ Me.OverviewPlot.Refresh()
'zoom rectangle
limits = Me.MainPlot.Plot.GetAxisLimits()
From ee578d40cc8c0f34ec14b406c29d16146c621fed Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 11:59:30 +0100
Subject: [PATCH 16/57] move buttons for activating/deactivating all series to
TOC and implement functionality
---
source/Controllers/WaveController.vb | 18 +++--
source/Views/MainWindow.Designer.vb | 104 ++++++++++++++-------------
source/Views/MainWindow.resx | 29 ++++----
3 files changed, 79 insertions(+), 72 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 7415a045..f730526f 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -136,8 +136,6 @@ Friend Class WaveController
AddHandler Me.View.ToolStripButton_ZoomNext.Click, AddressOf ZoomNext_Click
AddHandler Me.View.ToolStripButton_ZoomAll.Click, AddressOf ZoomAll_Click
AddHandler Me.View.ToolStripDropDownButton_ZoomToSeries.DropDownOpening, AddressOf ZoomToSeries_DropDown
- AddHandler Me.View.ToolStripMenuItem_ActivateAllSeries.Click, AddressOf ActivateAllSeries_Click
- AddHandler Me.View.ToolStripMenuItem_DeactivateAllSeries.Click, AddressOf DeactivateAllSeries_Click
AddHandler Me.View.ToolStripMenuItem_Help.Click, AddressOf Help_Click
AddHandler Me.View.ToolStripMenuItem_CheckForUpdate.Click, AddressOf CheckForUpdate_Click
AddHandler Me.View.ToolStripButton_UpdateNotification.Click, AddressOf CheckForUpdate_Click
@@ -166,6 +164,8 @@ Friend Class WaveController
AddHandler Me.View.DragDrop, AddressOf Wave_DragDrop
'TOC events
+ AddHandler Me.View.ToolStripMenuItem_ActivateAllSeries.Click, AddressOf ActivateAllSeries_Click
+ AddHandler Me.View.ToolStripMenuItem_DeactivateAllSeries.Click, AddressOf DeactivateAllSeries_Click
AddHandler Me.View.CheckedListBox_Series.ItemCheck, AddressOf SeriesActiveChanged
'navigation events
@@ -1218,10 +1218,9 @@ Friend Class WaveController
'''
'''
Private Sub ActivateAllSeries_Click(sender As Object, e As EventArgs)
- 'TODO: TChart
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' series.Active = True
- 'Next
+ For i As Integer = 0 To View.CheckedListBox_Series.Items.Count - 1
+ View.CheckedListBox_Series.SetItemChecked(i, True)
+ Next
End Sub
'''
@@ -1230,10 +1229,9 @@ Friend Class WaveController
'''
'''
Private Sub DeactivateAllSeries_Click(sender As Object, e As EventArgs)
- 'TODO: TChart
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' series.Active = False
- 'Next
+ For i As Integer = 0 To View.CheckedListBox_Series.Items.Count - 1
+ View.CheckedListBox_Series.SetItemChecked(i, False)
+ Next
End Sub
'''
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 4ff2a8c5..23473a3b 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -85,9 +85,6 @@ Partial Class MainWindow
Me.ToolStripButton_ZoomAll = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_UpdateNotification = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator11 = New System.Windows.Forms.ToolStripSeparator()
- Me.ToolStripDropDownButton_ActivateAllSeries = New System.Windows.Forms.ToolStripDropDownButton()
- Me.ToolStripMenuItem_ActivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.OverviewPlot = New ScottPlot.FormsPlot()
@@ -111,8 +108,11 @@ Partial Class MainWindow
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox()
Me.CheckedListBox_Series = New System.Windows.Forms.CheckedListBox()
+ Me.ToolStrip2 = New System.Windows.Forms.ToolStrip()
+ Me.ToolStripDropDownButton1 = New System.Windows.Forms.ToolStripDropDownButton()
+ Me.ToolStripMenuItem_ActivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
@@ -137,7 +137,7 @@ Partial Class MainWindow
Me.SplitContainer2.Panel1.SuspendLayout()
Me.SplitContainer2.Panel2.SuspendLayout()
Me.SplitContainer2.SuspendLayout()
- Me.GroupBox1.SuspendLayout()
+ Me.ToolStrip2.SuspendLayout()
Me.SuspendLayout()
'
'ToolStripSeparator1
@@ -205,7 +205,7 @@ Partial Class MainWindow
'
ToolStrip1.AutoSize = False
ToolStrip1.BackColor = System.Drawing.SystemColors.Control
- ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_New, Me.ToolStripDropDownButton_Open, Me.ToolStripDropDownButton_Save, ToolStripSeparator4, Me.ToolStripButton_Copy, Me.ToolStripButton_Print, ToolStripSeparator2, Me.ToolStripButton_Cut, Me.ToolStripButton_Merge, Me.ToolStripSeparator8, Me.ToolStripButton_ShowNaNValues, Me.ToolStripButton_ConvertErrorValues, Me.ToolStripButton_RemoveNaNValues, Me.ToolStripSeparator7, Me.ToolStripButton_Analysis, ToolStripSeparator1, Me.ToolStripButton_EditChart, Me.ToolStripDropDownButton_ColorPalette, Me.ToolStripSeparator9, Me.ToolStripButton_Properties, Me.ToolStripButton_TimeseriesValues, Me.ToolStripSeparator10, Me.ToolStripButton_AxisDialog, Me.ToolStripButton_AutoAdjustYAxes, ToolStripSeparator3, Me.ToolStripButton_ToggleOverview, Me.ToolStripButton_ToggleNavigation, toolStripSeparator, Me.ToolStripButton_ZoomIn, Me.ToolStripButton_ZoomOut, Me.ToolStripButton_ZoomPrevious, Me.ToolStripDropDownButton_Help, Me.ToolStripButton_ZoomNext, Me.ToolStripDropDownButton_ZoomToSeries, Me.ToolStripButton_ZoomAll, Me.ToolStripButton_UpdateNotification, Me.ToolStripSeparator11, Me.ToolStripDropDownButton_ActivateAllSeries})
+ ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_New, Me.ToolStripDropDownButton_Open, Me.ToolStripDropDownButton_Save, ToolStripSeparator4, Me.ToolStripButton_Copy, Me.ToolStripButton_Print, ToolStripSeparator2, Me.ToolStripButton_Cut, Me.ToolStripButton_Merge, Me.ToolStripSeparator8, Me.ToolStripButton_ShowNaNValues, Me.ToolStripButton_ConvertErrorValues, Me.ToolStripButton_RemoveNaNValues, Me.ToolStripSeparator7, Me.ToolStripButton_Analysis, ToolStripSeparator1, Me.ToolStripButton_EditChart, Me.ToolStripDropDownButton_ColorPalette, Me.ToolStripSeparator9, Me.ToolStripButton_Properties, Me.ToolStripButton_TimeseriesValues, Me.ToolStripSeparator10, Me.ToolStripButton_AxisDialog, Me.ToolStripButton_AutoAdjustYAxes, ToolStripSeparator3, Me.ToolStripButton_ToggleOverview, Me.ToolStripButton_ToggleNavigation, toolStripSeparator, Me.ToolStripButton_ZoomIn, Me.ToolStripButton_ZoomOut, Me.ToolStripButton_ZoomPrevious, Me.ToolStripDropDownButton_Help, Me.ToolStripButton_ZoomNext, Me.ToolStripDropDownButton_ZoomToSeries, Me.ToolStripButton_ZoomAll, Me.ToolStripButton_UpdateNotification, Me.ToolStripSeparator11})
ToolStrip1.Location = New System.Drawing.Point(0, 0)
ToolStrip1.Name = "ToolStrip1"
ToolStrip1.Size = New System.Drawing.Size(944, 34)
@@ -635,29 +635,6 @@ Partial Class MainWindow
Me.ToolStripSeparator11.Name = "ToolStripSeparator11"
Me.ToolStripSeparator11.Size = New System.Drawing.Size(6, 34)
'
- 'ToolStripDropDownButton_ActivateAllSeries
- '
- Me.ToolStripDropDownButton_ActivateAllSeries.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripDropDownButton_ActivateAllSeries.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_ActivateAllSeries, Me.ToolStripMenuItem_DeactivateAllSeries})
- Me.ToolStripDropDownButton_ActivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept_split
- Me.ToolStripDropDownButton_ActivateAllSeries.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripDropDownButton_ActivateAllSeries.Name = "ToolStripDropDownButton_ActivateAllSeries"
- Me.ToolStripDropDownButton_ActivateAllSeries.Size = New System.Drawing.Size(29, 31)
- '
- 'ToolStripMenuItem_ActivateAllSeries
- '
- Me.ToolStripMenuItem_ActivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept
- Me.ToolStripMenuItem_ActivateAllSeries.Name = "ToolStripMenuItem_ActivateAllSeries"
- Me.ToolStripMenuItem_ActivateAllSeries.Size = New System.Drawing.Size(176, 22)
- Me.ToolStripMenuItem_ActivateAllSeries.Text = "Activate all series"
- '
- 'ToolStripMenuItem_DeactivateAllSeries
- '
- Me.ToolStripMenuItem_DeactivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept_grayscale
- Me.ToolStripMenuItem_DeactivateAllSeries.Name = "ToolStripMenuItem_DeactivateAllSeries"
- Me.ToolStripMenuItem_DeactivateAllSeries.Size = New System.Drawing.Size(176, 22)
- Me.ToolStripMenuItem_DeactivateAllSeries.Text = "Deactivate all series"
- '
'OpenFileDialog1
'
Me.OpenFileDialog1.Multiselect = True
@@ -891,7 +868,8 @@ Partial Class MainWindow
'SplitContainer2.Panel1
'
Me.SplitContainer2.Panel1.AutoScroll = True
- Me.SplitContainer2.Panel1.Controls.Add(Me.GroupBox1)
+ Me.SplitContainer2.Panel1.Controls.Add(Me.ToolStrip2)
+ Me.SplitContainer2.Panel1.Controls.Add(Me.CheckedListBox_Series)
'
'SplitContainer2.Panel2
'
@@ -900,27 +878,53 @@ Partial Class MainWindow
Me.SplitContainer2.SplitterDistance = 120
Me.SplitContainer2.TabIndex = 7
'
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.CheckedListBox_Series)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(120, 605)
- Me.GroupBox1.TabIndex = 2
- Me.GroupBox1.TabStop = False
- Me.GroupBox1.Text = "Series"
- '
'CheckedListBox_Series
'
+ Me.CheckedListBox_Series.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
+ Or System.Windows.Forms.AnchorStyles.Left) _
+ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.CheckedListBox_Series.BackColor = System.Drawing.SystemColors.Control
Me.CheckedListBox_Series.CheckOnClick = True
- Me.CheckedListBox_Series.Dock = System.Windows.Forms.DockStyle.Fill
Me.CheckedListBox_Series.FormattingEnabled = True
- Me.CheckedListBox_Series.Location = New System.Drawing.Point(3, 16)
+ Me.CheckedListBox_Series.HorizontalScrollbar = True
+ Me.CheckedListBox_Series.Location = New System.Drawing.Point(5, 31)
+ Me.CheckedListBox_Series.Margin = New System.Windows.Forms.Padding(5)
Me.CheckedListBox_Series.Name = "CheckedListBox_Series"
- Me.CheckedListBox_Series.Size = New System.Drawing.Size(114, 586)
+ Me.CheckedListBox_Series.Size = New System.Drawing.Size(110, 559)
Me.CheckedListBox_Series.TabIndex = 0
+ Me.CheckedListBox_Series.ThreeDCheckBoxes = True
+ '
+ 'ToolStrip2
+ '
+ Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripDropDownButton1})
+ Me.ToolStrip2.Location = New System.Drawing.Point(0, 0)
+ Me.ToolStrip2.Name = "ToolStrip2"
+ Me.ToolStrip2.Size = New System.Drawing.Size(120, 25)
+ Me.ToolStrip2.TabIndex = 1
+ Me.ToolStrip2.Text = "ToolStrip2"
+ '
+ 'ToolStripDropDownButton1
+ '
+ Me.ToolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.ToolStripDropDownButton1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_ActivateAllSeries, Me.ToolStripMenuItem_DeactivateAllSeries})
+ Me.ToolStripDropDownButton1.Image = Global.BlueM.Wave.My.Resources.Resources.accept_split
+ Me.ToolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripDropDownButton1.Name = "ToolStripDropDownButton1"
+ Me.ToolStripDropDownButton1.Size = New System.Drawing.Size(29, 22)
+ '
+ 'ToolStripMenuItem_ActivateAllSeries
+ '
+ Me.ToolStripMenuItem_ActivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept
+ Me.ToolStripMenuItem_ActivateAllSeries.Name = "ToolStripMenuItem_ActivateAllSeries"
+ Me.ToolStripMenuItem_ActivateAllSeries.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_ActivateAllSeries.Text = "Activate all series"
+ '
+ 'ToolStripMenuItem_DeactivateAllSeries
+ '
+ Me.ToolStripMenuItem_DeactivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept_grayscale
+ Me.ToolStripMenuItem_DeactivateAllSeries.Name = "ToolStripMenuItem_DeactivateAllSeries"
+ Me.ToolStripMenuItem_DeactivateAllSeries.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_DeactivateAllSeries.Text = "Deactivate all series"
'
'MainWindow
'
@@ -954,10 +958,12 @@ Partial Class MainWindow
Me.Panel_DisplayRange.PerformLayout()
CType(Me.NumericUpDown_DisplayRangeMultiplier, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer2.Panel1.ResumeLayout(False)
+ Me.SplitContainer2.Panel1.PerformLayout()
Me.SplitContainer2.Panel2.ResumeLayout(False)
CType(Me.SplitContainer2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer2.ResumeLayout(False)
- Me.GroupBox1.ResumeLayout(False)
+ Me.ToolStrip2.ResumeLayout(False)
+ Me.ToolStrip2.PerformLayout()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -1035,9 +1041,6 @@ Partial Class MainWindow
Friend WithEvents ToolStripMenuItem_ColorPaletteWheel As ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_ColorPaletteRandom As ToolStripMenuItem
Friend WithEvents ToolStripSeparator11 As ToolStripSeparator
- Friend WithEvents ToolStripDropDownButton_ActivateAllSeries As ToolStripDropDownButton
- Friend WithEvents ToolStripMenuItem_ActivateAllSeries As ToolStripMenuItem
- Friend WithEvents ToolStripMenuItem_DeactivateAllSeries As ToolStripMenuItem
Friend WithEvents ProgressBar1 As ProgressBar
Friend WithEvents Button_NavStart As Button
Friend WithEvents Button_NavEnd As Button
@@ -1046,5 +1049,8 @@ Partial Class MainWindow
Friend WithEvents OverviewPlot As ScottPlot.FormsPlot
Friend WithEvents SplitContainer2 As SplitContainer
Friend WithEvents CheckedListBox_Series As CheckedListBox
- Friend WithEvents GroupBox1 As GroupBox
+ Friend WithEvents ToolStrip2 As ToolStrip
+ Friend WithEvents ToolStripDropDownButton1 As ToolStripDropDownButton
+ Friend WithEvents ToolStripMenuItem_ActivateAllSeries As ToolStripMenuItem
+ Friend WithEvents ToolStripMenuItem_DeactivateAllSeries As ToolStripMenuItem
End Class
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 6a5a5288..fd01e674 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -253,19 +253,19 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25xG
- mjHGUsogRQVlhhTmnNNcLkxSoIZTtExEty6J9yrSZOZsZCiJIhVycbVyay2EtqixVoEvPbBfF7mONV31
- 2c7LOb/P73vO7zDWcRNlqGdYZCGHy0P2kbyonciNOjFhyNVfZHH1XEDpss3xEkKJd0gc9BhFpNtQIl/E
- BIhTX4i4+nlyl55PzuuKgg7tOQld/iex5Lhcqvb4wqnkSphH+iO13kDk6pL/Z/5r/48URxdXPaflBmfa
- ORtv4iFElljyoi+MkP7wFWo1eQPhRjKw2uD1R+qoRqVe3/fk2U4uOX2bY6G1BCRRHnIbiuVLn8KFlHw9
- LkfqYzLrmgnSpBhQN8qbVnHkVlV+iNYS2Idzo4t6AUIlVa+nrj8hpwaHktYJQAR9YG1hITMaZpTWEtjx
- nGhsYF5/WJpdh0Nm3RBkVA/CMckD4N+0QLfZDdxGM+xja2FavUkDJ1YacvXy5J7AKhutMULvOAk9Y541
- scvkhoZuG2gGXcCS4ZCEqoDWEizoeJaFHj4ZG1SaBFuTa7VTUK2xQpX6CYhvTYC0bRLa9A7IEhmAsVv2
- i1bjOLQF6Px9bvB5J1edKhyArtFX0EG8oFIX4A7mBBnVpLXPAezLOBw4Ug9jtVkCWk1g1xRIHNQ/p/B0
- sP/sXdjD0sKOk+2QWYGBQjcLrEtGQJit8HG+A2xtXBivRPfSaoIZNQedUnIsVhUrFBuWTcmMbj2ugNPi
- h3D4VDN8eWuEr8s4vH+mAHNedpTYrMkGDjaFtiTfgNnOYvA5tRB8Y4AV1z14OSAG9Rnkw+Oq9G105d95
- JMsS2pTnYXmyGd5NtsBc90UwS9O+jfIPbadL/o1JkiHEy9LhqYINIxXoZ1yQvos++n9MlSd29hcfVWLl
- zKT4DoPxG/hmlxMj78n5AAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25yG
+ zmKMpZRBigrKDCnMOae5XJikQA2nV8tEdOuSeFHEyczZyFASRSrk4mrl1loIbVFjrQJfemC/LnIda7rq
+ s52Xc36f3/ec32Fs4DaWoZ5hkYUcLg/ZR/KidmNu1IkLQ67+Iour5yJKl22N1yiUeIfEQY9BRLr1JfIl
+ XIA4dYWIq58nd+n45IK2KOjAzkvo8j+JJcflUrXHF04lV8M80h+p9QYi15b9P/Nf+3+kOLq46nmMG5xt
+ 52y+iccossSSl3xhhPSHr1KryRsIN5KBtQavP1JHNSr1+r4nz3VyyZk7HAutJSCN5SG3vli+/ClcSMk3
+ 4nKkPiazrpsgTYoDdaMzMyqO3KrKD9FaAvtwbnRJJ0CopOqN1I0n5NYQUNI6CYigD6wtLGRWw4zSWgI7
+ kRONDczrD0uz6wjIrBuCjOpBOCF5CPxbFug2u4HbaIYDbAxm1Fs0cOKlIVcvT+4JrLHRGgP0TpDQM+5Z
+ F7tMbmjotoFm0AUsGQFJqApoLcGilmdZ7OGTsUGlSfB1uRabhmqNFarUT0B8exKkbVPQpnNAlkgPjL2y
+ X7Qax4EVoAsPuMHnnVx1qnAAukZfQYfxBZW6CHdxJ8ioJq19DmBfIeDQsXoYr80S0GoCu6ZA4qD+OYWn
+ hYPn7sE+Fga7TrdDZgUOCu0csC4bAGG2wseFDrC1cWGiEt1Pqwlm1Rx0WsmxWFWsUGxYNiUzuv2kAvLE
+ j+BoTjN8eWuArysEvH+mAHNedtS4VZNNHG4KbUu+CXOdxeBzYhB8o4dV1314OSAG9Vnkw+Oq9B105d8Z
+ k2UJbcoLsDLVDO+mWmC++xKYpWnfRvlHdtIl/8YkyRASZenwVMGGkQr0MyFI30Mf/T+mylO7+4uPK/Fy
+ ZlJ8h8H4Deoalw5ogMx3AAAAAElFTkSuQmCC
@@ -331,6 +331,9 @@
458, 4
+
+ 556, 4
+
25
From 212e920c4ceb989b2db7438c65af6dbb78e44615 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 13:11:29 +0100
Subject: [PATCH 17/57] implement series reordering from the TOC
---
source/Controllers/PropertiesController.vb | 1 +
source/Controllers/WaveController.vb | 138 ++++++++++++++++++---
source/Views/MainWindow.Designer.vb | 28 ++++-
3 files changed, 150 insertions(+), 17 deletions(-)
diff --git a/source/Controllers/PropertiesController.vb b/source/Controllers/PropertiesController.vb
index 90df5c46..1a1f6759 100644
--- a/source/Controllers/PropertiesController.vb
+++ b/source/Controllers/PropertiesController.vb
@@ -40,6 +40,7 @@ Friend Class PropertiesController
AddHandler _model.SeriesRemoved, AddressOf UpdateView
AddHandler _model.SeriesCleared, AddressOf UpdateView
AddHandler _model.SeriesAllReordered, AddressOf UpdateView
+ AddHandler _model.SeriesReordered, AddressOf UpdateView
End Sub
Public Overrides Sub ShowView()
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index f730526f..c83e7b45 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -164,6 +164,9 @@ Friend Class WaveController
AddHandler Me.View.DragDrop, AddressOf Wave_DragDrop
'TOC events
+ AddHandler Me.View.CheckedListBox_Series.SelectedIndexChanged, AddressOf TOC_SelectionChanged
+ AddHandler Me.View.ToolStripButton_MoveUp.Click, AddressOf ToolStripButton_MoveUp_Click
+ AddHandler Me.View.ToolStripButton_MoveDown.Click, AddressOf ToolStripButton_MoveDown_Click
AddHandler Me.View.ToolStripMenuItem_ActivateAllSeries.Click, AddressOf ActivateAllSeries_Click
AddHandler Me.View.ToolStripMenuItem_DeactivateAllSeries.Click, AddressOf DeactivateAllSeries_Click
AddHandler Me.View.CheckedListBox_Series.ItemCheck, AddressOf SeriesActiveChanged
@@ -1234,6 +1237,84 @@ Friend Class WaveController
Next
End Sub
+ '''
+ ''' Handles the user clicking the move up button
+ '''
+ '''
+ '''
+ Private Sub ToolStripButton_MoveUp_Click(sender As Object, e As EventArgs)
+ Call ReorderSelectedSeries(Direction.Up)
+ End Sub
+
+ '''
+ ''' Handles the user clicking the move down button
+ '''
+ '''
+ '''
+ Private Sub ToolStripButton_MoveDown_Click(sender As Object, e As EventArgs)
+ Call ReorderSelectedSeries(Direction.Down)
+ End Sub
+
+ '''
+ ''' Reorder selected series
+ '''
+ ''' Direction in which to move selected series
+ Private Sub ReorderSelectedSeries(direction As Direction)
+
+ Dim indices As New List(Of Integer)
+ Dim ids As New List(Of Integer)
+ For Each index As Integer In Me.View.CheckedListBox_Series.SelectedIndices
+ If (direction = Direction.Up And index = 0) Or
+ (direction = Direction.Down And index = Me.View.CheckedListBox_Series.Items.Count - 1) Then
+ 'if first row is selected, moving up does nothing
+ 'if last row is selected, moving down does nothing
+ Exit Sub
+ End If
+ indices.Add(index)
+ ids.Add(CType(Me.View.CheckedListBox_Series.Items(index), TimeSeries).Id)
+ Next
+ 'reorder each series in the model
+ For Each id As Integer In ids
+ Model.SeriesReorder(id, direction)
+ Next
+ 'reselect previously selected items in their new positions
+ Me.View.CheckedListBox_Series.ClearSelected()
+ Dim offset As Integer
+ If direction = Direction.Up Then
+ offset = -1
+ Else
+ offset = 1
+ End If
+ For Each index As Integer In indices
+ Me.View.CheckedListBox_Series.SetSelected(index + offset, True)
+ Next
+ End Sub
+
+ '''
+ ''' Handles the TOC selection changed
+ ''' Enables/disables buttons
+ '''
+ '''
+ '''
+ Private Sub TOC_SelectionChanged(sender As Object, e As EventArgs)
+ 'Check if any items are selected
+ If Me.View.CheckedListBox_Series.SelectedIndices.Count = 0 Then
+ Me.View.ToolStripButton_MoveUp.Enabled = False
+ Me.View.ToolStripButton_MoveDown.Enabled = False
+ Else
+ Me.View.ToolStripButton_MoveUp.Enabled = True
+ Me.View.ToolStripButton_MoveDown.Enabled = True
+ 'check if first row is selected
+ If Me.View.CheckedListBox_Series.GetSelected(0) Then
+ Me.View.ToolStripButton_MoveUp.Enabled = False
+ End If
+ 'check if last row is selected
+ If Me.View.CheckedListBox_Series.GetSelected(Me.View.CheckedListBox_Series.Items.Count - 1) Then
+ Me.View.ToolStripButton_MoveDown.Enabled = False
+ End If
+ End If
+ End Sub
+
'''
''' Check for update menu item or update notification button clicked
'''
@@ -2691,21 +2772,48 @@ Friend Class WaveController
''' Id of the TimeSeries whose order was changed
''' Direction in which the series was moved
Private Sub SeriesReordered(id As Integer, direction As Direction)
- 'TODO: TChart
- ''update series order in chart
- ''TODO: this causes a second, unnecessary event update through TeeEvent which I don't know how to prevent
- 'Dim index As Integer = 0
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If series.Tag = id Then
- ' If direction = Direction.Up And index > 0 Then
- ' View.MainPlot.Series.Exchange(index, index - 1)
- ' ElseIf direction = Direction.Down And index < View.MainPlot.Series.Count - 1 Then
- ' View.MainPlot.Series.Exchange(index, index + 1)
- ' End If
- ' Exit For
- ' End If
- ' index += 1
- 'Next
+
+ Dim offset As Integer
+ If direction = Direction.Up Then
+ offset = -1
+ Else
+ offset = 1
+ End If
+
+ 'update series order in chart
+ 'find the index of the series in the chart by comparing titles
+ 'TODO: find a better way to detemine a series' index in the chart
+ Dim index As Integer = 0
+ For Each plottable As ScottPlot.Plottable.IPlottable In Me.View.MainPlot.Plot.GetPlottables()
+ Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(plottable, ScottPlot.Plottable.ScatterPlot)
+ If Not IsNothing(series) Then
+ If series.Label = Me.Model.TimeSeries(id).Title Then
+ Me.View.MainPlot.Plot.Move(index, index + offset)
+ Me.View.MainPlot.Refresh()
+ Exit For
+ End If
+ End If
+ index += 1
+ Next
+
+ 'update series order in TOC
+ 'find the index of the series in the TOC by comparing titles
+ Dim indexFound As Boolean = False
+ index = 0
+ For Each ts As TimeSeries In Me.View.CheckedListBox_Series.Items
+ If ts.Title = Me.Model.TimeSeries(id).Title Then
+ indexFound = True
+ Exit For
+ End If
+ index += 1
+ Next
+ If indexFound Then
+ Dim isChecked As Boolean = Me.View.CheckedListBox_Series.GetItemChecked(index)
+ Me.View.CheckedListBox_Series.Items.RemoveAt(index)
+ Me.View.CheckedListBox_Series.Items.Insert(index + offset, Me.Model.TimeSeries(id))
+ Me.View.CheckedListBox_Series.SetItemChecked(index + offset, isChecked)
+ End If
+
End Sub
'''
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 23473a3b..b6130ad5 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -113,6 +113,8 @@ Partial Class MainWindow
Me.ToolStripDropDownButton1 = New System.Windows.Forms.ToolStripDropDownButton()
Me.ToolStripMenuItem_ActivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripButton_MoveUp = New System.Windows.Forms.ToolStripButton()
+ Me.ToolStripButton_MoveDown = New System.Windows.Forms.ToolStripButton()
ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
@@ -884,7 +886,6 @@ Partial Class MainWindow
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.CheckedListBox_Series.BackColor = System.Drawing.SystemColors.Control
- Me.CheckedListBox_Series.CheckOnClick = True
Me.CheckedListBox_Series.FormattingEnabled = True
Me.CheckedListBox_Series.HorizontalScrollbar = True
Me.CheckedListBox_Series.Location = New System.Drawing.Point(5, 31)
@@ -896,7 +897,7 @@ Partial Class MainWindow
'
'ToolStrip2
'
- Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripDropDownButton1})
+ Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_MoveUp, Me.ToolStripButton_MoveDown, Me.ToolStripDropDownButton1})
Me.ToolStrip2.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip2.Name = "ToolStrip2"
Me.ToolStrip2.Size = New System.Drawing.Size(120, 25)
@@ -926,6 +927,27 @@ Partial Class MainWindow
Me.ToolStripMenuItem_DeactivateAllSeries.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_DeactivateAllSeries.Text = "Deactivate all series"
'
+ 'ToolStripButton_MoveUp
+ '
+ Me.ToolStripButton_MoveUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.ToolStripButton_MoveUp.Enabled = False
+ Me.ToolStripButton_MoveUp.Image = Global.BlueM.Wave.My.Resources.Resources.arrow_up
+ Me.ToolStripButton_MoveUp.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripButton_MoveUp.Name = "ToolStripButton_MoveUp"
+ Me.ToolStripButton_MoveUp.Size = New System.Drawing.Size(23, 22)
+ Me.ToolStripButton_MoveUp.Text = "Move selected time series up"
+ Me.ToolStripButton_MoveUp.ToolTipText = "Move selected time series up"
+ '
+ 'ToolStripButton_MoveDown
+ '
+ Me.ToolStripButton_MoveDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.ToolStripButton_MoveDown.Enabled = False
+ Me.ToolStripButton_MoveDown.Image = Global.BlueM.Wave.My.Resources.Resources.arrow_down
+ Me.ToolStripButton_MoveDown.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripButton_MoveDown.Name = "ToolStripButton_MoveDown"
+ Me.ToolStripButton_MoveDown.Size = New System.Drawing.Size(23, 22)
+ Me.ToolStripButton_MoveDown.Text = "Move selected time series down"
+ '
'MainWindow
'
Me.AllowDrop = True
@@ -1053,4 +1075,6 @@ Partial Class MainWindow
Friend WithEvents ToolStripDropDownButton1 As ToolStripDropDownButton
Friend WithEvents ToolStripMenuItem_ActivateAllSeries As ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_DeactivateAllSeries As ToolStripMenuItem
+ Friend WithEvents ToolStripButton_MoveUp As ToolStripButton
+ Friend WithEvents ToolStripButton_MoveDown As ToolStripButton
End Class
From 133d7beb7b105fe5da41422774091538a6b3311a Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 13:18:49 +0100
Subject: [PATCH 18/57] remove series reordering functionality from properties
window
---
source/Classes/TimeSeriesCollection.vb | 12 --
source/Controllers/PropertiesController.vb | 12 --
source/Controllers/ValuesController.vb | 1 -
source/Controllers/WaveController.vb | 8 --
source/Views/PropertiesWindow.Designer.vb | 125 +++++++++------------
source/Views/PropertiesWindow.vb | 74 ------------
source/Wave.vb | 14 ---
7 files changed, 50 insertions(+), 196 deletions(-)
diff --git a/source/Classes/TimeSeriesCollection.vb b/source/Classes/TimeSeriesCollection.vb
index 4c6176f1..1929319d 100644
--- a/source/Classes/TimeSeriesCollection.vb
+++ b/source/Classes/TimeSeriesCollection.vb
@@ -200,18 +200,6 @@ Public Class TimeSeriesCollection
Return Me.GetEnumerator()
End Function
- '''
- ''' Reorders the TimeSeries contained in the TimeSeriesCollection according to the specified list of Ids
- '''
- ''' List of Ids in the new order
- Public Sub Reorder(ids As List(Of Integer))
- Dim newdict As New Specialized.OrderedDictionary()
- For Each id As Integer In ids
- newdict.Add(id, Me.Item(id))
- Next
- _timeseriesdict = newdict
- End Sub
-
'''
''' Reorders a TimeSeries within the collection
'''
diff --git a/source/Controllers/PropertiesController.vb b/source/Controllers/PropertiesController.vb
index 1a1f6759..55d64332 100644
--- a/source/Controllers/PropertiesController.vb
+++ b/source/Controllers/PropertiesController.vb
@@ -32,14 +32,12 @@ Friend Class PropertiesController
'view events
AddHandler Me.View.SeriesPropertyChanged, AddressOf SeriesPropertiesViewChanged
AddHandler Me.View.SeriesDeleted, AddressOf SeriesDeletedHandler
- AddHandler Me.View.SeriesReordered, AddressOf SeriesReorderedHandler
'model events
AddHandler _model.SeriesAdded, AddressOf UpdateView
AddHandler _model.SeriesPropertiesChanged, AddressOf UpdateView
AddHandler _model.SeriesRemoved, AddressOf UpdateView
AddHandler _model.SeriesCleared, AddressOf UpdateView
- AddHandler _model.SeriesAllReordered, AddressOf UpdateView
AddHandler _model.SeriesReordered, AddressOf UpdateView
End Sub
@@ -76,14 +74,4 @@ Friend Class PropertiesController
Next
End Sub
- '''
- ''' Handles a series being reordered in the view by reordering it in the model
- '''
- ''' Id of the TimeSeries that was reordered
- ''' Direction
- Private Sub SeriesReorderedHandler(id As Integer, direction As Direction)
- _model.SeriesReorder(id, direction)
- End Sub
-
-
End Class
diff --git a/source/Controllers/ValuesController.vb b/source/Controllers/ValuesController.vb
index a4986cf7..652e6251 100644
--- a/source/Controllers/ValuesController.vb
+++ b/source/Controllers/ValuesController.vb
@@ -39,7 +39,6 @@ Friend Class ValuesController
AddHandler _model.SeriesAdded, AddressOf UpdateView
AddHandler _model.SeriesPropertiesChanged, AddressOf UpdateView
AddHandler _model.SeriesRemoved, AddressOf UpdateView
- AddHandler _model.SeriesAllReordered, AddressOf UpdateView
AddHandler _model.SeriesReordered, AddressOf UpdateView
AddHandler _model.SeriesCleared, AddressOf UpdateView
End Sub
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index c83e7b45..cf88bdd4 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -293,14 +293,6 @@ Friend Class WaveController
' AddHandler _model.SeriesRemoved, AddressOf SeriesRemoved
' End If
- ' Case Steema.TeeChart.Styles.SeriesEventStyle.Swap
- ' 'series reordered, reorder series in model
- ' Dim ids As New List(Of Integer)
- ' For Each series As Steema.TeeChart.Styles.Series In e.sender.Series
- ' ids.Add(series.Tag)
- ' Next
- ' _model.Reorder_Series(ids)
-
' End Select
' End If
'Catch ex As Exception
diff --git a/source/Views/PropertiesWindow.Designer.vb b/source/Views/PropertiesWindow.Designer.vb
index fb19fc23..0c55ded5 100644
--- a/source/Views/PropertiesWindow.Designer.vb
+++ b/source/Views/PropertiesWindow.Designer.vb
@@ -23,17 +23,14 @@ Partial Class PropertiesWindow
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
- Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
+ Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(PropertiesWindow))
Me.DataGridView1 = New System.Windows.Forms.DataGridView()
Me.Id = New System.Windows.Forms.DataGridViewTextBoxColumn()
- Me.TitleDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Interpretation = New System.Windows.Forms.DataGridViewComboBoxColumn()
- Me.UnitDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.MetadataText = New System.Windows.Forms.DataGridViewTextBoxColumn()
- Me.DataSource = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Length = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.StartDate = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.EndDate = New System.Windows.Forms.DataGridViewTextBoxColumn()
@@ -44,13 +41,14 @@ Partial Class PropertiesWindow
Me.Maximum = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Sum = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Volume = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.TitleDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.UnitDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.DataSource = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.TimeSeriesBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
Me.ToolStripButton_showStatistics = New System.Windows.Forms.ToolStripButton()
- Me.ToolStripButton_MoveUp = New System.Windows.Forms.ToolStripButton()
- Me.ToolStripButton_MoveDown = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_Delete = New System.Windows.Forms.ToolStripButton()
- Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.TimeSeriesBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ToolStrip1.SuspendLayout()
@@ -85,17 +83,6 @@ Partial Class PropertiesWindow
Me.Id.Visible = False
Me.Id.Width = 41
'
- 'TitleDataGridViewTextBoxColumn
- '
- Me.TitleDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells
- Me.TitleDataGridViewTextBoxColumn.DataPropertyName = "Title"
- DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TitleDataGridViewTextBoxColumn.DefaultCellStyle = DataGridViewCellStyle1
- Me.TitleDataGridViewTextBoxColumn.Frozen = True
- Me.TitleDataGridViewTextBoxColumn.HeaderText = "Title"
- Me.TitleDataGridViewTextBoxColumn.Name = "TitleDataGridViewTextBoxColumn"
- Me.TitleDataGridViewTextBoxColumn.Width = 52
- '
'Interpretation
'
Me.Interpretation.DataPropertyName = "Interpretation"
@@ -108,15 +95,6 @@ Partial Class PropertiesWindow
Me.Interpretation.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic
Me.Interpretation.Width = 94
'
- 'UnitDataGridViewTextBoxColumn
- '
- Me.UnitDataGridViewTextBoxColumn.DataPropertyName = "Unit"
- DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.UnitDataGridViewTextBoxColumn.DefaultCellStyle = DataGridViewCellStyle3
- Me.UnitDataGridViewTextBoxColumn.HeaderText = "Unit"
- Me.UnitDataGridViewTextBoxColumn.Name = "UnitDataGridViewTextBoxColumn"
- Me.UnitDataGridViewTextBoxColumn.Width = 51
- '
'MetadataText
'
Me.MetadataText.DataPropertyName = "MetadataText"
@@ -124,13 +102,6 @@ Partial Class PropertiesWindow
Me.MetadataText.Name = "MetadataText"
Me.MetadataText.ReadOnly = True
'
- 'DataSource
- '
- Me.DataSource.DataPropertyName = "DataSource"
- Me.DataSource.HeaderText = "DataSource"
- Me.DataSource.Name = "DataSource"
- Me.DataSource.ReadOnly = True
- '
'Length
'
Me.Length.DataPropertyName = "Length"
@@ -211,18 +182,43 @@ Partial Class PropertiesWindow
Me.Volume.ReadOnly = True
Me.Volume.Visible = False
'
- 'TimeSeriesBindingSource
+ 'DataGridViewTextBoxColumn1
'
- Me.TimeSeriesBindingSource.DataSource = GetType(BlueM.Wave.TimeSeries)
+ Me.DataGridViewTextBoxColumn1.DataPropertyName = "DataSource"
+ Me.DataGridViewTextBoxColumn1.HeaderText = "DataSource"
+ Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1"
+ Me.DataGridViewTextBoxColumn1.ReadOnly = True
'
- 'ToolStrip1
+ 'TitleDataGridViewTextBoxColumn
'
- Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_showStatistics, Me.ToolStripButton_MoveUp, Me.ToolStripButton_MoveDown, Me.ToolStripButton_Delete})
- Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
- Me.ToolStrip1.Name = "ToolStrip1"
- Me.ToolStrip1.Size = New System.Drawing.Size(464, 25)
- Me.ToolStrip1.TabIndex = 2
- Me.ToolStrip1.Text = "ToolStrip1"
+ Me.TitleDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells
+ Me.TitleDataGridViewTextBoxColumn.DataPropertyName = "Title"
+ DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
+ Me.TitleDataGridViewTextBoxColumn.DefaultCellStyle = DataGridViewCellStyle1
+ Me.TitleDataGridViewTextBoxColumn.Frozen = True
+ Me.TitleDataGridViewTextBoxColumn.HeaderText = "Title"
+ Me.TitleDataGridViewTextBoxColumn.Name = "TitleDataGridViewTextBoxColumn"
+ Me.TitleDataGridViewTextBoxColumn.Width = 52
+ '
+ 'UnitDataGridViewTextBoxColumn
+ '
+ Me.UnitDataGridViewTextBoxColumn.DataPropertyName = "Unit"
+ DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
+ Me.UnitDataGridViewTextBoxColumn.DefaultCellStyle = DataGridViewCellStyle3
+ Me.UnitDataGridViewTextBoxColumn.HeaderText = "Unit"
+ Me.UnitDataGridViewTextBoxColumn.Name = "UnitDataGridViewTextBoxColumn"
+ Me.UnitDataGridViewTextBoxColumn.Width = 51
+ '
+ 'DataSource
+ '
+ Me.DataSource.DataPropertyName = "DataSource"
+ Me.DataSource.HeaderText = "DataSource"
+ Me.DataSource.Name = "DataSource"
+ Me.DataSource.ReadOnly = True
+ '
+ 'TimeSeriesBindingSource
+ '
+ Me.TimeSeriesBindingSource.DataSource = GetType(BlueM.Wave.TimeSeries)
'
'ToolStripButton_showStatistics
'
@@ -235,27 +231,6 @@ Partial Class PropertiesWindow
Me.ToolStripButton_showStatistics.Text = "Show statistics"
Me.ToolStripButton_showStatistics.ToolTipText = "Show statistics"
'
- 'ToolStripButton_MoveUp
- '
- Me.ToolStripButton_MoveUp.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton_MoveUp.Enabled = False
- Me.ToolStripButton_MoveUp.Image = Global.BlueM.Wave.My.Resources.Resources.arrow_up
- Me.ToolStripButton_MoveUp.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_MoveUp.Name = "ToolStripButton_MoveUp"
- Me.ToolStripButton_MoveUp.Size = New System.Drawing.Size(23, 22)
- Me.ToolStripButton_MoveUp.Text = "Move selected time series up"
- Me.ToolStripButton_MoveUp.ToolTipText = "Move selected time series up"
- '
- 'ToolStripButton_MoveDown
- '
- Me.ToolStripButton_MoveDown.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton_MoveDown.Enabled = False
- Me.ToolStripButton_MoveDown.Image = Global.BlueM.Wave.My.Resources.Resources.arrow_down
- Me.ToolStripButton_MoveDown.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_MoveDown.Name = "ToolStripButton_MoveDown"
- Me.ToolStripButton_MoveDown.Size = New System.Drawing.Size(23, 22)
- Me.ToolStripButton_MoveDown.Text = "Move selected time series down"
- '
'ToolStripButton_Delete
'
Me.ToolStripButton_Delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
@@ -267,12 +242,14 @@ Partial Class PropertiesWindow
Me.ToolStripButton_Delete.Text = "ToolStripButton_Delete"
Me.ToolStripButton_Delete.ToolTipText = "Delete selected time series"
'
- 'DataGridViewTextBoxColumn1
+ 'ToolStrip1
'
- Me.DataGridViewTextBoxColumn1.DataPropertyName = "DataSource"
- Me.DataGridViewTextBoxColumn1.HeaderText = "DataSource"
- Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1"
- Me.DataGridViewTextBoxColumn1.ReadOnly = True
+ Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_showStatistics, Me.ToolStripButton_Delete})
+ Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
+ Me.ToolStrip1.Name = "ToolStrip1"
+ Me.ToolStrip1.Size = New System.Drawing.Size(464, 25)
+ Me.ToolStrip1.TabIndex = 2
+ Me.ToolStrip1.Text = "ToolStrip1"
'
'PropertiesWindow
'
@@ -297,10 +274,6 @@ Partial Class PropertiesWindow
End Sub
Friend WithEvents DataGridView1 As System.Windows.Forms.DataGridView
Friend WithEvents TimeSeriesBindingSource As System.Windows.Forms.BindingSource
- Friend WithEvents ToolStrip1 As ToolStrip
- Friend WithEvents ToolStripButton_showStatistics As ToolStripButton
- Friend WithEvents ToolStripButton_Delete As ToolStripButton
- Friend WithEvents ToolStripButton_MoveUp As ToolStripButton
Friend WithEvents DataGridViewTextBoxColumn1 As DataGridViewTextBoxColumn
Friend WithEvents Id As DataGridViewTextBoxColumn
Friend WithEvents TitleDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
@@ -318,5 +291,7 @@ Partial Class PropertiesWindow
Friend WithEvents Maximum As DataGridViewTextBoxColumn
Friend WithEvents Sum As DataGridViewTextBoxColumn
Friend WithEvents Volume As DataGridViewTextBoxColumn
- Friend WithEvents ToolStripButton_MoveDown As ToolStripButton
+ Friend WithEvents ToolStripButton_showStatistics As ToolStripButton
+ Friend WithEvents ToolStripButton_Delete As ToolStripButton
+ Friend WithEvents ToolStrip1 As ToolStrip
End Class
diff --git a/source/Views/PropertiesWindow.vb b/source/Views/PropertiesWindow.vb
index 7ea169cc..23214e10 100644
--- a/source/Views/PropertiesWindow.vb
+++ b/source/Views/PropertiesWindow.vb
@@ -37,13 +37,6 @@ Friend Class PropertiesWindow
''' List of ids of the time series that were deleted
Friend Event SeriesDeleted(ids As List(Of Integer))
- '''
- ''' Is raised when the user reorders a row/series
- '''
- ''' Id of TimeSeries that was reordered
- ''' Direction
- Friend Event SeriesReordered(id As Integer, direction As Direction)
-
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
@@ -193,61 +186,6 @@ Friend Class PropertiesWindow
Call DeleteSeries()
End Sub
- '''
- ''' Handles the user clicking the move up button
- '''
- '''
- '''
- Private Sub ToolStripButton_MoveUp_Click(sender As Object, e As EventArgs) Handles ToolStripButton_MoveUp.Click
- Call ReorderSelectedSeries(Direction.Up)
- End Sub
-
- '''
- ''' Handles the user clicking the move down button
- '''
- '''
- '''
- Private Sub ToolStripButton_MoveDown_Click(sender As Object, e As EventArgs) Handles ToolStripButton_MoveDown.Click
- Call ReorderSelectedSeries(Direction.Down)
- End Sub
-
- '''
- ''' Reorder selected series
- '''
- ''' Direction in which to move selected series
- Private Sub ReorderSelectedSeries(direction As Direction)
-
- Dim indices As New List(Of Integer)
- Dim ids As New List(Of Integer)
- For Each row As DataGridViewRow In Me.DataGridView1.Rows
- If row.Selected Then
- If (direction = Direction.Up And row.Index = 0) Or
- (direction = Direction.Down And row.Index = Me.DataGridView1.RowCount - 1) Then
- 'if first row is selected, moving up does nothing
- 'if last row is selected, moving down does nothing
- Exit Sub
- End If
- indices.Add(row.Index)
- ids.Add(CType(row.DataBoundItem, TimeSeries).Id)
- End If
- Next
- 'raise event for each series
- For Each id As Integer In ids
- RaiseEvent SeriesReordered(id, direction)
- Next
- 'reselect previously sslected rows in their new positions
- Me.DataGridView1.ClearSelection()
- Dim offset As Integer
- If direction = Direction.Up Then
- offset = -1
- Else
- offset = 1
- End If
- For Each index As Integer In indices
- Me.DataGridView1.Rows(index + offset).Selected = True
- Next
- End Sub
-
Private Sub PropertiesDialog_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
'prevent the form from closing and hide it instead
e.Cancel = True
@@ -264,20 +202,8 @@ Friend Class PropertiesWindow
'Check if any rows are selected
If Me.DataGridView1.SelectedRows.Count = 0 Then
Me.ToolStripButton_Delete.Enabled = False
- Me.ToolStripButton_MoveUp.Enabled = False
- Me.ToolStripButton_MoveDown.Enabled = False
Else
Me.ToolStripButton_Delete.Enabled = True
- Me.ToolStripButton_MoveUp.Enabled = True
- Me.ToolStripButton_MoveDown.Enabled = True
- 'check if first row is selected
- If Me.DataGridView1.Rows(0).Selected Then
- Me.ToolStripButton_MoveUp.Enabled = False
- End If
- 'check if last row is selected
- If Me.DataGridView1.Rows(Me.DataGridView1.Rows.Count - 1).Selected Then
- Me.ToolStripButton_MoveDown.Enabled = False
- End If
End If
End Sub
diff --git a/source/Wave.vb b/source/Wave.vb
index 5c2d67cc..f1478028 100644
--- a/source/Wave.vb
+++ b/source/Wave.vb
@@ -45,11 +45,6 @@ Public Class Wave
'''
Friend Event SeriesCleared()
- '''
- ''' Is raised when all the time series are reordered
- '''
- Friend Event SeriesAllReordered()
-
'''
''' Is raised when a single time series is reordered
'''
@@ -459,15 +454,6 @@ Public Class Wave
End Sub
- '''
- ''' Reorders the internally stored time series according to the specified list of Ids
- '''
- ''' List of Ids in the new order
- Friend Sub Reorder_Series(ids As List(Of Integer))
- Me.TimeSeries.Reorder(ids)
- RaiseEvent SeriesAllReordered()
- End Sub
-
'''
''' Initiates timeseries export
'''
From 511e637c7e071ae411f9b224e2f405ddb48beeb2 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 13:56:38 +0100
Subject: [PATCH 19/57] move button and functionality for deleting a series
from property window to TOC
---
source/Controllers/PropertiesController.vb | 11 --
source/Controllers/WaveController.vb | 118 ++++++++++++++-------
source/Views/MainWindow.Designer.vb | 65 ++++++++----
source/Views/MainWindow.resx | 3 -
source/Views/PropertiesWindow.Designer.vb | 62 +++++------
source/Views/PropertiesWindow.vb | 65 ------------
6 files changed, 152 insertions(+), 172 deletions(-)
diff --git a/source/Controllers/PropertiesController.vb b/source/Controllers/PropertiesController.vb
index 55d64332..582fcb05 100644
--- a/source/Controllers/PropertiesController.vb
+++ b/source/Controllers/PropertiesController.vb
@@ -31,7 +31,6 @@ Friend Class PropertiesController
'view events
AddHandler Me.View.SeriesPropertyChanged, AddressOf SeriesPropertiesViewChanged
- AddHandler Me.View.SeriesDeleted, AddressOf SeriesDeletedHandler
'model events
AddHandler _model.SeriesAdded, AddressOf UpdateView
@@ -64,14 +63,4 @@ Friend Class PropertiesController
_model.SeriesPropertiesChangedHandler(id)
End Sub
- '''
- ''' Deletes series deleted in the view from the model
- '''
- ''' List of time series ids to delete
- Private Sub SeriesDeletedHandler(ids As List(Of Integer))
- For Each id As Integer In ids
- _model.RemoveTimeSeries(id)
- Next
- End Sub
-
End Class
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index cf88bdd4..fe1ee4e3 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -165,6 +165,7 @@ Friend Class WaveController
'TOC events
AddHandler Me.View.CheckedListBox_Series.SelectedIndexChanged, AddressOf TOC_SelectionChanged
+ AddHandler Me.View.ToolStripButton_Delete.Click, AddressOf ToolStripButton_Delete_Click
AddHandler Me.View.ToolStripButton_MoveUp.Click, AddressOf ToolStripButton_MoveUp_Click
AddHandler Me.View.ToolStripButton_MoveDown.Click, AddressOf ToolStripButton_MoveDown_Click
AddHandler Me.View.ToolStripMenuItem_ActivateAllSeries.Click, AddressOf ActivateAllSeries_Click
@@ -1208,25 +1209,12 @@ Friend Class WaveController
End Sub
'''
- ''' Activate all series button clicked
- '''
- '''
- '''
- Private Sub ActivateAllSeries_Click(sender As Object, e As EventArgs)
- For i As Integer = 0 To View.CheckedListBox_Series.Items.Count - 1
- View.CheckedListBox_Series.SetItemChecked(i, True)
- Next
- End Sub
-
- '''
- ''' Deactivate all series button clicked
+ ''' Handles the user clicking the delete button
'''
'''
'''
- Private Sub DeactivateAllSeries_Click(sender As Object, e As EventArgs)
- For i As Integer = 0 To View.CheckedListBox_Series.Items.Count - 1
- View.CheckedListBox_Series.SetItemChecked(i, False)
- Next
+ Private Sub ToolStripButton_Delete_Click(sender As Object, e As EventArgs)
+ Call DeleteSelectedSeries()
End Sub
'''
@@ -1247,12 +1235,36 @@ Friend Class WaveController
Call ReorderSelectedSeries(Direction.Down)
End Sub
+ '''
+ ''' Activate all series button clicked
+ '''
+ '''
+ '''
+ Private Sub ActivateAllSeries_Click(sender As Object, e As EventArgs)
+ For i As Integer = 0 To View.CheckedListBox_Series.Items.Count - 1
+ View.CheckedListBox_Series.SetItemChecked(i, True)
+ Next
+ End Sub
+
+ '''
+ ''' Deactivate all series button clicked
+ '''
+ '''
+ '''
+ Private Sub DeactivateAllSeries_Click(sender As Object, e As EventArgs)
+ For i As Integer = 0 To View.CheckedListBox_Series.Items.Count - 1
+ View.CheckedListBox_Series.SetItemChecked(i, False)
+ Next
+ End Sub
+
'''
''' Reorder selected series
'''
''' Direction in which to move selected series
Private Sub ReorderSelectedSeries(direction As Direction)
+ 'TODO: CheckedListBox does not allow multiselection, so only one series will ever be selected
+
Dim indices As New List(Of Integer)
Dim ids As New List(Of Integer)
For Each index As Integer In Me.View.CheckedListBox_Series.SelectedIndices
@@ -1282,6 +1294,32 @@ Friend Class WaveController
Next
End Sub
+ '''
+ ''' Deletes the series currently selected in the TOC
+ '''
+ Private Sub DeleteSelectedSeries()
+
+ 'TODO: CheckedListBox does not allow multiselection, so only one series will ever be selected
+
+ 'collect titles and ids of all selected items
+ Dim titles As New List(Of String)
+ Dim ids As New List(Of Integer)
+ For Each ts As TimeSeries In Me.View.CheckedListBox_Series.SelectedItems
+ titles.Add(ts.Title)
+ ids.Add(ts.Id)
+ Next
+ If ids.Count > 0 Then
+ 'ask for user confirmation
+ Dim result As MsgBoxResult = MsgBox($"Delete {ids.Count} series?{eol}{String.Join(eol, titles)}", MsgBoxStyle.OkCancel Or MsgBoxStyle.Exclamation)
+ If result = MsgBoxResult.Ok Then
+ For Each id As Integer In ids
+ Model.RemoveTimeSeries(id)
+ Next
+ End If
+ End If
+
+ End Sub
+
'''
''' Handles the TOC selection changed
''' Enables/disables buttons
@@ -1291,9 +1329,11 @@ Friend Class WaveController
Private Sub TOC_SelectionChanged(sender As Object, e As EventArgs)
'Check if any items are selected
If Me.View.CheckedListBox_Series.SelectedIndices.Count = 0 Then
+ Me.View.ToolStripButton_Delete.Enabled = False
Me.View.ToolStripButton_MoveUp.Enabled = False
Me.View.ToolStripButton_MoveDown.Enabled = False
Else
+ Me.View.ToolStripButton_Delete.Enabled = True
Me.View.ToolStripButton_MoveUp.Enabled = True
Me.View.ToolStripButton_MoveDown.Enabled = True
'check if first row is selected
@@ -2731,30 +2771,34 @@ Friend Class WaveController
End Sub
+ '''
+ ''' Handles the case where a TimeSeries was removed from the model
+ '''
+ '''
Private Sub SeriesRemoved(id As Integer)
- 'TODO: TChart
- ''Remove series from main chart
- 'For i As Integer = View.MainPlot.Series.Count - 1 To 0 Step -1
- ' If CType(View.MainPlot.Series.Item(i).Tag, String) = "_markers" Then
- ' 'TODO: marker series belonging to the removed series should be removed as well, skip for now
- ' Continue For
- ' End If
- ' If View.MainPlot.Series.Item(i).Tag = id Then
- ' View.MainPlot.Series.RemoveAt(i)
- ' View.MainPlot.Refresh()
- ' Exit For
- ' End If
- 'Next
+ 'Remove series from main chart
+ If Me.ChartSeries.ContainsKey(id) Then
+ Me.View.MainPlot.Plot.Remove(Me.ChartSeries(id))
+ View.MainPlot.Refresh()
+ End If
- ''Remove series from overview chart
- 'For i As Integer = View.OverviewPlot.Series.Count - 1 To 0 Step -1
- ' If (View.OverviewPlot.Series.Item(i).Tag = id) Then
- ' View.OverviewPlot.Series.RemoveAt(i)
- ' View.OverviewPlot.Refresh()
- ' Exit For
- ' End If
- 'Next
+ 'Remove series from TOC
+ Dim indexFound As Boolean = False
+ Dim index As Integer = 0
+ For Each ts As TimeSeries In Me.View.CheckedListBox_Series.Items
+ If ts.Id = id Then
+ indexFound = True
+ Exit For
+ End If
+ index += 1
+ Next
+ If indexFound Then
+ Me.View.CheckedListBox_Series.Items.RemoveAt(index)
+ End If
+
+ 'remove series from internal storage
+ Me.ChartSeries.Remove(id)
End Sub
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index b6130ad5..9a67f353 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -115,6 +115,9 @@ Partial Class MainWindow
Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripButton_MoveUp = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_MoveDown = New System.Windows.Forms.ToolStripButton()
+ Me.ToolStripButton_Delete = New System.Windows.Forms.ToolStripButton()
+ Me.ToolStripSeparator12 = New System.Windows.Forms.ToolStripSeparator()
+ Me.ToolStripSeparator13 = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
@@ -657,7 +660,7 @@ Partial Class MainWindow
'SplitContainer1.Panel2
'
Me.SplitContainer1.Panel2.Controls.Add(Me.TableLayoutPanel1)
- Me.SplitContainer1.Size = New System.Drawing.Size(820, 605)
+ Me.SplitContainer1.Size = New System.Drawing.Size(805, 605)
Me.SplitContainer1.SplitterDistance = 139
Me.SplitContainer1.TabIndex = 1
'
@@ -666,7 +669,7 @@ Partial Class MainWindow
Me.OverviewPlot.Dock = System.Windows.Forms.DockStyle.Fill
Me.OverviewPlot.Location = New System.Drawing.Point(0, 0)
Me.OverviewPlot.Name = "OverviewPlot"
- Me.OverviewPlot.Size = New System.Drawing.Size(816, 135)
+ Me.OverviewPlot.Size = New System.Drawing.Size(801, 135)
Me.OverviewPlot.TabIndex = 0
'
'TableLayoutPanel1
@@ -686,7 +689,7 @@ Partial Class MainWindow
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 36.0!))
Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!))
- Me.TableLayoutPanel1.Size = New System.Drawing.Size(816, 458)
+ Me.TableLayoutPanel1.Size = New System.Drawing.Size(801, 458)
Me.TableLayoutPanel1.TabIndex = 3
'
'PanelNavigation
@@ -702,14 +705,14 @@ Partial Class MainWindow
Me.PanelNavigation.Location = New System.Drawing.Point(1, 1)
Me.PanelNavigation.Margin = New System.Windows.Forms.Padding(0)
Me.PanelNavigation.Name = "PanelNavigation"
- Me.PanelNavigation.Size = New System.Drawing.Size(814, 38)
+ Me.PanelNavigation.Size = New System.Drawing.Size(799, 38)
Me.PanelNavigation.TabIndex = 0
'
'Button_NavEnd
'
Me.Button_NavEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button_NavEnd.Image = Global.BlueM.Wave.My.Resources.Resources.control_end
- Me.Button_NavEnd.Location = New System.Drawing.Point(782, 8)
+ Me.Button_NavEnd.Location = New System.Drawing.Point(767, 8)
Me.Button_NavEnd.Name = "Button_NavEnd"
Me.Button_NavEnd.Size = New System.Drawing.Size(23, 23)
Me.Button_NavEnd.TabIndex = 6
@@ -730,7 +733,7 @@ Partial Class MainWindow
'
Me.Label_Navigate.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.Label_Navigate.AutoSize = True
- Me.Label_Navigate.Location = New System.Drawing.Point(314, 13)
+ Me.Label_Navigate.Location = New System.Drawing.Point(306, 13)
Me.Label_Navigate.Name = "Label_Navigate"
Me.Label_Navigate.Size = New System.Drawing.Size(53, 13)
Me.Label_Navigate.TabIndex = 2
@@ -740,7 +743,7 @@ Partial Class MainWindow
'
Me.Button_NavForward.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Button_NavForward.Image = CType(resources.GetObject("Button_NavForward.Image"), System.Drawing.Image)
- Me.Button_NavForward.Location = New System.Drawing.Point(707, 8)
+ Me.Button_NavForward.Location = New System.Drawing.Point(692, 8)
Me.Button_NavForward.Name = "Button_NavForward"
Me.Button_NavForward.Size = New System.Drawing.Size(69, 23)
Me.Button_NavForward.TabIndex = 5
@@ -760,7 +763,7 @@ Partial Class MainWindow
'NumericUpDown_NavMultiplier
'
Me.NumericUpDown_NavMultiplier.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.NumericUpDown_NavMultiplier.Location = New System.Drawing.Point(373, 9)
+ Me.NumericUpDown_NavMultiplier.Location = New System.Drawing.Point(365, 9)
Me.NumericUpDown_NavMultiplier.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.NumericUpDown_NavMultiplier.Name = "NumericUpDown_NavMultiplier"
Me.NumericUpDown_NavMultiplier.Size = New System.Drawing.Size(40, 20)
@@ -773,7 +776,7 @@ Partial Class MainWindow
Me.ComboBox_NavIncrement.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox_NavIncrement.FormattingEnabled = True
Me.ComboBox_NavIncrement.Items.AddRange(New Object() {"Centuries", "Decades", "Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"})
- Me.ComboBox_NavIncrement.Location = New System.Drawing.Point(419, 9)
+ Me.ComboBox_NavIncrement.Location = New System.Drawing.Point(411, 9)
Me.ComboBox_NavIncrement.Name = "ComboBox_NavIncrement"
Me.ComboBox_NavIncrement.Size = New System.Drawing.Size(81, 21)
Me.ComboBox_NavIncrement.TabIndex = 4
@@ -783,7 +786,7 @@ Partial Class MainWindow
Me.MainPlot.Dock = System.Windows.Forms.DockStyle.Fill
Me.MainPlot.Location = New System.Drawing.Point(4, 43)
Me.MainPlot.Name = "MainPlot"
- Me.MainPlot.Size = New System.Drawing.Size(808, 353)
+ Me.MainPlot.Size = New System.Drawing.Size(793, 353)
Me.MainPlot.TabIndex = 3
'
'Panel_DisplayRange
@@ -797,14 +800,14 @@ Partial Class MainWindow
Me.Panel_DisplayRange.Location = New System.Drawing.Point(1, 400)
Me.Panel_DisplayRange.Margin = New System.Windows.Forms.Padding(0)
Me.Panel_DisplayRange.Name = "Panel_DisplayRange"
- Me.Panel_DisplayRange.Size = New System.Drawing.Size(814, 36)
+ Me.Panel_DisplayRange.Size = New System.Drawing.Size(799, 36)
Me.Panel_DisplayRange.TabIndex = 2
'
'Label_Display
'
Me.Label_Display.Anchor = System.Windows.Forms.AnchorStyles.Top
Me.Label_Display.AutoSize = True
- Me.Label_Display.Location = New System.Drawing.Point(319, 12)
+ Me.Label_Display.Location = New System.Drawing.Point(311, 12)
Me.Label_Display.Name = "Label_Display"
Me.Label_Display.Size = New System.Drawing.Size(44, 13)
Me.Label_Display.TabIndex = 1
@@ -813,7 +816,7 @@ Partial Class MainWindow
'NumericUpDown_DisplayRangeMultiplier
'
Me.NumericUpDown_DisplayRangeMultiplier.Anchor = System.Windows.Forms.AnchorStyles.Top
- Me.NumericUpDown_DisplayRangeMultiplier.Location = New System.Drawing.Point(369, 8)
+ Me.NumericUpDown_DisplayRangeMultiplier.Location = New System.Drawing.Point(361, 8)
Me.NumericUpDown_DisplayRangeMultiplier.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
Me.NumericUpDown_DisplayRangeMultiplier.Name = "NumericUpDown_DisplayRangeMultiplier"
Me.NumericUpDown_DisplayRangeMultiplier.Size = New System.Drawing.Size(40, 20)
@@ -826,7 +829,7 @@ Partial Class MainWindow
Me.ComboBox_DisplayRangeUnit.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.ComboBox_DisplayRangeUnit.FormattingEnabled = True
Me.ComboBox_DisplayRangeUnit.Items.AddRange(New Object() {"", "Centuries", "Decades", "Years", "Months", "Weeks", "Days", "Hours", "Minutes", "Seconds"})
- Me.ComboBox_DisplayRangeUnit.Location = New System.Drawing.Point(415, 8)
+ Me.ComboBox_DisplayRangeUnit.Location = New System.Drawing.Point(407, 8)
Me.ComboBox_DisplayRangeUnit.Name = "ComboBox_DisplayRangeUnit"
Me.ComboBox_DisplayRangeUnit.Size = New System.Drawing.Size(81, 21)
Me.ComboBox_DisplayRangeUnit.TabIndex = 3
@@ -835,7 +838,7 @@ Partial Class MainWindow
'
Me.MaskedTextBox_NavEnd.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MaskedTextBox_NavEnd.Culture = New System.Globalization.CultureInfo("")
- Me.MaskedTextBox_NavEnd.Location = New System.Drawing.Point(705, 8)
+ Me.MaskedTextBox_NavEnd.Location = New System.Drawing.Point(690, 8)
Me.MaskedTextBox_NavEnd.Name = "MaskedTextBox_NavEnd"
Me.MaskedTextBox_NavEnd.Size = New System.Drawing.Size(100, 20)
Me.MaskedTextBox_NavEnd.TabIndex = 4
@@ -877,7 +880,7 @@ Partial Class MainWindow
'
Me.SplitContainer2.Panel2.Controls.Add(Me.SplitContainer1)
Me.SplitContainer2.Size = New System.Drawing.Size(944, 605)
- Me.SplitContainer2.SplitterDistance = 120
+ Me.SplitContainer2.SplitterDistance = 135
Me.SplitContainer2.TabIndex = 7
'
'CheckedListBox_Series
@@ -891,16 +894,16 @@ Partial Class MainWindow
Me.CheckedListBox_Series.Location = New System.Drawing.Point(5, 31)
Me.CheckedListBox_Series.Margin = New System.Windows.Forms.Padding(5)
Me.CheckedListBox_Series.Name = "CheckedListBox_Series"
- Me.CheckedListBox_Series.Size = New System.Drawing.Size(110, 559)
+ Me.CheckedListBox_Series.Size = New System.Drawing.Size(125, 559)
Me.CheckedListBox_Series.TabIndex = 0
Me.CheckedListBox_Series.ThreeDCheckBoxes = True
'
'ToolStrip2
'
- Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_MoveUp, Me.ToolStripButton_MoveDown, Me.ToolStripDropDownButton1})
+ Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_Delete, Me.ToolStripSeparator12, Me.ToolStripButton_MoveUp, Me.ToolStripButton_MoveDown, Me.ToolStripSeparator13, Me.ToolStripDropDownButton1})
Me.ToolStrip2.Location = New System.Drawing.Point(0, 0)
Me.ToolStrip2.Name = "ToolStrip2"
- Me.ToolStrip2.Size = New System.Drawing.Size(120, 25)
+ Me.ToolStrip2.Size = New System.Drawing.Size(135, 25)
Me.ToolStrip2.TabIndex = 1
Me.ToolStrip2.Text = "ToolStrip2"
'
@@ -948,6 +951,27 @@ Partial Class MainWindow
Me.ToolStripButton_MoveDown.Size = New System.Drawing.Size(23, 22)
Me.ToolStripButton_MoveDown.Text = "Move selected time series down"
'
+ 'ToolStripButton_Delete
+ '
+ Me.ToolStripButton_Delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.ToolStripButton_Delete.Enabled = False
+ Me.ToolStripButton_Delete.Image = Global.BlueM.Wave.My.Resources.Resources.chart_line_delete
+ Me.ToolStripButton_Delete.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripButton_Delete.Name = "ToolStripButton_Delete"
+ Me.ToolStripButton_Delete.Size = New System.Drawing.Size(23, 22)
+ Me.ToolStripButton_Delete.Text = "ToolStripButton_Delete"
+ Me.ToolStripButton_Delete.ToolTipText = "Delete selected time series"
+ '
+ 'ToolStripSeparator12
+ '
+ Me.ToolStripSeparator12.Name = "ToolStripSeparator12"
+ Me.ToolStripSeparator12.Size = New System.Drawing.Size(6, 25)
+ '
+ 'ToolStripSeparator13
+ '
+ Me.ToolStripSeparator13.Name = "ToolStripSeparator13"
+ Me.ToolStripSeparator13.Size = New System.Drawing.Size(6, 25)
+ '
'MainWindow
'
Me.AllowDrop = True
@@ -1077,4 +1101,7 @@ Partial Class MainWindow
Friend WithEvents ToolStripMenuItem_DeactivateAllSeries As ToolStripMenuItem
Friend WithEvents ToolStripButton_MoveUp As ToolStripButton
Friend WithEvents ToolStripButton_MoveDown As ToolStripButton
+ Friend WithEvents ToolStripButton_Delete As ToolStripButton
+ Friend WithEvents ToolStripSeparator12 As ToolStripSeparator
+ Friend WithEvents ToolStripSeparator13 As ToolStripSeparator
End Class
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index fd01e674..86a83785 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -328,9 +328,6 @@
222, 3
-
- 458, 4
-
556, 4
diff --git a/source/Views/PropertiesWindow.Designer.vb b/source/Views/PropertiesWindow.Designer.vb
index 0c55ded5..9418b9da 100644
--- a/source/Views/PropertiesWindow.Designer.vb
+++ b/source/Views/PropertiesWindow.Designer.vb
@@ -42,21 +42,21 @@ Partial Class PropertiesWindow
Me.Sum = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.Volume = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.ToolStripButton_showStatistics = New System.Windows.Forms.ToolStripButton()
+ Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
Me.TitleDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.UnitDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.DataSource = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.TimeSeriesBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.ToolStripButton_showStatistics = New System.Windows.Forms.ToolStripButton()
- Me.ToolStripButton_Delete = New System.Windows.Forms.ToolStripButton()
- Me.ToolStrip1 = New System.Windows.Forms.ToolStrip()
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.TimeSeriesBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ToolStrip1.SuspendLayout()
+ CType(Me.TimeSeriesBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'DataGridView1
'
Me.DataGridView1.AllowUserToAddRows = False
+ Me.DataGridView1.AllowUserToDeleteRows = False
Me.DataGridView1.AllowUserToResizeRows = False
Me.DataGridView1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
@@ -189,6 +189,26 @@ Partial Class PropertiesWindow
Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1"
Me.DataGridViewTextBoxColumn1.ReadOnly = True
'
+ 'ToolStripButton_showStatistics
+ '
+ Me.ToolStripButton_showStatistics.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
+ Me.ToolStripButton_showStatistics.CheckOnClick = True
+ Me.ToolStripButton_showStatistics.Image = Global.BlueM.Wave.My.Resources.Resources.table_gear
+ Me.ToolStripButton_showStatistics.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripButton_showStatistics.Name = "ToolStripButton_showStatistics"
+ Me.ToolStripButton_showStatistics.Size = New System.Drawing.Size(104, 22)
+ Me.ToolStripButton_showStatistics.Text = "Show statistics"
+ Me.ToolStripButton_showStatistics.ToolTipText = "Show statistics"
+ '
+ 'ToolStrip1
+ '
+ Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_showStatistics})
+ Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
+ Me.ToolStrip1.Name = "ToolStrip1"
+ Me.ToolStrip1.Size = New System.Drawing.Size(464, 25)
+ Me.ToolStrip1.TabIndex = 2
+ Me.ToolStrip1.Text = "ToolStrip1"
+ '
'TitleDataGridViewTextBoxColumn
'
Me.TitleDataGridViewTextBoxColumn.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells
@@ -220,37 +240,6 @@ Partial Class PropertiesWindow
'
Me.TimeSeriesBindingSource.DataSource = GetType(BlueM.Wave.TimeSeries)
'
- 'ToolStripButton_showStatistics
- '
- Me.ToolStripButton_showStatistics.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right
- Me.ToolStripButton_showStatistics.CheckOnClick = True
- Me.ToolStripButton_showStatistics.Image = Global.BlueM.Wave.My.Resources.Resources.table_gear
- Me.ToolStripButton_showStatistics.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_showStatistics.Name = "ToolStripButton_showStatistics"
- Me.ToolStripButton_showStatistics.Size = New System.Drawing.Size(104, 22)
- Me.ToolStripButton_showStatistics.Text = "Show statistics"
- Me.ToolStripButton_showStatistics.ToolTipText = "Show statistics"
- '
- 'ToolStripButton_Delete
- '
- Me.ToolStripButton_Delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton_Delete.Enabled = False
- Me.ToolStripButton_Delete.Image = Global.BlueM.Wave.My.Resources.Resources.chart_line_delete
- Me.ToolStripButton_Delete.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_Delete.Name = "ToolStripButton_Delete"
- Me.ToolStripButton_Delete.Size = New System.Drawing.Size(23, 22)
- Me.ToolStripButton_Delete.Text = "ToolStripButton_Delete"
- Me.ToolStripButton_Delete.ToolTipText = "Delete selected time series"
- '
- 'ToolStrip1
- '
- Me.ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_showStatistics, Me.ToolStripButton_Delete})
- Me.ToolStrip1.Location = New System.Drawing.Point(0, 0)
- Me.ToolStrip1.Name = "ToolStrip1"
- Me.ToolStrip1.Size = New System.Drawing.Size(464, 25)
- Me.ToolStrip1.TabIndex = 2
- Me.ToolStrip1.Text = "ToolStrip1"
- '
'PropertiesWindow
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -265,9 +254,9 @@ Partial Class PropertiesWindow
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
Me.Text = "Time Series Properties"
CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.TimeSeriesBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
Me.ToolStrip1.ResumeLayout(False)
Me.ToolStrip1.PerformLayout()
+ CType(Me.TimeSeriesBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -292,6 +281,5 @@ Partial Class PropertiesWindow
Friend WithEvents Sum As DataGridViewTextBoxColumn
Friend WithEvents Volume As DataGridViewTextBoxColumn
Friend WithEvents ToolStripButton_showStatistics As ToolStripButton
- Friend WithEvents ToolStripButton_Delete As ToolStripButton
Friend WithEvents ToolStrip1 As ToolStrip
End Class
diff --git a/source/Views/PropertiesWindow.vb b/source/Views/PropertiesWindow.vb
index 23214e10..44916d99 100644
--- a/source/Views/PropertiesWindow.vb
+++ b/source/Views/PropertiesWindow.vb
@@ -31,12 +31,6 @@ Friend Class PropertiesWindow
''' Id of the time series whose properties were changed
Friend Event SeriesPropertyChanged(id As Integer)
- '''
- ''' Is raised when the user deletes rows/series
- '''
- ''' List of ids of the time series that were deleted
- Friend Event SeriesDeleted(ids As List(Of Integer))
-
Public Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
@@ -165,71 +159,12 @@ Friend Class PropertiesWindow
End Sub
- '''
- ''' Handles the user deleting rows/series using the keyboard
- '''
- '''
- '''
- Private Sub DataGridView1_UserDeletingRow(sender As Object, e As DataGridViewRowCancelEventArgs) Handles DataGridView1.UserDeletingRow
- Call DeleteSeries()
- 'cancel row deletion because datagridview will be refreshed from outside
- 'otherwise, two rows end up being deleted
- e.Cancel = True
- End Sub
-
- '''
- ''' Handles the user clicking the delete button
- '''
- '''
- '''
- Private Sub ToolStripButton_Delete_Click(sender As Object, e As EventArgs) Handles ToolStripButton_Delete.Click
- Call DeleteSeries()
- End Sub
-
Private Sub PropertiesDialog_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
'prevent the form from closing and hide it instead
e.Cancel = True
Call Me.Hide()
End Sub
- '''
- ''' Handles the datagridview selection changed
- ''' Enables/disables buttons
- '''
- '''
- '''
- Private Sub DataGridView1_SelectionChanged(sender As Object, e As EventArgs) Handles DataGridView1.SelectionChanged
- 'Check if any rows are selected
- If Me.DataGridView1.SelectedRows.Count = 0 Then
- Me.ToolStripButton_Delete.Enabled = False
- Else
- Me.ToolStripButton_Delete.Enabled = True
- End If
- End Sub
-
- '''
- ''' Delete all selected rows / series
- '''
- Private Sub DeleteSeries()
- 'collect titles and ids of all selected rows
- Dim titles As New List(Of String)
- Dim ids As New List(Of Integer)
- For Each row As DataGridViewRow In Me.DataGridView1.SelectedRows
- Dim ts As TimeSeries = CType(row.DataBoundItem, TimeSeries)
- If Not IsNothing(ts) Then
- titles.Add(ts.Title)
- ids.Add(ts.Id)
- End If
- Next
- If ids.Count > 0 Then
- 'ask for user confirmation
- Dim result As MsgBoxResult = MsgBox($"Delete {ids.Count} series?{eol}{String.Join(eol, titles)}", MsgBoxStyle.OkCancel Or MsgBoxStyle.Exclamation)
- If result = MsgBoxResult.Ok Then
- RaiseEvent SeriesDeleted(ids)
- End If
- End If
- End Sub
-
Private Overloads Sub Close() Implements IView.Close
Throw New NotImplementedException()
End Sub
From 3681199bbbdfd73712704f5f5b3da34f87fdc9f5 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 14:34:41 +0100
Subject: [PATCH 20/57] handle series properties changed in the main chart and
the TOC
---
source/Controllers/WaveController.vb | 61 +++++++++++++++-------------
1 file changed, 32 insertions(+), 29 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index fe1ee4e3..02ee9af0 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2735,39 +2735,42 @@ Friend Class WaveController
Call Application.DoEvents()
End Sub
+ '''
+ ''' Handles the case where a TimeSeries' properties were changed in the model
+ '''
+ ''' TimeSeries ID
Private Sub SeriesPropertiesChanged(id As Integer)
- 'TODO: TChart
- ''find series in chart
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If series.Tag = id Then
- ' 'set line display according to interpretation
- ' If TypeOf series Is Steema.TeeChart.Styles.Line Then
- ' Dim seriesline As Steema.TeeChart.Styles.Line = series
- ' Select Case _model.TimeSeries(id).Interpretation
- ' Case TimeSeries.InterpretationEnum.Instantaneous,
- ' TimeSeries.InterpretationEnum.Undefined
- ' seriesline.Stairs = False
- ' seriesline.InvertedStairs = False
- ' Case TimeSeries.InterpretationEnum.BlockRight
- ' seriesline.Stairs = True
- ' seriesline.InvertedStairs = False
- ' Case TimeSeries.InterpretationEnum.BlockLeft,
- ' TimeSeries.InterpretationEnum.CumulativePerTimestep
- ' seriesline.Stairs = True
- ' seriesline.InvertedStairs = True
- ' End Select
- ' End If
- ' 'update title in chart
- ' series.Title = _model.TimeSeries(id).Title
+ Dim ts As TimeSeries = Model.TimeSeries(id)
+
+ 'update series in main chart
+ If Me.ChartSeries.ContainsKey(id) Then
+ Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.ChartSeries(id), ScottPlot.Plottable.ScatterPlot)
+ If Not IsNothing(series) Then
+ 'label
+ series.Label = ts.Title
+ 'y axis
+ assignSeriesToAxis(series, ts.Unit)
+ 'interpretation
+ Select Case ts.Interpretation
+ Case TimeSeries.InterpretationEnum.BlockRight
+ series.StepDisplay = True
+ series.StepDisplayRight = True
+ Case TimeSeries.InterpretationEnum.BlockLeft,
+ TimeSeries.InterpretationEnum.CumulativePerTimestep
+ series.StepDisplay = True
+ series.StepDisplayRight = False
+ Case Else
+ series.StepDisplay = False
+ End Select
+ Me.View.MainPlot.Refresh()
+ End If
+ End If
- ' 'assign to axis according to unit
- ' assignSeriesToAxis(series, _model.TimeSeries(id).Unit)
+ 'TODO: apply the same changes in the overview chart?
- ' 'TODO: apply the same changes in the overview chart?
- ' Exit For
- ' End If
- 'Next
+ 'update the TOC
+ Me.View.CheckedListBox_Series.Refresh()
End Sub
From a0fccdc0455d836cbf2f88688c400d41c0b5e7a7 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 14:38:02 +0100
Subject: [PATCH 21/57] fix axis limits not being updated when assigning an
additional series to it
---
source/Controllers/WaveController.vb | 1 +
1 file changed, 1 insertion(+)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 02ee9af0..fc7b2bcd 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2562,6 +2562,7 @@ Friend Class WaveController
Dim newMin As Double = Math.Min(axisMin, min)
Dim newMax As Double = Math.Max(axisMax, max)
+ axis.Dims.ResetLimits()
axis.Dims.SetAxis(newMin, newMax)
axis.SetBoundary(newMin, newMax)
axis.SetInnerBoundary(newMin, newMax)
From 0f1599d33fa7ef5cb1bddc72792afed0e72e3e51 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 15:43:55 +0100
Subject: [PATCH 22/57] reset/remove unused axes when series units change
---
source/Controllers/WaveController.vb | 28 ++++++++++++++++++++++++++--
1 file changed, 26 insertions(+), 2 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index fc7b2bcd..eba3cc46 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2602,10 +2602,34 @@ Friend Class WaveController
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
- 'update axis dialog
- Call Me.UpdateAxisDialog()
End If
+ 'check for unused axes and remove them
+ Dim units As New HashSet(Of String)
+ Dim axesToRemove As New List(Of ScottPlot.Renderable.Axis)
+ For Each ts As TimeSeries In Model.TimeSeries.Values
+ units.Add(ts.Unit)
+ Next
+ For Each axis As ScottPlot.Renderable.Axis In Me.View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ If axis.AxisLabel.Label <> "" And Not units.Contains(axis.AxisLabel.Label) Then
+ axesToRemove.Add(axis)
+ End If
+ Next
+ If axesToRemove.Count > 0 Then
+ For Each axis As ScottPlot.Renderable.Axis In axesToRemove
+ If axis.AxisIndex <= 1 Then
+ 'left and right Y axis should never be removed, just reset
+ axis.Label("")
+ axis.Dims.ResetLimits()
+ Else
+ Me.View.MainPlot.Plot.RemoveAxis(axis)
+ End If
+ Next
+ End If
+
+ 'update axis dialog
+ Call Me.UpdateAxisDialog()
+
End Sub
'''
From b285222b16a97d50438e904cfee5d19edbd5f864 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 16:31:42 +0100
Subject: [PATCH 23/57] implement auto-adjustment of y axes
---
source/Controllers/WaveController.vb | 99 ++++++++++------------------
1 file changed, 36 insertions(+), 63 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index eba3cc46..38d1b447 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -1104,9 +1104,7 @@ Friend Class WaveController
Call Me.ViewportChanged()
Else
'Reset the Y axes to automatic
- Dim axes As List(Of ScottPlot.Renderable.Axis)
- axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
- For Each axis As ScottPlot.Renderable.Axis In axes
+ For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
axis.Dims.ResetLimits()
Next
View.MainPlot.Refresh()
@@ -2129,67 +2127,42 @@ Friend Class WaveController
'Auto-adjust Y-axes to current viewport
If View.AutoAdjustYAxes Then
- 'TODO: TChart
- 'Dim startdate, enddate As DateTime
- 'Dim title As String
- 'Dim seriesMin, seriesMax, Ymin, Ymax As Double
- 'Dim axisType As Steema.TeeChart.Styles.VerticalAxis
- 'Dim axis As Steema.TeeChart.Axis
-
- ''get start and end date of current viewport
- 'startdate = View.ChartMinX
- 'enddate = View.ChartMaxX
-
- ''define axes to process
- 'Dim axes As New List(Of (axisType As Steema.TeeChart.Styles.VerticalAxis, axis As Steema.TeeChart.Axis))
- 'axes.Add((Steema.TeeChart.Styles.VerticalAxis.Left, View.MainPlot.Axes.Left))
- 'axes.Add((Steema.TeeChart.Styles.VerticalAxis.Right, View.MainPlot.Axes.Right))
- 'For Each axis In View.MainPlot.Axes.Custom
- ' axes.Add((Steema.TeeChart.Styles.VerticalAxis.Custom, axis))
- 'Next
-
- ''loop over Y-axes
- 'For Each t As (axisType As Steema.TeeChart.Styles.VerticalAxis, axis As Steema.TeeChart.Axis) In axes
- ' axisType = t.axisType
- ' axis = t.axis
-
- ' 'loop over series
- ' Ymin = Double.MaxValue
- ' Ymax = Double.MinValue
- ' For Each ts As TimeSeries In _model.TimeSeries.Values
- ' title = ts.Title
-
- ' 'only process active series on the current axis
- ' If View.MainPlot.Series.WithTitle(title).Active And View.MainPlot.Series.WithTitle(title).VertAxis = axisType Then
-
- ' If axisType = Steema.TeeChart.Styles.VerticalAxis.Custom And ts.Unit <> axis.Tag Then
- ' 'series is on a different custom axis, skip it
- ' Continue For
- ' End If
-
- ' 'get series min and max for current viewport
- ' seriesMin = ts.Minimum(startdate, enddate)
- ' If seriesMin < Ymin Then
- ' Ymin = seriesMin
- ' End If
- ' seriesMax = ts.Maximum(startdate, enddate)
- ' If seriesMax > Ymax Then
- ' Ymax = seriesMax
- ' End If
- ' End If
- ' Next
-
- ' 'set new Y axis bounds
- ' If Ymin < Double.MaxValue Then
- ' axis.AutomaticMinimum = False
- ' axis.Minimum = Ymin
- ' End If
- ' If Ymax > Double.MinValue Then
- ' axis.AutomaticMaximum = False
- ' axis.Maximum = Ymax
- ' End If
- 'Next
+ 'get start and end date of current viewport
+ Dim startdate As DateTime = View.ChartMinX
+ Dim enddate As DateTime = View.ChartMaxX
+
+ 'get min and max values of visible series grouped by unit
+ Dim unitRanges As New Dictionary(Of String, (min As Double, max As Double))
+ For Each index As Integer In Me.View.CheckedListBox_Series.CheckedIndices
+ Dim ts As TimeSeries = CType(Me.View.CheckedListBox_Series.Items(index), TimeSeries)
+ Dim seriesMin As Double = ts.Minimum(startdate, enddate)
+ Dim seriesMax As Double = ts.Maximum(startdate, enddate)
+ If Not unitRanges.ContainsKey(ts.Unit) Then
+ unitRanges.Add(ts.Unit, (seriesMin, seriesMax))
+ Else
+ If seriesMin < unitRanges(ts.Unit).min Then
+ unitRanges(ts.Unit) = (seriesMin, unitRanges(ts.Unit).max)
+ End If
+ If seriesMax > unitRanges(ts.Unit).max Then
+ unitRanges(ts.Unit) = (unitRanges(ts.Unit).min, seriesMax)
+ End If
+ End If
+ Next
+
+ 'loop over Y-axes
+ For Each axis As ScottPlot.Renderable.Axis In Me.View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ Dim axisUnit As String = axis.AxisLabel.Label
+ If unitRanges.ContainsKey(axisUnit) Then
+ 'set new limits
+ Dim range As (min As Double, max As Double) = unitRanges(axisUnit)
+ Dim padding As Double = (range.max - range.min) * 0.05
+ axis.Dims.ResetLimits()
+ axis.Dims.SetAxis(range.min - padding, range.max + padding)
+ End If
+ Next
+ Me.View.MainPlot.Refresh()
End If
+
End Sub
'''
From 491fcd2b0d0c8773a6cf5d46e597fa8220696cdc Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 16:35:20 +0100
Subject: [PATCH 24/57] remove unused code related to TeeChart events
---
source/Controllers/WaveController.vb | 59 +---------------------------
1 file changed, 1 insertion(+), 58 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 38d1b447..9371cfb8 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -20,8 +20,6 @@ Imports System.Text.RegularExpressions
Friend Class WaveController
Inherits Controller
- Implements Steema.TeeChart.ITeeEventListener
-
Private Overloads ReadOnly Property View As MainWindow
Get
Return _view
@@ -245,62 +243,6 @@ Friend Class WaveController
End Try
End Sub
- '''
- ''' Handles TeeChart Events
- '''
- '''
- Private Sub TeeEvent(e As Steema.TeeChart.TeeEvent) Implements Steema.TeeChart.ITeeEventListener.TeeEvent
- 'TODO: TChart
- 'Try
- ' If TypeOf e Is Steema.TeeChart.Styles.SeriesEvent Then
- ' Dim seriesEvent As Steema.TeeChart.Styles.SeriesEvent = CType(e, Steema.TeeChart.Styles.SeriesEvent)
- ' Select Case seriesEvent.Event
- ' Case Steema.TeeChart.Styles.SeriesEventStyle.ChangeActive
- ' 'series visibility has been changed. check whether custom axes should be made invisible
-
- ' 'collect units of all active series
- ' Dim activeUnits As New HashSet(Of String)
- ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If series.Active Then
- ' activeUnits.Add(series.GetVertAxis.Tag)
- ' End If
- ' Next
- ' 'set visibility of custom axes accordingly
- ' For Each axis As Steema.TeeChart.Axis In View.MainPlot.Axes.Custom
- ' If activeUnits.Contains(axis.Tag) Then
- ' axis.Visible = True
- ' Else
- ' axis.Visible = False
- ' End If
- ' Next
-
- ' Case Steema.TeeChart.Styles.SeriesEventStyle.ChangeTitle
- ' 'series title changed, update title in the model
- ' Dim id As Integer = seriesEvent.Series.Tag
- ' If _model.TimeSeries.ContainsId(id) Then
- ' If _model.TimeSeries(id).Title <> seriesEvent.Series.Title Then
- ' _model.TimeSeries(id).Title = seriesEvent.Series.Title
- ' _model.SeriesPropertiesChangedHandler(id)
- ' End If
- ' End If
-
- ' Case Steema.TeeChart.Styles.SeriesEventStyle.Remove
- ' 'series removed, delete series from model
- ' Dim id As Integer = seriesEvent.Series.Tag
- ' If _model.TimeSeries.ContainsId(id) Then
- ' 'temporarily disable event handling to prevent multiple deletions
- ' RemoveHandler _model.SeriesRemoved, AddressOf SeriesRemoved
- ' _model.RemoveTimeSeries(id)
- ' AddHandler _model.SeriesRemoved, AddressOf SeriesRemoved
- ' End If
-
- ' End Select
- ' End If
- 'Catch ex As Exception
- ' Log.AddLogEntry(Log.levels.debug, ex.Message)
- 'End Try
- End Sub
-
#Region "user events"
'Neu
@@ -2617,6 +2559,7 @@ Friend Class WaveController
If Me.ChartSeries.ContainsKey(id) Then
Me.ChartSeries(id).IsVisible = (e.NewValue = CheckState.Checked)
End If
+ 'TODO: hide unused y axes if no active series uses them
Me.View.MainPlot.Refresh()
End Sub
From 13beca3e064cf03b9484b6fbe922e91f09c6f05e Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 17:22:14 +0100
Subject: [PATCH 25/57] implement displaying NaN values in main chart
---
source/Controllers/WaveController.vb | 201 +++++++++++++--------------
source/Views/MainWindow.vb | 8 ++
2 files changed, 101 insertions(+), 108 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 9371cfb8..e1a6582a 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -595,117 +595,102 @@ Friend Class WaveController
'''
Private Sub ShowNaNValues_Click(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Dim processSeries As Boolean
- 'Dim nanStart, nanEnd, bandStart, bandEnd As DateTime
- 'Dim band As Steema.TeeChart.Tools.ColorBand
- 'Dim color As Drawing.Color
- 'Dim isNaNPeriod, nanFound, nanFoundInSeries As Boolean
-
- ''set default color
- 'color = Color.Red
-
- 'If View.ToolStripButton_ShowNaNValues.Checked Then
- ' 'Switch visualization of NaN values on
- ' 'Show color bands for NaN values in the currently active series
- ' nanFound = False
- ' For Each ts As TimeSeries In _model.TimeSeries.Values
- ' processSeries = False
- ' 'check if time series is currently active
- ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If series.Title = ts.Title Then
- ' If series.Active Then
- ' 'process this series
- ' processSeries = True
- ' color = series.Color
- ' End If
- ' Exit For
- ' End If
- ' Next
- ' If processSeries Then
- ' 'log
- ' Log.AddLogEntry(Log.levels.info, $"Finding NaN values for series {ts.Title}...")
- ' 'find beginning and end of nan values
- ' nanFoundInSeries = False
- ' isNaNPeriod = False
- ' For i As Integer = 0 To ts.Length - 1
- ' If Not isNaNPeriod Then
- ' 'test for start of NaN values
- ' If Double.IsNaN(ts.Values(i)) Then
- ' isNaNPeriod = True
- ' nanFoundInSeries = True
- ' nanFound = True
- ' If i = 0 Then
- ' bandStart = ts.Dates(i)
- ' Else
- ' bandStart = ts.Dates(i - 1)
- ' End If
- ' nanStart = ts.Dates(i)
+ Dim nanStart, nanEnd, spanStart, spanEnd As DateTime
+ Dim isNaNPeriod, nanFound, nanFoundInSeries As Boolean
+ Dim nanCount As Integer
+
+ If View.ToolStripButton_ShowNaNValues.Checked Then
+ 'Switch visualization of NaN values on
+ 'Show horizontal spans for NaN values in the currently active series
+ nanFound = False
+ For Each index As Integer In View.CheckedListBox_Series.CheckedIndices
+
+ Dim ts As TimeSeries = CType(View.CheckedListBox_Series.Items(index), TimeSeries)
+ Dim color As Color = CType(Me.ChartSeries(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
+
+ 'find beginning and end of nan values
+ nanFoundInSeries = False
+ isNaNPeriod = False
+ nanCount = 0
+ For i As Integer = 0 To ts.Length - 1
+
+ If Not isNaNPeriod Then
+ 'test for start of NaN values
+ If Double.IsNaN(ts.Values(i)) Then
+ isNaNPeriod = True
+ nanFoundInSeries = True
+ nanFound = True
+ If i = 0 Then
+ spanStart = ts.Dates(i)
+ Else
+ spanStart = ts.Dates(i - 1)
+ End If
+ nanStart = ts.Dates(i)
+
+ If i < ts.Length - 1 Then
+ 'cycle to the next node directly
+ nanCount += 1
+ Continue For
+ End If
+ End If
+ End If
- ' If i < ts.Length - 1 Then
- ' Continue For
- ' End If
- ' End If
- ' End If
- ' If isNaNPeriod Then
- ' 'test for end of NaN values
- ' If Not Double.IsNaN(ts.Values(i)) Then
- ' bandEnd = ts.Dates(i)
- ' nanEnd = ts.Dates(i - 1)
- ' isNaNPeriod = False
-
- ' ElseIf i = ts.Length - 1 Then
- ' 'force end if end of time series reached
- ' bandEnd = ts.Dates(i)
- ' nanEnd = ts.Dates(i)
- ' isNaNPeriod = False
+ If isNaNPeriod Then
+
+ 'test for end of NaN values
+ If Not Double.IsNaN(ts.Values(i)) Then
+ spanEnd = ts.Dates(i)
+ nanEnd = ts.Dates(i - 1)
+ isNaNPeriod = False
+ Else
+ nanCount += 1
+
+ If i = ts.Length - 1 Then
+ 'force end if end of time series reached
+ spanEnd = ts.Dates(i)
+ nanEnd = ts.Dates(i)
+ isNaNPeriod = False
+ End If
+
+ End If
+
+ If Not isNaNPeriod Then
+ 'end of NaN period reached
+
+ 'add a horizontal span
+ Dim hspan As ScottPlot.Plottable.HSpan = Me.View.MainPlot.Plot.AddHorizontalSpan(spanStart.ToOADate(), spanEnd.ToOADate())
+ hspan.BorderLineStyle = ScottPlot.LineStyle.None
+ hspan.Color = Color.FromArgb(100, ControlPaint.Light(color))
+ hspan.DragEnabled = False
+ Me.View.NaNSpans.Add(hspan)
+
+ 'write to log
+ Log.AddLogEntry(Log.levels.info, $"Series {ts.Title} contains {nanCount} NaN values from {nanStart.ToString(Helpers.CurrentDateFormat)} to {nanEnd.ToString(Helpers.CurrentDateFormat)}")
+
+ 'reset nanCount
+ nanCount = 0
+ End If
+ End If
+ Next
+ If Not nanFoundInSeries Then
+ Log.AddLogEntry(Log.levels.info, $"Series {ts.Title} does not contain any NaN values")
+ End If
+ Next
+ If Not nanFound Then
+ MsgBox("No NaN values found in the currently active series!", MsgBoxStyle.Information)
+ View.ToolStripButton_ShowNaNValues.Checked = False
+ End If
+ Else
+ 'Switch visualization of NaN values off
+ 'Remove all corresponding hspans in main chart
+ For Each hspan In View.NaNSpans
+ View.MainPlot.Plot.Remove(hspan)
+ Next
+ View.NaNSpans.Clear()
+ End If
- ' End If
+ View.MainPlot.Refresh()
- ' If Not isNaNPeriod Then
- ' 'end of NaN period reached, add a color band
- ' band = New Steema.TeeChart.Tools.ColorBand()
- ' View.MainPlot.Tools.Add(band)
- ' band.Axis = View.MainPlot.Axes.Bottom
- ' band.Start = bandStart.ToOADate()
- ' band.End = bandEnd.ToOADate()
- ' band.Pen.Visible = False
- ' band.Pen.Color = color
- ' band.Brush.Color = ControlPaint.Light(color)
- ' band.Brush.Transparency = 50
- ' band.ResizeEnd = False
- ' band.ResizeStart = False
- ' band.EndLinePen.Visible = False
- ' band.StartLinePen.Visible = False
- ' band.Tag = "NaN"
-
- ' 'write to log
- ' Log.AddLogEntry(Log.levels.info, $"Series contains NaN values from {nanStart.ToString(Helpers.CurrentDateFormat)} to {nanEnd.ToString(Helpers.CurrentDateFormat)}")
- ' End If
- ' End If
- ' Next
- ' If Not nanFoundInSeries Then
- ' Log.AddLogEntry(Log.levels.info, "Series does not contain any NaN values")
- ' End If
- ' End If
- ' Next
- ' If Not nanFound Then
- ' MsgBox("No NaN values found in the currently active series!", MsgBoxStyle.Information)
- ' View.ToolStripButton_ShowNaNValues.Checked = False
- ' End If
- 'Else
- ' 'Switch visualization of NaN values off
- ' 'Remove all tools of type ColorBand with Tag "NaN" from MainPlot
- ' Dim nanbands As New List(Of Steema.TeeChart.Tools.ColorBand)
- ' For Each tool As Steema.TeeChart.Tools.Tool In View.MainPlot.Tools
- ' If tool.GetType Is GetType(Steema.TeeChart.Tools.ColorBand) And tool.Tag = "NaN" Then
- ' nanbands.Add(tool)
- ' End If
- ' Next
- ' For Each nanband As Steema.TeeChart.Tools.ColorBand In nanbands
- ' View.MainPlot.Tools.Remove(nanband)
- ' Next
- 'End If
End Sub
'''
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index fe461a16..a16add3c 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -38,6 +38,11 @@ Friend Class MainWindow
'Rectangle representing current view extent of main chart in overview chart
Friend ViewExtentRectangle As ScottPlot.Plottable.HSpan
+ '''
+ ''' List of HorizontalSpans representing NaN periods
+ '''
+ Friend NaNSpans As List(Of ScottPlot.Plottable.HSpan)
+
'Cursors
Friend cursor_pan As Cursor
Friend cursor_zoom As Cursor
@@ -149,6 +154,9 @@ Friend Class MainWindow
'initialize rectangles
Call Me.InitializeRectangles()
+ 'initialize list of HorizontalSpans representing NaN periods
+ Me.NaNSpans = New List(Of ScottPlot.Plottable.HSpan)
+
End Sub
'''
From 6c669c293156f396560eb3c30700e5c01e3c777e Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 17:27:01 +0100
Subject: [PATCH 26/57] clear TOC when series are cleared from model
---
source/Controllers/WaveController.vb | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index e1a6582a..3decde81 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -222,8 +222,12 @@ Friend Class WaveController
End Sub
+ '''
+ ''' Handles the case where all series were cleared from the model
+ '''
Private Sub SeriesCleared()
- 'nothing to do
+ 'remove TOC items
+ View.CheckedListBox_Series.Items.Clear()
End Sub
'''
From 3e4ab6da1bf6b494480c502c077bcc9bbed453b6 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 17:30:04 +0100
Subject: [PATCH 27/57] remove unnecessary Me
---
source/Controllers/WaveController.vb | 80 ++++++++++++++--------------
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 3decde81..99770df1 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -662,11 +662,11 @@ Friend Class WaveController
'end of NaN period reached
'add a horizontal span
- Dim hspan As ScottPlot.Plottable.HSpan = Me.View.MainPlot.Plot.AddHorizontalSpan(spanStart.ToOADate(), spanEnd.ToOADate())
+ Dim hspan As ScottPlot.Plottable.HSpan = View.MainPlot.Plot.AddHorizontalSpan(spanStart.ToOADate(), spanEnd.ToOADate())
hspan.BorderLineStyle = ScottPlot.LineStyle.None
hspan.Color = Color.FromArgb(100, ControlPaint.Light(color))
hspan.DragEnabled = False
- Me.View.NaNSpans.Add(hspan)
+ View.NaNSpans.Add(hspan)
'write to log
Log.AddLogEntry(Log.levels.info, $"Series {ts.Title} contains {nanCount} NaN values from {nanStart.ToString(Helpers.CurrentDateFormat)} to {nanEnd.ToString(Helpers.CurrentDateFormat)}")
@@ -1196,22 +1196,22 @@ Friend Class WaveController
Dim indices As New List(Of Integer)
Dim ids As New List(Of Integer)
- For Each index As Integer In Me.View.CheckedListBox_Series.SelectedIndices
+ For Each index As Integer In View.CheckedListBox_Series.SelectedIndices
If (direction = Direction.Up And index = 0) Or
- (direction = Direction.Down And index = Me.View.CheckedListBox_Series.Items.Count - 1) Then
+ (direction = Direction.Down And index = View.CheckedListBox_Series.Items.Count - 1) Then
'if first row is selected, moving up does nothing
'if last row is selected, moving down does nothing
Exit Sub
End If
indices.Add(index)
- ids.Add(CType(Me.View.CheckedListBox_Series.Items(index), TimeSeries).Id)
+ ids.Add(CType(View.CheckedListBox_Series.Items(index), TimeSeries).Id)
Next
'reorder each series in the model
For Each id As Integer In ids
Model.SeriesReorder(id, direction)
Next
'reselect previously selected items in their new positions
- Me.View.CheckedListBox_Series.ClearSelected()
+ View.CheckedListBox_Series.ClearSelected()
Dim offset As Integer
If direction = Direction.Up Then
offset = -1
@@ -1219,7 +1219,7 @@ Friend Class WaveController
offset = 1
End If
For Each index As Integer In indices
- Me.View.CheckedListBox_Series.SetSelected(index + offset, True)
+ View.CheckedListBox_Series.SetSelected(index + offset, True)
Next
End Sub
@@ -1233,7 +1233,7 @@ Friend Class WaveController
'collect titles and ids of all selected items
Dim titles As New List(Of String)
Dim ids As New List(Of Integer)
- For Each ts As TimeSeries In Me.View.CheckedListBox_Series.SelectedItems
+ For Each ts As TimeSeries In View.CheckedListBox_Series.SelectedItems
titles.Add(ts.Title)
ids.Add(ts.Id)
Next
@@ -1257,21 +1257,21 @@ Friend Class WaveController
'''
Private Sub TOC_SelectionChanged(sender As Object, e As EventArgs)
'Check if any items are selected
- If Me.View.CheckedListBox_Series.SelectedIndices.Count = 0 Then
- Me.View.ToolStripButton_Delete.Enabled = False
- Me.View.ToolStripButton_MoveUp.Enabled = False
- Me.View.ToolStripButton_MoveDown.Enabled = False
+ If View.CheckedListBox_Series.SelectedIndices.Count = 0 Then
+ View.ToolStripButton_Delete.Enabled = False
+ View.ToolStripButton_MoveUp.Enabled = False
+ View.ToolStripButton_MoveDown.Enabled = False
Else
- Me.View.ToolStripButton_Delete.Enabled = True
- Me.View.ToolStripButton_MoveUp.Enabled = True
- Me.View.ToolStripButton_MoveDown.Enabled = True
+ View.ToolStripButton_Delete.Enabled = True
+ View.ToolStripButton_MoveUp.Enabled = True
+ View.ToolStripButton_MoveDown.Enabled = True
'check if first row is selected
- If Me.View.CheckedListBox_Series.GetSelected(0) Then
- Me.View.ToolStripButton_MoveUp.Enabled = False
+ If View.CheckedListBox_Series.GetSelected(0) Then
+ View.ToolStripButton_MoveUp.Enabled = False
End If
'check if last row is selected
- If Me.View.CheckedListBox_Series.GetSelected(Me.View.CheckedListBox_Series.Items.Count - 1) Then
- Me.View.ToolStripButton_MoveDown.Enabled = False
+ If View.CheckedListBox_Series.GetSelected(View.CheckedListBox_Series.Items.Count - 1) Then
+ View.ToolStripButton_MoveDown.Enabled = False
End If
End If
End Sub
@@ -1331,7 +1331,7 @@ Friend Class WaveController
'''
Private Sub About_Click(sender As System.Object, e As System.EventArgs)
Dim about As New AboutBox()
- Call about.ShowDialog(Me.View)
+ Call about.ShowDialog(View)
End Sub
'''
@@ -2064,8 +2064,8 @@ Friend Class WaveController
'get min and max values of visible series grouped by unit
Dim unitRanges As New Dictionary(Of String, (min As Double, max As Double))
- For Each index As Integer In Me.View.CheckedListBox_Series.CheckedIndices
- Dim ts As TimeSeries = CType(Me.View.CheckedListBox_Series.Items(index), TimeSeries)
+ For Each index As Integer In View.CheckedListBox_Series.CheckedIndices
+ Dim ts As TimeSeries = CType(View.CheckedListBox_Series.Items(index), TimeSeries)
Dim seriesMin As Double = ts.Minimum(startdate, enddate)
Dim seriesMax As Double = ts.Maximum(startdate, enddate)
If Not unitRanges.ContainsKey(ts.Unit) Then
@@ -2081,7 +2081,7 @@ Friend Class WaveController
Next
'loop over Y-axes
- For Each axis As ScottPlot.Renderable.Axis In Me.View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
Dim axisUnit As String = axis.AxisLabel.Label
If unitRanges.ContainsKey(axisUnit) Then
'set new limits
@@ -2091,7 +2091,7 @@ Friend Class WaveController
axis.Dims.SetAxis(range.min - padding, range.max + padding)
End If
Next
- Me.View.MainPlot.Refresh()
+ View.MainPlot.Refresh()
End If
End Sub
@@ -2514,7 +2514,7 @@ Friend Class WaveController
For Each ts As TimeSeries In Model.TimeSeries.Values
units.Add(ts.Unit)
Next
- For Each axis As ScottPlot.Renderable.Axis In Me.View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
If axis.AxisLabel.Label <> "" And Not units.Contains(axis.AxisLabel.Label) Then
axesToRemove.Add(axis)
End If
@@ -2526,7 +2526,7 @@ Friend Class WaveController
axis.Label("")
axis.Dims.ResetLimits()
Else
- Me.View.MainPlot.Plot.RemoveAxis(axis)
+ View.MainPlot.Plot.RemoveAxis(axis)
End If
Next
End If
@@ -2549,7 +2549,7 @@ Friend Class WaveController
Me.ChartSeries(id).IsVisible = (e.NewValue = CheckState.Checked)
End If
'TODO: hide unused y axes if no active series uses them
- Me.View.MainPlot.Refresh()
+ View.MainPlot.Refresh()
End Sub
'''
@@ -2693,14 +2693,14 @@ Friend Class WaveController
Case Else
series.StepDisplay = False
End Select
- Me.View.MainPlot.Refresh()
+ View.MainPlot.Refresh()
End If
End If
'TODO: apply the same changes in the overview chart?
'update the TOC
- Me.View.CheckedListBox_Series.Refresh()
+ View.CheckedListBox_Series.Refresh()
End Sub
@@ -2712,14 +2712,14 @@ Friend Class WaveController
'Remove series from main chart
If Me.ChartSeries.ContainsKey(id) Then
- Me.View.MainPlot.Plot.Remove(Me.ChartSeries(id))
+ View.MainPlot.Plot.Remove(Me.ChartSeries(id))
View.MainPlot.Refresh()
End If
'Remove series from TOC
Dim indexFound As Boolean = False
Dim index As Integer = 0
- For Each ts As TimeSeries In Me.View.CheckedListBox_Series.Items
+ For Each ts As TimeSeries In View.CheckedListBox_Series.Items
If ts.Id = id Then
indexFound = True
Exit For
@@ -2727,7 +2727,7 @@ Friend Class WaveController
index += 1
Next
If indexFound Then
- Me.View.CheckedListBox_Series.Items.RemoveAt(index)
+ View.CheckedListBox_Series.Items.RemoveAt(index)
End If
'remove series from internal storage
@@ -2753,12 +2753,12 @@ Friend Class WaveController
'find the index of the series in the chart by comparing titles
'TODO: find a better way to detemine a series' index in the chart
Dim index As Integer = 0
- For Each plottable As ScottPlot.Plottable.IPlottable In Me.View.MainPlot.Plot.GetPlottables()
+ For Each plottable As ScottPlot.Plottable.IPlottable In View.MainPlot.Plot.GetPlottables()
Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(plottable, ScottPlot.Plottable.ScatterPlot)
If Not IsNothing(series) Then
If series.Label = Me.Model.TimeSeries(id).Title Then
- Me.View.MainPlot.Plot.Move(index, index + offset)
- Me.View.MainPlot.Refresh()
+ View.MainPlot.Plot.Move(index, index + offset)
+ View.MainPlot.Refresh()
Exit For
End If
End If
@@ -2769,7 +2769,7 @@ Friend Class WaveController
'find the index of the series in the TOC by comparing titles
Dim indexFound As Boolean = False
index = 0
- For Each ts As TimeSeries In Me.View.CheckedListBox_Series.Items
+ For Each ts As TimeSeries In View.CheckedListBox_Series.Items
If ts.Title = Me.Model.TimeSeries(id).Title Then
indexFound = True
Exit For
@@ -2777,10 +2777,10 @@ Friend Class WaveController
index += 1
Next
If indexFound Then
- Dim isChecked As Boolean = Me.View.CheckedListBox_Series.GetItemChecked(index)
- Me.View.CheckedListBox_Series.Items.RemoveAt(index)
- Me.View.CheckedListBox_Series.Items.Insert(index + offset, Me.Model.TimeSeries(id))
- Me.View.CheckedListBox_Series.SetItemChecked(index + offset, isChecked)
+ Dim isChecked As Boolean = View.CheckedListBox_Series.GetItemChecked(index)
+ View.CheckedListBox_Series.Items.RemoveAt(index)
+ View.CheckedListBox_Series.Items.Insert(index + offset, Me.Model.TimeSeries(id))
+ View.CheckedListBox_Series.SetItemChecked(index + offset, isChecked)
End If
End Sub
From 71e02b952a534cb84531fa638ae27aa601c0dca2 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 17:36:36 +0100
Subject: [PATCH 28/57] implement removing NaN values from series
---
source/Controllers/WaveController.vb | 48 ++++++++++++----------------
1 file changed, 20 insertions(+), 28 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 99770df1..00ff0639 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -725,34 +725,26 @@ Friend Class WaveController
'''
Private Sub RemoveNaNValues_Click(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Dim dlgResult As DialogResult
- 'Dim ids As List(Of Integer)
- 'Dim ts As TimeSeries
-
- 'dlgResult = MsgBox("Delete all nodes with NaN values from all series?", MsgBoxStyle.OkCancel)
- 'If dlgResult = Windows.Forms.DialogResult.OK Then
- ' ids = _model.TimeSeries.Ids.ToList()
- ' 'loop over time series
- ' For Each id As Integer In ids
- ' 'remove NaN values
- ' ts = _model.TimeSeries(id)
- ' ts = ts.removeNaNValues()
- ' _model.TimeSeries(id) = ts
- ' 'replace values of series in chart
- ' For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If series.Tag = id Then
- ' series.BeginUpdate()
- ' series.Clear()
- ' For Each kvp As KeyValuePair(Of DateTime, Double) In ts.Nodes
- ' series.Add(kvp.Key, kvp.Value)
- ' Next
- ' series.EndUpdate()
- ' Exit For
- ' End If
- ' Next
- ' Next
- 'End If
+ Dim dlgResult As DialogResult
+ Dim ids As List(Of Integer)
+ Dim ts As TimeSeries
+
+ dlgResult = MsgBox("Delete all nodes with NaN values from all series?", MsgBoxStyle.OkCancel)
+ If dlgResult = Windows.Forms.DialogResult.OK Then
+ ids = _model.TimeSeries.Ids.ToList()
+ 'loop over time series
+ For Each id As Integer In ids
+ 'remove NaN values
+ ts = _model.TimeSeries(id)
+ ts = ts.removeNaNValues()
+ _model.TimeSeries(id) = ts
+ 'replace values of series in chart
+ Dim series As ScottPlot.Plottable.ScatterPlot = Me.ChartSeries(id)
+ series.Update(ts.Dates.Select(Function(t As DateTime) t.ToOADate()).ToArray(), ts.Values.ToArray())
+ 'TODO: update series in overview chart
+ Next
+ View.MainPlot.Refresh()
+ End If
End Sub
'Drucken
From 3aa88de7eda46d5528e0fe82e0653ff417407dec Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 17:57:45 +0100
Subject: [PATCH 29/57] remove print button
---
source/Controllers/WaveController.vb | 8 --
source/Views/MainWindow.Designer.vb | 123 ++++++++++++---------------
source/Views/MainWindow.resx | 51 +++--------
3 files changed, 68 insertions(+), 114 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 00ff0639..08fb9206 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -101,7 +101,6 @@ Friend Class WaveController
'toolbar buttons
AddHandler Me.View.ToolStripButton_New.Click, AddressOf New_Click
AddHandler Me.View.ToolStripButton_Copy.Click, AddressOf Copy_Click
- AddHandler Me.View.ToolStripButton_Print.Click, AddressOf Print_Click
AddHandler Me.View.ToolStripMenuItem_ImportSeries.Click, AddressOf ImportSeries_Click
AddHandler Me.View.ToolStripMenuItem_LoadTEN.Click, AddressOf LoadTEN_Click
AddHandler Me.View.ToolStripMenuItem_ReloadFromFiles.Click, AddressOf RefreshFromFiles_Click
@@ -747,13 +746,6 @@ Friend Class WaveController
End If
End Sub
- 'Drucken
- '*******
- Private Sub Print_Click(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Call View.MainPlot.Printer.Preview()
- End Sub
-
'Kopieren (als PNG)
'******************
Private Sub Copy_Click(sender As System.Object, e As System.EventArgs)
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 9a67f353..342f7fe2 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -49,7 +49,6 @@ Partial Class MainWindow
Me.ToolStripMenuItem_SaveChart = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_ExportSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripButton_Copy = New System.Windows.Forms.ToolStripButton()
- Me.ToolStripButton_Print = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_Cut = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_Merge = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator8 = New System.Windows.Forms.ToolStripSeparator()
@@ -108,16 +107,16 @@ Partial Class MainWindow
Me.ProgressBar1 = New System.Windows.Forms.ProgressBar()
Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
- Me.CheckedListBox_Series = New System.Windows.Forms.CheckedListBox()
Me.ToolStrip2 = New System.Windows.Forms.ToolStrip()
- Me.ToolStripDropDownButton1 = New System.Windows.Forms.ToolStripDropDownButton()
- Me.ToolStripMenuItem_ActivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripButton_MoveUp = New System.Windows.Forms.ToolStripButton()
- Me.ToolStripButton_MoveDown = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_Delete = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator12 = New System.Windows.Forms.ToolStripSeparator()
+ Me.ToolStripButton_MoveUp = New System.Windows.Forms.ToolStripButton()
+ Me.ToolStripButton_MoveDown = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator13 = New System.Windows.Forms.ToolStripSeparator()
+ Me.ToolStripDropDownButton1 = New System.Windows.Forms.ToolStripDropDownButton()
+ Me.ToolStripMenuItem_ActivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
+ Me.CheckedListBox_Series = New System.Windows.Forms.CheckedListBox()
ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
@@ -210,7 +209,7 @@ Partial Class MainWindow
'
ToolStrip1.AutoSize = False
ToolStrip1.BackColor = System.Drawing.SystemColors.Control
- ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_New, Me.ToolStripDropDownButton_Open, Me.ToolStripDropDownButton_Save, ToolStripSeparator4, Me.ToolStripButton_Copy, Me.ToolStripButton_Print, ToolStripSeparator2, Me.ToolStripButton_Cut, Me.ToolStripButton_Merge, Me.ToolStripSeparator8, Me.ToolStripButton_ShowNaNValues, Me.ToolStripButton_ConvertErrorValues, Me.ToolStripButton_RemoveNaNValues, Me.ToolStripSeparator7, Me.ToolStripButton_Analysis, ToolStripSeparator1, Me.ToolStripButton_EditChart, Me.ToolStripDropDownButton_ColorPalette, Me.ToolStripSeparator9, Me.ToolStripButton_Properties, Me.ToolStripButton_TimeseriesValues, Me.ToolStripSeparator10, Me.ToolStripButton_AxisDialog, Me.ToolStripButton_AutoAdjustYAxes, ToolStripSeparator3, Me.ToolStripButton_ToggleOverview, Me.ToolStripButton_ToggleNavigation, toolStripSeparator, Me.ToolStripButton_ZoomIn, Me.ToolStripButton_ZoomOut, Me.ToolStripButton_ZoomPrevious, Me.ToolStripDropDownButton_Help, Me.ToolStripButton_ZoomNext, Me.ToolStripDropDownButton_ZoomToSeries, Me.ToolStripButton_ZoomAll, Me.ToolStripButton_UpdateNotification, Me.ToolStripSeparator11})
+ ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_New, Me.ToolStripDropDownButton_Open, Me.ToolStripDropDownButton_Save, ToolStripSeparator4, Me.ToolStripButton_Copy, ToolStripSeparator2, Me.ToolStripButton_Cut, Me.ToolStripButton_Merge, Me.ToolStripSeparator8, Me.ToolStripButton_ShowNaNValues, Me.ToolStripButton_ConvertErrorValues, Me.ToolStripButton_RemoveNaNValues, Me.ToolStripSeparator7, Me.ToolStripButton_Analysis, ToolStripSeparator1, Me.ToolStripButton_EditChart, Me.ToolStripDropDownButton_ColorPalette, Me.ToolStripSeparator9, Me.ToolStripButton_Properties, Me.ToolStripButton_TimeseriesValues, Me.ToolStripSeparator10, Me.ToolStripButton_AxisDialog, Me.ToolStripButton_AutoAdjustYAxes, ToolStripSeparator3, Me.ToolStripButton_ToggleOverview, Me.ToolStripButton_ToggleNavigation, toolStripSeparator, Me.ToolStripButton_ZoomIn, Me.ToolStripButton_ZoomOut, Me.ToolStripButton_ZoomPrevious, Me.ToolStripDropDownButton_Help, Me.ToolStripButton_ZoomNext, Me.ToolStripDropDownButton_ZoomToSeries, Me.ToolStripButton_ZoomAll, Me.ToolStripButton_UpdateNotification, Me.ToolStripSeparator11})
ToolStrip1.Location = New System.Drawing.Point(0, 0)
ToolStrip1.Name = "ToolStrip1"
ToolStrip1.Size = New System.Drawing.Size(944, 34)
@@ -332,15 +331,6 @@ Partial Class MainWindow
Me.ToolStripButton_Copy.Size = New System.Drawing.Size(23, 31)
Me.ToolStripButton_Copy.Text = "&Copy chart to clipboard (PNG)"
'
- 'ToolStripButton_Print
- '
- Me.ToolStripButton_Print.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton_Print.Image = CType(resources.GetObject("ToolStripButton_Print.Image"), System.Drawing.Image)
- Me.ToolStripButton_Print.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_Print.Name = "ToolStripButton_Print"
- Me.ToolStripButton_Print.Size = New System.Drawing.Size(23, 31)
- Me.ToolStripButton_Print.Text = "&Print"
- '
'ToolStripButton_Cut
'
Me.ToolStripButton_Cut.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
@@ -883,21 +873,6 @@ Partial Class MainWindow
Me.SplitContainer2.SplitterDistance = 135
Me.SplitContainer2.TabIndex = 7
'
- 'CheckedListBox_Series
- '
- Me.CheckedListBox_Series.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
- Or System.Windows.Forms.AnchorStyles.Left) _
- Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
- Me.CheckedListBox_Series.BackColor = System.Drawing.SystemColors.Control
- Me.CheckedListBox_Series.FormattingEnabled = True
- Me.CheckedListBox_Series.HorizontalScrollbar = True
- Me.CheckedListBox_Series.Location = New System.Drawing.Point(5, 31)
- Me.CheckedListBox_Series.Margin = New System.Windows.Forms.Padding(5)
- Me.CheckedListBox_Series.Name = "CheckedListBox_Series"
- Me.CheckedListBox_Series.Size = New System.Drawing.Size(125, 559)
- Me.CheckedListBox_Series.TabIndex = 0
- Me.CheckedListBox_Series.ThreeDCheckBoxes = True
- '
'ToolStrip2
'
Me.ToolStrip2.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_Delete, Me.ToolStripSeparator12, Me.ToolStripButton_MoveUp, Me.ToolStripButton_MoveDown, Me.ToolStripSeparator13, Me.ToolStripDropDownButton1})
@@ -907,28 +882,21 @@ Partial Class MainWindow
Me.ToolStrip2.TabIndex = 1
Me.ToolStrip2.Text = "ToolStrip2"
'
- 'ToolStripDropDownButton1
- '
- Me.ToolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripDropDownButton1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_ActivateAllSeries, Me.ToolStripMenuItem_DeactivateAllSeries})
- Me.ToolStripDropDownButton1.Image = Global.BlueM.Wave.My.Resources.Resources.accept_split
- Me.ToolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripDropDownButton1.Name = "ToolStripDropDownButton1"
- Me.ToolStripDropDownButton1.Size = New System.Drawing.Size(29, 22)
- '
- 'ToolStripMenuItem_ActivateAllSeries
+ 'ToolStripButton_Delete
'
- Me.ToolStripMenuItem_ActivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept
- Me.ToolStripMenuItem_ActivateAllSeries.Name = "ToolStripMenuItem_ActivateAllSeries"
- Me.ToolStripMenuItem_ActivateAllSeries.Size = New System.Drawing.Size(180, 22)
- Me.ToolStripMenuItem_ActivateAllSeries.Text = "Activate all series"
+ Me.ToolStripButton_Delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.ToolStripButton_Delete.Enabled = False
+ Me.ToolStripButton_Delete.Image = Global.BlueM.Wave.My.Resources.Resources.chart_line_delete
+ Me.ToolStripButton_Delete.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripButton_Delete.Name = "ToolStripButton_Delete"
+ Me.ToolStripButton_Delete.Size = New System.Drawing.Size(23, 22)
+ Me.ToolStripButton_Delete.Text = "ToolStripButton_Delete"
+ Me.ToolStripButton_Delete.ToolTipText = "Delete selected time series"
'
- 'ToolStripMenuItem_DeactivateAllSeries
+ 'ToolStripSeparator12
'
- Me.ToolStripMenuItem_DeactivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept_grayscale
- Me.ToolStripMenuItem_DeactivateAllSeries.Name = "ToolStripMenuItem_DeactivateAllSeries"
- Me.ToolStripMenuItem_DeactivateAllSeries.Size = New System.Drawing.Size(180, 22)
- Me.ToolStripMenuItem_DeactivateAllSeries.Text = "Deactivate all series"
+ Me.ToolStripSeparator12.Name = "ToolStripSeparator12"
+ Me.ToolStripSeparator12.Size = New System.Drawing.Size(6, 25)
'
'ToolStripButton_MoveUp
'
@@ -951,26 +919,48 @@ Partial Class MainWindow
Me.ToolStripButton_MoveDown.Size = New System.Drawing.Size(23, 22)
Me.ToolStripButton_MoveDown.Text = "Move selected time series down"
'
- 'ToolStripButton_Delete
+ 'ToolStripSeparator13
'
- Me.ToolStripButton_Delete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton_Delete.Enabled = False
- Me.ToolStripButton_Delete.Image = Global.BlueM.Wave.My.Resources.Resources.chart_line_delete
- Me.ToolStripButton_Delete.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_Delete.Name = "ToolStripButton_Delete"
- Me.ToolStripButton_Delete.Size = New System.Drawing.Size(23, 22)
- Me.ToolStripButton_Delete.Text = "ToolStripButton_Delete"
- Me.ToolStripButton_Delete.ToolTipText = "Delete selected time series"
+ Me.ToolStripSeparator13.Name = "ToolStripSeparator13"
+ Me.ToolStripSeparator13.Size = New System.Drawing.Size(6, 25)
'
- 'ToolStripSeparator12
+ 'ToolStripDropDownButton1
'
- Me.ToolStripSeparator12.Name = "ToolStripSeparator12"
- Me.ToolStripSeparator12.Size = New System.Drawing.Size(6, 25)
+ Me.ToolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
+ Me.ToolStripDropDownButton1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_ActivateAllSeries, Me.ToolStripMenuItem_DeactivateAllSeries})
+ Me.ToolStripDropDownButton1.Image = Global.BlueM.Wave.My.Resources.Resources.accept_split
+ Me.ToolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta
+ Me.ToolStripDropDownButton1.Name = "ToolStripDropDownButton1"
+ Me.ToolStripDropDownButton1.Size = New System.Drawing.Size(29, 22)
'
- 'ToolStripSeparator13
+ 'ToolStripMenuItem_ActivateAllSeries
'
- Me.ToolStripSeparator13.Name = "ToolStripSeparator13"
- Me.ToolStripSeparator13.Size = New System.Drawing.Size(6, 25)
+ Me.ToolStripMenuItem_ActivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept
+ Me.ToolStripMenuItem_ActivateAllSeries.Name = "ToolStripMenuItem_ActivateAllSeries"
+ Me.ToolStripMenuItem_ActivateAllSeries.Size = New System.Drawing.Size(176, 22)
+ Me.ToolStripMenuItem_ActivateAllSeries.Text = "Activate all series"
+ '
+ 'ToolStripMenuItem_DeactivateAllSeries
+ '
+ Me.ToolStripMenuItem_DeactivateAllSeries.Image = Global.BlueM.Wave.My.Resources.Resources.accept_grayscale
+ Me.ToolStripMenuItem_DeactivateAllSeries.Name = "ToolStripMenuItem_DeactivateAllSeries"
+ Me.ToolStripMenuItem_DeactivateAllSeries.Size = New System.Drawing.Size(176, 22)
+ Me.ToolStripMenuItem_DeactivateAllSeries.Text = "Deactivate all series"
+ '
+ 'CheckedListBox_Series
+ '
+ Me.CheckedListBox_Series.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
+ Or System.Windows.Forms.AnchorStyles.Left) _
+ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.CheckedListBox_Series.BackColor = System.Drawing.SystemColors.Control
+ Me.CheckedListBox_Series.FormattingEnabled = True
+ Me.CheckedListBox_Series.HorizontalScrollbar = True
+ Me.CheckedListBox_Series.Location = New System.Drawing.Point(5, 31)
+ Me.CheckedListBox_Series.Margin = New System.Windows.Forms.Padding(5)
+ Me.CheckedListBox_Series.Name = "CheckedListBox_Series"
+ Me.CheckedListBox_Series.Size = New System.Drawing.Size(125, 559)
+ Me.CheckedListBox_Series.TabIndex = 0
+ Me.CheckedListBox_Series.ThreeDCheckBoxes = True
'
'MainWindow
'
@@ -1024,7 +1014,6 @@ Partial Class MainWindow
Friend WithEvents ToolStripButton_New As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripDropDownButton_Open As System.Windows.Forms.ToolStripDropDownButton
Friend WithEvents ToolStripDropDownButton_Save As System.Windows.Forms.ToolStripDropDownButton
- Friend WithEvents ToolStripButton_Print As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripButton_Copy As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripButton_EditChart As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripButton_ToggleOverview As System.Windows.Forms.ToolStripButton
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 86a83785..68360e28 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -138,12 +138,6 @@
120, 3
-
- False
-
-
- False
-
@@ -178,12 +172,6 @@
g6eHO+A/lyD8ARfG3mk9fv1YAAAAAElFTkSuQmCC
-
- False
-
-
- False
-
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
@@ -215,21 +203,6 @@
zjLzOUEwEsMf+sLI2zmaOou/93pPGoM5zvk7UU7fnBKxSBPoT7SXBNW1F/9Io2lKCNTCeomUyrS8xnBA
wfUqyf1eP5U1ptJD/o1LzeNCsHPydtqdr6k4aiwvOHvNSya3ibU/QIdrEkvfhJislc32MfYfuV1eUGPw
FF7bIVJVZ0N/soPK421UHGstlFvYd/hWecF/Qqf7CR0A5wwgSQA2AAAAAElFTkSuQmCC
-
-
-
-
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIpSURBVDhPtZL/T1JRGMb5p1itrVZbbRpqZbawnBENV1I0
- jGlByTSyJTXJwq2oKZQb1KAv6JCYWSxvBrkkZUq4CeQEiRABFeLL072Xa0zRra31bO8v57zP5znnPYf1
- X+TxhWF6O7VtGYcnwbSWijKPOLzYrPSvLPwLS3huGUMlT7o9wGD9grVUBj+icdid03S9tDmgNxNwTgVQ
- J+rA8XNtWwM+uuZATMwxmQVRycuJFNyzIRitDlScugKzjSgFRGJJaIwEsrk8AsHIhnSL/Ssck37UNipQ
- I5DjtuYV7uksRYhr2kebhx2eP6nrycFIEh5fBA/1Nvru8q5+PDaOovK0rABwfwugWzcErfkzHhjsePL6
- E7q1VrTdNUDcrgGvSYlDZHN5XTNOnL8BVe8AJAoNDtZfLgDu9L1BPJmikzcrk81hlRwodZJwdBXziwnI
- OrVoaOkiT8C8hKLHBPO7CbywOaE1jeC+bhAd6meQdvZC1KoG/5IS3MZ2HObLUHZSggvkWq3wOvbWiAqA
- VpWeyStVfCUNf3AZ4zNhfHCFMEDMgye+hYr6FrDLzxQAUuVTpr0ocn74mchg5vsKRt1RcHp2Qv9+kZ78
- UcE17KkWFgHNN/uQzgBkGKLJPBZiecyGchjzrmFwPIF++xJUbDbUQzEacIArLpopSRSP4CUN1Obf1Abz
- uqob5KjiXwWH/GVl5HPt5zZh37GL2H1EiF1VZ7GDI6CNW5r/TSzWbwHYL0mKJ5czAAAAAElFTkSuQmCC
@@ -254,18 +227,18 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25yG
- zmKMpZRBigrKDCnMOae5XJikQA2nV8tEdOuSeFHEyczZyFASRSrk4mrl1loIbVFjrQJfemC/LnIda7rq
- s52Xc36f3/ec32Fs4DaWoZ5hkYUcLg/ZR/KidmNu1IkLQ67+Iour5yJKl22N1yiUeIfEQY9BRLr1JfIl
- XIA4dYWIq58nd+n45IK2KOjAzkvo8j+JJcflUrXHF04lV8M80h+p9QYi15b9P/Nf+3+kOLq46nmMG5xt
- 52y+iccossSSl3xhhPSHr1KryRsIN5KBtQavP1JHNSr1+r4nz3VyyZk7HAutJSCN5SG3vli+/ClcSMk3
- 4nKkPiazrpsgTYoDdaMzMyqO3KrKD9FaAvtwbnRJJ0CopOqN1I0n5NYQUNI6CYigD6wtLGRWw4zSWgI7
- kRONDczrD0uz6wjIrBuCjOpBOCF5CPxbFug2u4HbaIYDbAxm1Fs0cOKlIVcvT+4JrLHRGgP0TpDQM+5Z
- F7tMbmjotoFm0AUsGQFJqApoLcGilmdZ7OGTsUGlSfB1uRabhmqNFarUT0B8exKkbVPQpnNAlkgPjL2y
- X7Qax4EVoAsPuMHnnVx1qnAAukZfQYfxBZW6CHdxJ8ioJq19DmBfIeDQsXoYr80S0GoCu6ZA4qD+OYWn
- hYPn7sE+Fga7TrdDZgUOCu0csC4bAGG2wseFDrC1cWGiEt1Pqwlm1Rx0WsmxWFWsUGxYNiUzuv2kAvLE
- j+BoTjN8eWuArysEvH+mAHNedtS4VZNNHG4KbUu+CXOdxeBzYhB8o4dV1314OSAG9Vnkw+Oq9B105d8Z
- k2UJbcoLsDLVDO+mWmC++xKYpWnfRvlHdtIl/8YkyRASZenwVMGGkQr0MyFI30Mf/T+mylO7+4uPK/Fy
- ZlJ8h8H4Deoalw5ogMx3AAAAAElFTkSuQmCC
+ WTHGUsogRQVlhhTmnNNcLkxSoIbTq2UiunVJvCjiZOZsZCiJIhVycbVyay2EtqixVoEvPbBfF7mONV31
+ 2c7LOb/P73vO7zDWcRtLUc+QyEIOlYXsw7lRuzEn6sSFIVdfocXVfRGlyzbHaxRKvIPioMcgIt36Yvki
+ LkCcugLE1ceTu3R8cl5bGHRg5yV0+Z/EkuNyidrjC6eSK2Ee6Y/UeAORa0v+n3mv/T9SHJ1c9RzGDc60
+ cTbexGMUWWLJi74wQvrDV6nV6A2EG8jAar3XH6mlGpV4fd+TZzu45PQdjoXWEpDGspBbXyRf+hQuoOQb
+ cTlSF5NZ102QJsWButGZaRVHblXlhWgtgX0oJ7qoEyBUUtV66voTTlUTUNwyAYigF6zNLGRGw4zSWgI7
+ wYzGBub1h6XZtQRk1g5CRtUAHJM8BP4tC3SZ3cBtMMM+NgbT6k0aOPGSkKuHJ/cEVtlotQF6xknoHvOs
+ iZ0mN9R32UAz4AKWjIAkVAW0lmBBy7MsdPPJ2KDSJPiaXINNQZXGCpXqJyC+PQHS1klo1TkgS6QHxm7Z
+ L1qN48Dy0fkH3ODzDq46VdgPnSOvoN34gkpdgLu4E2RUk5ZeB7CvEHDgSB2M1WQJaDWBXZMvcVD/nMLT
+ wv5z92APC4MdJ9sgsxwHhXYWWJcNgDBb4ON8O9hauTBege6l1QQzag46peRYrCpWKDYsm5IZ3XpcAafF
+ j+BwThN8eWuAr8sEvH+mAHNudtS4WZMNHGwMbUm+CbMdReBzYhB8o4cV13142S8G9Vnkw+PK9G105d8Z
+ lWUJbcoLsDzZBO8mm2Gu6xKYpWnfRviHttMl/8YkyRASpenwVMGG4XL0MyFI30Uf/T+mihM7+4qOKvEy
+ ZlJ8h8H4DdvOlwnwyUQ9AAAAAElFTkSuQmCC
From b57c56c395ed2b48feea66dda0c77550f125ad87 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 18:08:57 +0100
Subject: [PATCH 30/57] implement copy chart image to clipboard, change main
chart background to white
---
source/Controllers/WaveController.vb | 10 ++++++----
source/Views/MainWindow.Designer.vb | 2 +-
source/Views/MainWindow.resx | 26 +++++++++++++-------------
source/Views/MainWindow.vb | 1 +
4 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 08fb9206..f52a683b 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -746,11 +746,13 @@ Friend Class WaveController
End If
End Sub
- 'Kopieren (als PNG)
- '******************
+ '''
+ ''' Handles copy button clicked
+ '''
+ '''
+ '''
Private Sub Copy_Click(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Call View.MainPlot.Export.Image.PNG.CopyToClipboard()
+ Clipboard.SetImage(View.MainPlot.Plot.Render())
End Sub
'Analysieren
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 342f7fe2..8391edcb 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -329,7 +329,7 @@ Partial Class MainWindow
Me.ToolStripButton_Copy.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripButton_Copy.Name = "ToolStripButton_Copy"
Me.ToolStripButton_Copy.Size = New System.Drawing.Size(23, 31)
- Me.ToolStripButton_Copy.Text = "&Copy chart to clipboard (PNG)"
+ Me.ToolStripButton_Copy.Text = "&Copy chart image to clipboard"
'
'ToolStripButton_Cut
'
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 68360e28..97e3ab2f 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -226,19 +226,19 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25yG
- WTHGUsogRQVlhhTmnNNcLkxSoIbTq2UiunVJvCjiZOZsZCiJIhVycbVyay2EtqixVoEvPbBfF7mONV31
- 2c7LOb/P73vO7zDWcRtLUc+QyEIOlYXsw7lRuzEn6sSFIVdfocXVfRGlyzbHaxRKvIPioMcgIt36Yvki
- LkCcugLE1ceTu3R8cl5bGHRg5yV0+Z/EkuNyidrjC6eSK2Ee6Y/UeAORa0v+n3mv/T9SHJ1c9RzGDc60
- cTbexGMUWWLJi74wQvrDV6nV6A2EG8jAar3XH6mlGpV4fd+TZzu45PQdjoXWEpDGspBbXyRf+hQuoOQb
- cTlSF5NZ102QJsWButGZaRVHblXlhWgtgX0oJ7qoEyBUUtV66voTTlUTUNwyAYigF6zNLGRGw4zSWgI7
- wYzGBub1h6XZtQRk1g5CRtUAHJM8BP4tC3SZ3cBtMMM+NgbT6k0aOPGSkKuHJ/cEVtlotQF6xknoHvOs
- iZ0mN9R32UAz4AKWjIAkVAW0lmBBy7MsdPPJ2KDSJPiaXINNQZXGCpXqJyC+PQHS1klo1TkgS6QHxm7Z
- L1qN48Dy0fkH3ODzDq46VdgPnSOvoN34gkpdgLu4E2RUk5ZeB7CvEHDgSB2M1WQJaDWBXZMvcVD/nMLT
- wv5z92APC4MdJ9sgsxwHhXYWWJcNgDBb4ON8O9hauTBege6l1QQzag46peRYrCpWKDYsm5IZ3XpcAafF
- j+BwThN8eWuAr8sEvH+mAHNudtS4WZMNHGwMbUm+CbMdReBzYhB8o4cV13142S8G9Vnkw+PK9G105d8Z
- lWUJbcoLsDzZBO8mm2Gu6xKYpWnfRviHttMl/8YkyRASpenwVMGG4XL0MyFI30Uf/T+mihM7+4qOKvEy
- ZlJ8h8H4DdvOlwnwyUQ9AAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25xG
+ rmKMpbcMUlRQZkhhzjnN5cIkhVujKVomoluXxIsiTWbORoaSKFIhF1crt9ZCaIsaaxX40gP7dZHrWNNV
+ n+28nPP7/L7n/A5rDY+pDPUOia3UUHnYMZwXc5jYMRchCrv7iqzu7vMoU7YxPpNI6huUhLxGMeUxlCgW
+ CCHi0hci7j6+wq0XUHO6opBTe1bKlP9JPDkhl+JefySdWo7wqUC01heMXlkM/Mx/HfiR5uzE8FktFpq+
+ w1t/E69JbI0nL/gjCBWIXKZXky8YaaSCKw2+QLSOblTq839PnenAqKlbPCujJaFM5WGPoVix+ClSSMvX
+ EnK0Pi5zrpohQ0YAfaNTU2qewqbODzNaEscQO7agFyJ0UvVa6toT8mpIKGkdB0TYC7YWDjKtYccYLYmD
+ pKdND8wXiMhy60jIrhuErOoBOCJ9AIIbVuiyeABrtMAerham8A0auIjSsLuHr/AGV7hojRF6xijoHvWu
+ ip1mDzR02UEz4AaOnIQUVA2MlmRex7fOdwuo+KAypMSqXKudhGqNDarwJyC5OQ6ytglo0zshR2wA1k75
+ L0ZN4NQWoHP3sdDzDgxPF/VD58graDe9oFPn4TbhAjndpLXXCdxLJOw7VA+jtTlCRk3i0BRInfQ/p/F1
+ sPfMXdjF0cK243cgu4IApW4GOBeNgLBb4eNcO9jbMBirRHczapJpnIdOqnhWm5oTjg/LrmLHNh9VwknJ
+ Qzh4ohm+vDXC1yUS3j9TgiUvN2baqMk69jeFN6Veh5mOYvC7tBB6Y4Bl9z142S8B/DTy4XFV5ham8u88
+ kueI7KpzsDTRDO8mWmC26wJYZBnfRgQHtjIl/8YszRKRZZnwVMmF4Qr0MynM3MEc/T/mymPb+4oPq4hy
+ dkpih8X6DdAJlwUOpv2HAAAAAElFTkSuQmCC
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index a16add3c..4fc0d92a 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -139,6 +139,7 @@ Friend Class MainWindow
'initialize main plot
Me.MainPlot.Plot.Clear()
Call Helpers.FormatChart(Me.MainPlot.Plot)
+ Me.MainPlot.Plot.Style(figureBackground:=Color.White)
Me.MainPlot.Configuration.Pan = False
Me.MainPlot.Configuration.Zoom = False
Me.MainPlot.Refresh()
From 422aef7c6f515a9b61e736ea5557003d5248c92f Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 19:17:34 +0100
Subject: [PATCH 31/57] implement setting the color palette, add new color
palettes Category10 (new default) and Category20
---
source/Controllers/WaveController.vb | 45 ++++++++++++++--------------
source/Helpers.vb | 10 +++++--
source/Views/MainWindow.Designer.vb | 12 ++++----
3 files changed, 36 insertions(+), 31 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index f52a683b..f26135eb 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -115,6 +115,8 @@ Friend Class WaveController
AddHandler Me.View.ToolStripButton_Analysis.Click, AddressOf Analysis_Click
AddHandler Me.View.ToolStripButton_AxisDialog.Click, AddressOf AxisDialog_Click
AddHandler Me.View.ToolStripButton_EditChart.Click, AddressOf EditChart_Click
+ AddHandler Me.View.ToolStripMenuItem_ColorPaletteCategory10.Click, AddressOf ColorPalette_Click
+ AddHandler Me.View.ToolStripMenuItem_ColorPaletteCategory20.Click, AddressOf ColorPalette_Click
AddHandler Me.View.ToolStripMenuItem_ColorPaletteMaterial.Click, AddressOf ColorPalette_Click
AddHandler Me.View.ToolStripMenuItem_ColorPaletteDistinct.Click, AddressOf ColorPalette_Click
AddHandler Me.View.ToolStripMenuItem_ColorPaletteWheel.Click, AddressOf ColorPalette_Click
@@ -534,6 +536,7 @@ Friend Class WaveController
Dim colorPaletteName As String = CType(sender, ToolStripMenuItem).Text
SetChartColorPalette(Helpers.getColorPalette(colorPaletteName))
End Sub
+
'''
''' Show AxisDialog button clicked
'''
@@ -2878,31 +2881,27 @@ Friend Class WaveController
'''
''' Sets a color palette in the charts and changes the colors of any existing series accordingly
'''
- ''' The color palette to apply
- Private Sub SetChartColorPalette(colorPalette As Color())
+ ''' The color palette to apply
+ Private Sub SetChartColorPalette(colors As Color())
- 'TODO: TChart
- ''set colorpalette in charts
- 'View.MainPlot.Chart.ColorPalette = colorPalette
- 'View.TChart2.Chart.ColorPalette = colorPalette
+ Dim palette As ScottPlot.IPalette = ScottPlot.Palette.FromColors(colors)
- ''change colors of existing series
- 'Dim counter As Integer = 0
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If counter >= colorPalette.Length Then
- ' 'loop color palette
- ' counter = 0
- ' End If
- ' series.Color = colorPalette(counter)
- ' 'apply same color to series in overview chart
- ' For Each series2 As Steema.TeeChart.Styles.Series In View.TChart2.Series
- ' If series2.Tag = series.Tag Then
- ' series2.Color = colorPalette(counter)
- ' Exit For
- ' End If
- ' Next
- ' counter += 1
- 'Next
+ 'set colorpalette in charts
+ View.MainPlot.Plot.Palette = palette
+ View.OverviewPlot.Plot.Palette = palette
+
+ 'change colors of existing series
+ Dim counter As Integer = 0
+ For Each series As ScottPlot.Plottable.ScatterPlot In Me.ChartSeries.Values
+ If counter >= colors.Length Then
+ 'loop color palette
+ counter = 0
+ End If
+ series.Color = colors(counter)
+ counter += 1
+ Next
+ View.MainPlot.Refresh()
+ 'TODO: also change colors in overview plot
End Sub
'''
diff --git a/source/Helpers.vb b/source/Helpers.vb
index 6d5fcefb..f2b6663c 100644
--- a/source/Helpers.vb
+++ b/source/Helpers.vb
@@ -126,11 +126,15 @@ Public Module Helpers
'''
''' Returns a specified color palette
'''
- ''' Available color palettes are "Material", "Distinct", "Color Wheel" and "Random". Defaults to "Material".
+ ''' Available color palettes are "Category10", "Category20", "Material", "Distinct", "Color Wheel" and "Random". Defaults to "Category10".
''' A color palette
- Public Function getColorPalette(Optional name As String = "Material") As Color()
+ Public Function getColorPalette(Optional name As String = "Category10") As Color()
Dim colorPalette As Color()
Select Case name
+ Case "Category10"
+ colorPalette = New ScottPlot.Palettes.Category10().Colors
+ Case "Category20"
+ colorPalette = New ScottPlot.Palettes.Category20().Colors
Case "Material"
'Material Design Palette
'https://hexcolor.co/material-design-colors
@@ -230,7 +234,7 @@ Public Module Helpers
Friend Sub FormatChart(ByRef plot As ScottPlot.Plot)
'set default color palette
- plot.Palette = ScottPlot.Palette.Category10
+ plot.Palette = ScottPlot.Palette.FromColors(getColorPalette())
'legend
Dim legend As ScottPlot.Renderable.Legend
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 8391edcb..5358e7ed 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -409,7 +409,7 @@ Partial Class MainWindow
'ToolStripDropDownButton_ColorPalette
'
Me.ToolStripDropDownButton_ColorPalette.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripDropDownButton_ColorPalette.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_ColorPaletteMaterial, Me.ToolStripMenuItem_ColorPaletteDistinct, Me.ToolStripMenuItem_ColorPaletteWheel, Me.ToolStripMenuItem_ColorPaletteRandom})
+ Me.ToolStripDropDownButton_ColorPalette.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_ColorPaletteCategory10, Me.ToolStripMenuItem_ColorPaletteCategory20, Me.ToolStripMenuItem_ColorPaletteMaterial, Me.ToolStripMenuItem_ColorPaletteDistinct, Me.ToolStripMenuItem_ColorPaletteWheel, Me.ToolStripMenuItem_ColorPaletteRandom})
Me.ToolStripDropDownButton_ColorPalette.Image = Global.BlueM.Wave.My.Resources.Resources.color_wheel
Me.ToolStripDropDownButton_ColorPalette.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripDropDownButton_ColorPalette.Name = "ToolStripDropDownButton_ColorPalette"
@@ -419,25 +419,25 @@ Partial Class MainWindow
'ToolStripMenuItem_ColorPaletteMaterial
'
Me.ToolStripMenuItem_ColorPaletteMaterial.Name = "ToolStripMenuItem_ColorPaletteMaterial"
- Me.ToolStripMenuItem_ColorPaletteMaterial.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteMaterial.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ColorPaletteMaterial.Text = "Material"
'
'ToolStripMenuItem_ColorPaletteDistinct
'
Me.ToolStripMenuItem_ColorPaletteDistinct.Name = "ToolStripMenuItem_ColorPaletteDistinct"
- Me.ToolStripMenuItem_ColorPaletteDistinct.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteDistinct.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ColorPaletteDistinct.Text = "Distinct"
'
'ToolStripMenuItem_ColorPaletteWheel
'
Me.ToolStripMenuItem_ColorPaletteWheel.Name = "ToolStripMenuItem_ColorPaletteWheel"
- Me.ToolStripMenuItem_ColorPaletteWheel.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteWheel.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ColorPaletteWheel.Text = "Color Wheel"
'
'ToolStripMenuItem_ColorPaletteRandom
'
Me.ToolStripMenuItem_ColorPaletteRandom.Name = "ToolStripMenuItem_ColorPaletteRandom"
- Me.ToolStripMenuItem_ColorPaletteRandom.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteRandom.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ColorPaletteRandom.Text = "Random"
'
'ToolStripSeparator9
@@ -1093,4 +1093,6 @@ Partial Class MainWindow
Friend WithEvents ToolStripButton_Delete As ToolStripButton
Friend WithEvents ToolStripSeparator12 As ToolStripSeparator
Friend WithEvents ToolStripSeparator13 As ToolStripSeparator
+ Friend WithEvents ToolStripMenuItem_ColorPaletteCategory10 As ToolStripMenuItem
+ Friend WithEvents ToolStripMenuItem_ColorPaletteCategory20 As ToolStripMenuItem
End Class
From 3ac25011340f0c2787bd5391baf07ec99456d9dd Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 20:14:23 +0100
Subject: [PATCH 32/57] plottables in overview chart are now also stored,
overview chart uses the same colors
---
source/Controllers/WaveController.vb | 125 ++++++++++++++++++---------
1 file changed, 85 insertions(+), 40 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index f26135eb..63139a07 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -46,9 +46,14 @@ Friend Class WaveController
End Property
'''
- ''' Dictionary of series in the chart, key corresponds to TimeSeries ID
+ ''' Dictionary of series in the main chart, key corresponds to TimeSeries ID
'''
- Friend ChartSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Friend Plottables As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+
+ '''
+ ''' Dictionary of series in the overview chart, key corresponds to TimeSeries ID
+ '''
+ Friend PlottablesOverview As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
Private selectionMade As Boolean 'Flag zeigt an, ob bereits ein Auswahlbereich ausgewählt wurde
@@ -86,7 +91,8 @@ Friend Class WaveController
Me.View.SetController(Me)
'Initialize chart series container
- Me.ChartSeries = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Me.Plottables = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Me.PlottablesOverview = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'Initialize zoom history
Me.ZoomHistory = New List(Of (xmin As Double, xmax As Double))
@@ -264,7 +270,8 @@ Friend Class WaveController
End If
'Clear chart series
- Me.ChartSeries.Clear()
+ Me.Plottables.Clear()
+ Me.PlottablesOverview.Clear()
'Charts zurücksetzen
Call View.InitializeCharts()
@@ -612,7 +619,7 @@ Friend Class WaveController
For Each index As Integer In View.CheckedListBox_Series.CheckedIndices
Dim ts As TimeSeries = CType(View.CheckedListBox_Series.Items(index), TimeSeries)
- Dim color As Color = CType(Me.ChartSeries(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
+ Dim color As Color = CType(Me.Plottables(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
'find beginning and end of nan values
nanFoundInSeries = False
@@ -741,7 +748,7 @@ Friend Class WaveController
ts = ts.removeNaNValues()
_model.TimeSeries(id) = ts
'replace values of series in chart
- Dim series As ScottPlot.Plottable.ScatterPlot = Me.ChartSeries(id)
+ Dim series As ScottPlot.Plottable.ScatterPlot = Me.Plottables(id)
series.Update(ts.Dates.Select(Function(t As DateTime) t.ToOADate()).ToArray(), ts.Values.ToArray())
'TODO: update series in overview chart
Next
@@ -2313,16 +2320,16 @@ Friend Class WaveController
Line1.StepDisplay = True
Line1.StepDisplayRight = True
Case TimeSeries.InterpretationEnum.BlockLeft,
- TimeSeries.InterpretationEnum.CumulativePerTimestep
+ TimeSeries.InterpretationEnum.CumulativePerTimestep
Line1.StepDisplay = True
Line1.StepDisplayRight = False
End Select
'Store chart series
- Me.ChartSeries.Add(ts.Id, Line1)
+ Me.Plottables.Add(ts.Id, Line1)
'Add series to overview chart
- Call Me.AddSeriesToOverview(ts)
+ Call Me.AddSeriesToOverview(ts, Line1.Color)
'Charts aktualisieren
Call Me.UpdateChartExtents()
@@ -2342,43 +2349,41 @@ Friend Class WaveController
End Sub
'''
- ''' Adds a time series to the overview chart
+ ''' Adds a series to the overview chart
'''
''' the TimeSeries to add
- Private Sub AddSeriesToOverview(ts As TimeSeries)
+ ''' the color to use
+ Private Sub AddSeriesToOverview(ts As TimeSeries, color As Color)
- 'Linien instanzieren
Dim Line2 As ScottPlot.Plottable.ScatterPlot
Line2 = View.OverviewPlot.Plot.AddScatterLines(ts.Dates.Select(Function(t As DateTime) t.ToOADate()).ToArray(), ts.Values.ToArray())
+ 'Set color
+ Line2.Color = color
+
'Do not paint NaN values
Line2.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
- 'TODO: TChart
- ''Store id as Tag property
- 'Line2.Tag = ts.Id
-
- 'Namen vergeben
- Line2.Label = ts.Title
-
- 'set display options
- If Not ts.DisplayOptions.Color.IsEmpty Then
- Line2.Color = ts.DisplayOptions.Color
- End If
- Line2.LineStyle = ts.DisplayOptions.LineStyle
- Line2.LineWidth = ts.DisplayOptions.LineWidth
-
'Interpretation
Select Case ts.Interpretation
Case TimeSeries.InterpretationEnum.BlockRight
Line2.StepDisplay = True
Line2.StepDisplayRight = True
Case TimeSeries.InterpretationEnum.BlockLeft,
- TimeSeries.InterpretationEnum.CumulativePerTimestep
+ TimeSeries.InterpretationEnum.CumulativePerTimestep
Line2.StepDisplay = True
Line2.StepDisplayRight = False
End Select
+ 'reset y axis
+ View.OverviewPlot.Plot.YAxis.Dims.ResetLimits()
+
+ 'Move extent rectangle to top
+ View.OverviewPlot.Plot.MoveLast(View.ViewExtentRectangle)
+
+ 'store plottable
+ Me.PlottablesOverview.Add(ts.Id, Line2)
+
View.OverviewPlot.Refresh()
End Sub
@@ -2534,9 +2539,10 @@ Friend Class WaveController
Dim id As Integer = View.CheckedListBox_Series.Items(e.Index).Id
- If Me.ChartSeries.ContainsKey(id) Then
- Me.ChartSeries(id).IsVisible = (e.NewValue = CheckState.Checked)
+ If Me.Plottables.ContainsKey(id) Then
+ Me.Plottables(id).IsVisible = (e.NewValue = CheckState.Checked)
End If
+ 'TODO: rescale y axes?
'TODO: hide unused y axes if no active series uses them
View.MainPlot.Refresh()
End Sub
@@ -2663,8 +2669,8 @@ Friend Class WaveController
Dim ts As TimeSeries = Model.TimeSeries(id)
'update series in main chart
- If Me.ChartSeries.ContainsKey(id) Then
- Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.ChartSeries(id), ScottPlot.Plottable.ScatterPlot)
+ If Me.Plottables.ContainsKey(id) Then
+ Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.Plottables(id), ScottPlot.Plottable.ScatterPlot)
If Not IsNothing(series) Then
'label
series.Label = ts.Title
@@ -2686,7 +2692,25 @@ Friend Class WaveController
End If
End If
- 'TODO: apply the same changes in the overview chart?
+ 'update series in overview chart
+ If Me.PlottablesOverview.ContainsKey(id) Then
+ Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.PlottablesOverview(id), ScottPlot.Plottable.ScatterPlot)
+ If Not IsNothing(series) Then
+ 'interpretation
+ Select Case ts.Interpretation
+ Case TimeSeries.InterpretationEnum.BlockRight
+ series.StepDisplay = True
+ series.StepDisplayRight = True
+ Case TimeSeries.InterpretationEnum.BlockLeft,
+ TimeSeries.InterpretationEnum.CumulativePerTimestep
+ series.StepDisplay = True
+ series.StepDisplayRight = False
+ Case Else
+ series.StepDisplay = False
+ End Select
+ View.OverviewPlot.Refresh()
+ End If
+ End If
'update the TOC
View.CheckedListBox_Series.Refresh()
@@ -2700,10 +2724,20 @@ Friend Class WaveController
Private Sub SeriesRemoved(id As Integer)
'Remove series from main chart
- If Me.ChartSeries.ContainsKey(id) Then
- View.MainPlot.Plot.Remove(Me.ChartSeries(id))
+ If Me.Plottables.ContainsKey(id) Then
+ View.MainPlot.Plot.Remove(Me.Plottables(id))
+ 'TODO: rescale all y axes?
View.MainPlot.Refresh()
End If
+ Me.Plottables.Remove(id)
+
+ 'Remove series from overview chart
+ If Me.PlottablesOverview.ContainsKey(id) Then
+ View.OverviewPlot.Plot.Remove(Me.PlottablesOverview(id))
+ 'TODO: rescale both x and y axes
+ View.OverviewPlot.Refresh()
+ End If
+ Me.PlottablesOverview.Remove(id)
'Remove series from TOC
Dim indexFound As Boolean = False
@@ -2719,9 +2753,6 @@ Friend Class WaveController
View.CheckedListBox_Series.Items.RemoveAt(index)
End If
- 'remove series from internal storage
- Me.ChartSeries.Remove(id)
-
End Sub
'''
@@ -2754,6 +2785,8 @@ Friend Class WaveController
index += 1
Next
+ 'TODO: reorder series in overview chart
+
'update series order in TOC
'find the index of the series in the TOC by comparing titles
Dim indexFound As Boolean = False
@@ -2890,9 +2923,9 @@ Friend Class WaveController
View.MainPlot.Plot.Palette = palette
View.OverviewPlot.Plot.Palette = palette
- 'change colors of existing series
+ 'change colors of existing series in main chart
Dim counter As Integer = 0
- For Each series As ScottPlot.Plottable.ScatterPlot In Me.ChartSeries.Values
+ For Each series As ScottPlot.Plottable.ScatterPlot In Me.Plottables.Values
If counter >= colors.Length Then
'loop color palette
counter = 0
@@ -2901,7 +2934,19 @@ Friend Class WaveController
counter += 1
Next
View.MainPlot.Refresh()
- 'TODO: also change colors in overview plot
+
+ 'change colors of existing series in overview chart
+ counter = 0
+ For Each series As ScottPlot.Plottable.ScatterPlot In Me.PlottablesOverview.Values
+ If counter >= colors.Length Then
+ 'loop color palette
+ counter = 0
+ End If
+ series.Color = colors(counter)
+ counter += 1
+ Next
+ View.OverviewPlot.Refresh()
+
End Sub
'''
From 73ca36e1b1fcf6e599693d89d6a354e6e773e716 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 20:53:16 +0100
Subject: [PATCH 33/57] better axis scaling, hide currently unused axes
---
source/Controllers/WaveController.vb | 69 +++++++++++++---------------
1 file changed, 32 insertions(+), 37 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 63139a07..c5ea274a 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2421,13 +2421,6 @@ Friend Class WaveController
'TODO: for now, assign series to axes by matching the axis label to the unit
- 'determine min and max values with some padding
- Dim serieslimits As ScottPlot.AxisLimits = series.GetAxisLimits()
- Dim span As Double = serieslimits.YMax - serieslimits.YMin
- Dim padding As Double = 0.05 * span
- Dim min As Double = serieslimits.YMin - padding
- Dim max As Double = serieslimits.YMax + padding
-
'check for reusable axes
Dim axes As IEnumerable(Of ScottPlot.Renderable.Axis)
axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
@@ -2436,37 +2429,26 @@ Friend Class WaveController
For Each axis As ScottPlot.Renderable.Axis In axes
If axis.AxisLabel.Label = "" Then
'this axis hasn't been used yet
- axis.IsVisible = True
+ axis.AxisLabel.Label = unit
+ axis.AxisLabel.IsVisible = True
axis.Ticks(enable:=True)
axis.AxisTicks.IsVisible = True
- axis.AxisLabel.IsVisible = True
- axis.AxisLabel.Label = unit
-
- 'set axis bounds
- axis.Dims.SetAxis(min, max)
- axis.SetBoundary(min, max)
- axis.SetInnerBoundary(min, max)
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
+
+ axis.Dims.ResetLimits()
+
axisFound = True
Exit For
ElseIf axis.AxisLabel.Label = unit Then
'suitable existing axis found
- 'update axis bounds
- Dim axisMin As Double = axis.Dims.Min
- Dim axisMax As Double = axis.Dims.Max
- Dim newMin As Double = Math.Min(axisMin, min)
- Dim newMax As Double = Math.Max(axisMax, max)
+ 'assign series to new axis
+ series.YAxisIndex = axis.AxisIndex
axis.Dims.ResetLimits()
- axis.Dims.SetAxis(newMin, newMax)
- axis.SetBoundary(newMin, newMax)
- axis.SetInnerBoundary(newMin, newMax)
- 'assign series to new axis
- series.YAxisIndex = axis.AxisIndex
axisFound = True
Exit For
End If
@@ -2485,21 +2467,12 @@ Friend Class WaveController
axis.AxisLabel.Label = unit
- 'TODO: TChart
- 'axis.Tag = unit
axis.IsVisible = True
- 'Calculate position
- 'axis.SetOffset(Math.Ceiling((number) / 2) * 8)
-
- 'set axis bounds
- axis.Dims.SetAxis(min, max)
- axis.SetBoundary(min, max)
- axis.SetInnerBoundary(min, max)
-
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
+ axis.Dims.ResetLimits()
End If
'check for unused axes and remove them
@@ -2542,8 +2515,30 @@ Friend Class WaveController
If Me.Plottables.ContainsKey(id) Then
Me.Plottables(id).IsVisible = (e.NewValue = CheckState.Checked)
End If
- 'TODO: rescale y axes?
- 'TODO: hide unused y axes if no active series uses them
+
+ 'collect units of active series
+ Dim activeUnits As New HashSet(Of String)
+ Dim index As Integer = 0
+ Dim isActive As Boolean
+ For Each ts As TimeSeries In View.CheckedListBox_Series.Items
+ If ts.Id = id Then
+ 'checkstate of the item being changed has not been updated in the CheckedListBox yet
+ isActive = (e.NewValue = CheckState.Checked)
+ Else
+ isActive = View.CheckedListBox_Series.GetItemChecked(index)
+ End If
+ If isActive Then
+ activeUnits.Add(ts.Unit)
+ End If
+ index += 1
+ Next
+
+ 'rescale and set visibility of axes
+ For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ axis.Dims.ResetLimits()
+ axis.IsVisible = activeUnits.Contains(axis.AxisLabel.Label)
+ Next
+
View.MainPlot.Refresh()
End Sub
From 9bf3481e72dc10641b76ab58691e3baca754cd01 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 21:01:09 +0100
Subject: [PATCH 34/57] implement navigation to start/end
---
source/Controllers/WaveController.vb | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index c5ea274a..9dcbcb03 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -1536,14 +1536,12 @@ Friend Class WaveController
'collect start and end dates of all currently active series
Dim startdates As New List(Of Double)
Dim enddates As New List(Of Double)
- 'TODO: TChart
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' If Not series.Active Then
- ' Continue For
- ' End If
- ' startdates.Add(series.MinXValue)
- ' enddates.Add(series.MaxXValue)
- 'Next
+
+ For Each index As Integer In View.CheckedListBox_Series.CheckedIndices
+ Dim ts As TimeSeries = View.CheckedListBox_Series.Items(index)
+ startdates.Add(ts.StartDate.ToOADate())
+ enddates.Add(ts.EndDate.ToOADate())
+ Next
If startdates.Count = 0 Or enddates.Count = 0 Then
'Do nothing
From 6f189b64435695081501ddb002256e3bc9333e96 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 21:15:08 +0100
Subject: [PATCH 35/57] fix some chart refresh issues
---
source/Controllers/WaveController.vb | 8 ++++----
source/Views/MainWindow.vb | 2 --
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 9dcbcb03..8fdaa56c 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -1670,6 +1670,7 @@ Friend Class WaveController
'set the new viewport
View.ChartMinX = DateTime.FromOADate(xMin)
View.ChartMaxX = DateTime.FromOADate(xMax)
+ View.MainPlot.Refresh()
Me.selectionMade = True
'update drag start point
Me.ChartMouseDragStartX = e.X
@@ -1765,6 +1766,7 @@ Friend Class WaveController
View.ChartMaxX = centerDate + New TimeSpan(ticks:=newExtent * rightRatio)
Me.selectionMade = True
+
Call Me.ViewportChanged()
Catch ex As ArgumentOutOfRangeException
@@ -1938,7 +1940,6 @@ Friend Class WaveController
'''
Private Sub OverviewChart_MouseWheel(sender As Object, e As MouseEventArgs)
- 'TODO: TChart
Try
' Update the drawing based upon the mouse wheel scrolling.
' "The UI should scroll when the accumulated delta is plus or minus 120.
@@ -2085,9 +2086,10 @@ Friend Class WaveController
axis.Dims.SetAxis(range.min - padding, range.max + padding)
End If
Next
- View.MainPlot.Refresh()
End If
+ View.MainPlot.Refresh()
+
End Sub
'''
@@ -2334,8 +2336,6 @@ Friend Class WaveController
Call Me.ViewportChanged()
- View.MainPlot.Refresh()
-
'Determine total number of NaN-values and write to log
If ts.NaNCount > 0 Then
Log.AddLogEntry(Log.levels.warning, $"Series '{ts.Title}' contains {ts.NaNCount} NaN values!")
diff --git a/source/Views/MainWindow.vb b/source/Views/MainWindow.vb
index 4fc0d92a..70fa5c44 100644
--- a/source/Views/MainWindow.vb
+++ b/source/Views/MainWindow.vb
@@ -76,7 +76,6 @@ Friend Class MainWindow
value = Constants.minOADate
End If
Me.MainPlot.Plot.XAxis.Dims.SetAxis(min:=value.ToOADate(), max:=Nothing)
- Me.MainPlot.Refresh()
End Set
End Property
@@ -93,7 +92,6 @@ Friend Class MainWindow
value = Constants.maxOADate
End If
Me.MainPlot.Plot.XAxis.Dims.SetAxis(min:=Nothing, max:=value.ToOADate())
- Me.MainPlot.Refresh()
End Set
End Property
From 60242fbfaeafef9df31a881fbdac2425a0ec88ff Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 21:17:20 +0100
Subject: [PATCH 36/57] remove overview chart doubleclick event handling
---
source/Controllers/WaveController.vb | 8 --------
1 file changed, 8 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 8fdaa56c..80a72c33 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -159,7 +159,6 @@ Friend Class WaveController
AddHandler Me.View.OverviewPlot.MouseDown, AddressOf OverviewChart_MouseDown
AddHandler Me.View.OverviewPlot.MouseMove, AddressOf OverviewChart_MouseMove
AddHandler Me.View.OverviewPlot.MouseUp, AddressOf OverviewChart_MouseUp
- AddHandler Me.View.OverviewPlot.DoubleClick, AddressOf OverviewChart_DoubleClick
AddHandler Me.View.MainPlot.MouseWheel, AddressOf Chart_MouseWheel
AddHandler Me.View.OverviewPlot.MouseWheel, AddressOf OverviewChart_MouseWheel
@@ -2008,13 +2007,6 @@ Friend Class WaveController
End Sub
- 'TChart2 DoubleClick
- '*******************
- Private Sub OverviewChart_DoubleClick(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Call Steema.TeeChart.Editor.Show(View.OverviewPlot)
- End Sub
-
'''
''' Add the current zoom extent to the zoom history
'''
From 504331f342e48e3a38a5f9679dee5b9bf3bd5f34 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 21:33:35 +0100
Subject: [PATCH 37/57] fix some axis visibility issues
---
source/Controllers/WaveController.vb | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 80a72c33..2cdd656f 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2422,7 +2422,6 @@ Friend Class WaveController
axis.AxisLabel.Label = unit
axis.AxisLabel.IsVisible = True
axis.Ticks(enable:=True)
- axis.AxisTicks.IsVisible = True
'assign series to new axis
series.YAxisIndex = axis.AxisIndex
@@ -2465,7 +2464,7 @@ Friend Class WaveController
axis.Dims.ResetLimits()
End If
- 'check for unused axes and remove them
+ 'check for unused axes and remove them (because units may have changed)
Dim units As New HashSet(Of String)
Dim axesToRemove As New List(Of ScottPlot.Renderable.Axis)
For Each ts As TimeSeries In Model.TimeSeries.Values
@@ -2526,7 +2525,14 @@ Friend Class WaveController
'rescale and set visibility of axes
For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
axis.Dims.ResetLimits()
- axis.IsVisible = activeUnits.Contains(axis.AxisLabel.Label)
+ Dim visibility As Boolean = activeUnits.Contains(axis.AxisLabel.Label)
+ If axis.AxisIndex <= 1 Then
+ 'left and right axis should never be made completely invisible
+ axis.AxisLabel.IsVisible = visibility
+ axis.Ticks(enable:=visibility)
+ Else
+ axis.IsVisible = visibility
+ End If
Next
View.MainPlot.Refresh()
From 936585cab7945e644469a71dfb872acb50117154 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 21:50:23 +0100
Subject: [PATCH 38/57] remove unused axes when series are removed
---
source/Controllers/WaveController.vb | 29 +++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 2cdd656f..2ae36f05 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2464,27 +2464,43 @@ Friend Class WaveController
axis.Dims.ResetLimits()
End If
- 'check for unused axes and remove them (because units may have changed)
- Dim units As New HashSet(Of String)
- Dim axesToRemove As New List(Of ScottPlot.Renderable.Axis)
+ 'remove any unused axes
+ Call Me.RemoveUnusedAxes()
+
+ End Sub
+
+ '''
+ ''' Checks for any unused axes and removes them
+ '''
+ Private Sub RemoveUnusedAxes()
+
+ 'collect used units
+ Dim usedUnits As New HashSet(Of String)
For Each ts As TimeSeries In Model.TimeSeries.Values
- units.Add(ts.Unit)
+ usedUnits.Add(ts.Unit)
Next
+
+ 'find unused axes
+ Dim axesToRemove As New List(Of ScottPlot.Renderable.Axis)
For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
- If axis.AxisLabel.Label <> "" And Not units.Contains(axis.AxisLabel.Label) Then
+ If axis.AxisLabel.Label <> "" And Not usedUnits.Contains(axis.AxisLabel.Label) Then
axesToRemove.Add(axis)
End If
Next
+
+ 'remove unused axes
If axesToRemove.Count > 0 Then
For Each axis As ScottPlot.Renderable.Axis In axesToRemove
If axis.AxisIndex <= 1 Then
'left and right Y axis should never be removed, just reset
axis.Label("")
axis.Dims.ResetLimits()
+ axis.Ticks(enable:=False)
Else
View.MainPlot.Plot.RemoveAxis(axis)
End If
Next
+ View.MainPlot.Refresh()
End If
'update axis dialog
@@ -2744,6 +2760,9 @@ Friend Class WaveController
View.CheckedListBox_Series.Items.RemoveAt(index)
End If
+ 'remove any unused axes
+ Call Me.RemoveUnusedAxes()
+
End Sub
'''
From 1b892a2d405eff3081a419aa4933b6b806f475a9 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 21:58:03 +0100
Subject: [PATCH 39/57] reset y axis limits when a series is removed
---
source/Controllers/WaveController.vb | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 2ae36f05..2758a7a1 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2733,7 +2733,8 @@ Friend Class WaveController
'Remove series from main chart
If Me.Plottables.ContainsKey(id) Then
View.MainPlot.Plot.Remove(Me.Plottables(id))
- 'TODO: rescale all y axes?
+ 'reset Y axis limits
+ View.MainPlot.Plot.GetAxesMatching(axisIndex:=Me.Plottables(id).XAxisIndex, isVertical:=True).First().Dims.ResetLimits()
View.MainPlot.Refresh()
End If
Me.Plottables.Remove(id)
@@ -2741,7 +2742,9 @@ Friend Class WaveController
'Remove series from overview chart
If Me.PlottablesOverview.ContainsKey(id) Then
View.OverviewPlot.Plot.Remove(Me.PlottablesOverview(id))
- 'TODO: rescale both x and y axes
+ 'reset Y axis limits
+ View.OverviewPlot.Plot.YAxis.Dims.ResetLimits()
+ 'TODO: reset x axis to new extents
View.OverviewPlot.Refresh()
End If
Me.PlottablesOverview.Remove(id)
From 99c5827434d6da2edd0c01f5fcec69825ba6cd58 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 22:10:51 +0100
Subject: [PATCH 40/57] update x axis extents when a series is removed
---
source/Controllers/WaveController.vb | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 2758a7a1..7d8e6864 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2220,9 +2220,6 @@ Friend Class WaveController
'Extent auf Colorband übertragen
Call Me.UpdateOverviewZoomExtent()
- 'TODO: Update Y-Axis extents
- 'View.OverviewPlot.Plot.YAxis.Dims.
-
View.MainPlot.Refresh()
View.OverviewPlot.Refresh()
End If
@@ -2744,8 +2741,8 @@ Friend Class WaveController
View.OverviewPlot.Plot.Remove(Me.PlottablesOverview(id))
'reset Y axis limits
View.OverviewPlot.Plot.YAxis.Dims.ResetLimits()
- 'TODO: reset x axis to new extents
- View.OverviewPlot.Refresh()
+ 'update chart extents
+ Call Me.UpdateChartExtents()
End If
Me.PlottablesOverview.Remove(id)
From 42a80c9d23642c851121ed94d576716a8928375b Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 24 Dec 2023 11:52:21 +0100
Subject: [PATCH 41/57] implement showMarkers
---
source/Controllers/WaveController.vb | 105 ++++++++++-----------------
1 file changed, 39 insertions(+), 66 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 7d8e6864..2c1bd3bf 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -55,6 +55,11 @@ Friend Class WaveController
'''
Friend PlottablesOverview As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ '''
+ ''' Dictionary of markers in main chart, key corresponds to TimeSeries ID
+ '''
+ Friend ChartMarkers As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+
Private selectionMade As Boolean 'Flag zeigt an, ob bereits ein Auswahlbereich ausgewählt wurde
'''
@@ -93,6 +98,7 @@ Friend Class WaveController
'Initialize chart series container
Me.Plottables = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
Me.PlottablesOverview = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Me.ChartMarkers = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'Initialize zoom history
Me.ZoomHistory = New List(Of (xmin As Double, xmax As Double))
@@ -271,6 +277,7 @@ Friend Class WaveController
'Clear chart series
Me.Plottables.Clear()
Me.PlottablesOverview.Clear()
+ Me.ChartMarkers.Clear()
'Charts zurücksetzen
Call View.InitializeCharts()
@@ -2557,74 +2564,40 @@ Friend Class WaveController
''' List of timestamps for which to show markers
Private Sub showMarkers(timestamps As List(Of DateTime))
- 'TODO: TChart
- ''Remove any existing marker series
- 'For i As Integer = View.MainPlot.Series.Count - 1 To 0 Step -1
- ' Try
- ' If CType(View.MainPlot.Series(i).Tag, String) = "_markers" Then
- ' View.MainPlot.Series.RemoveAt(i)
- ' End If
- ' Catch ex As Exception
- ' Log.AddLogEntry(Log.levels.debug, ex.Message)
- ' End Try
- 'Next
- 'View.MainPlot.Refresh()
+ 'Remove any existing marker series
+ For Each marker As ScottPlot.Plottable.IPlottable In Me.ChartMarkers.Values
+ View.MainPlot.Plot.Remove(marker)
+ Next
+ Me.ChartMarkers.Clear()
+ View.MainPlot.Refresh()
- 'If timestamps.Count = 0 Then
- ' Exit Sub
- 'End If
+ If timestamps.Count = 0 Then
+ Exit Sub
+ End If
- ''loop over series and create a marker series for each
- 'For i As Integer = 0 To View.MainPlot.Series.Count - 1
- ' Try
- ' Dim series As Steema.TeeChart.Styles.Series = View.MainPlot.Series(i)
- ' If Not series.Active Then
- ' 'do not display markers for inactive series
- ' Continue For
- ' End If
- ' 'collect all non-NaN values to display as markers
- ' Dim markerValues As New Dictionary(Of DateTime, Double)
- ' For Each t As DateTime In timestamps
- ' Dim index As Integer = series.XValues.IndexOf(t.ToOADate)
- ' If index <> -1 Then
- ' If Not series.IsNull(index) Then
- ' markerValues.Add(t, series.YValues(index))
- ' End If
- ' End If
- ' Next
- ' If markerValues.Count > 0 Then
- ' 'create a new point series for markers
- ' Dim markers As New Steema.TeeChart.Styles.Points(View.MainPlot.Chart)
- ' markers.Legend.Visible = False
- ' markers.Title = $"{series.Title} (selection)"
- ' markers.Tag = "_markers"
- ' markers.VertAxis = series.VertAxis
- ' If series.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Custom Then
- ' markers.CustomVertAxis = series.CustomVertAxis
- ' End If
- ' markers.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
- ' markers.Pointer.Brush.Visible = False
- ' markers.Color = series.Color
- ' markers.Pointer.Color = series.Color
- ' markers.Pointer.Pen.Color = series.Color
- ' markers.Pointer.Pen.Width = 2
- ' markers.Marks.Visible = True
- ' markers.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Value
- ' 'markers.Marks.OnTop = True 'causes crash when markers are panned out of view on the left
- ' markers.Marks.Callout.Visible = False
- ' markers.Marks.FontSeriesColor = True
- ' markers.Marks.Arrow.Visible = False
- ' markers.Marks.ArrowLength = 5
- ' markers.Marks.Pen.Color = series.Color
- ' 'add data points
- ' For Each t As DateTime In markerValues.Keys
- ' markers.Add(t, markerValues(t))
- ' Next
- ' End If
- ' Catch ex As Exception
- ' Log.AddLogEntry(Log.levels.debug, ex.Message)
- ' End Try
- 'Next
+ 'loop over active series and create a marker series for each
+ For Each ts As TimeSeries In View.CheckedListBox_Series.CheckedItems
+ Dim Xs As New List(Of DateTime)
+ Dim Ys As New List(Of Double)
+ For Each t As DateTime In timestamps
+ If ts.Nodes.ContainsKey(t) Then
+ If Not Double.IsNaN(ts.Nodes(t)) Then
+ Xs.Add(t)
+ Ys.Add(ts.Nodes(t))
+ End If
+ End If
+ Next
+ Dim markers As ScottPlot.Plottable.ScatterPlot
+ markers = View.MainPlot.Plot.AddScatterPoints(Xs.Select(Function(t As DateTime) t.ToOADate()).ToArray(), Ys.ToArray())
+ markers.DataPointLabels = Ys.Select(Function(y As Double) y.ToString()).ToArray()
+ markers.MarkerSize = 8
+ markers.YAxisIndex = Me.Plottables(ts.Id).YAxisIndex
+ Dim lineColor As Color = CType(Me.Plottables(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
+ markers.MarkerColor = lineColor
+ markers.DataPointLabelFont.Color = ControlPaint.Dark(lineColor)
+ Me.ChartMarkers.Add(ts.Id, markers)
+ Next
+ View.MainPlot.Refresh()
End Sub
From 74b314071602310e625986940117668aa6b786ba Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 24 Dec 2023 11:54:24 +0100
Subject: [PATCH 42/57] rename variables
---
source/Controllers/WaveController.vb | 54 ++++++++++++++--------------
1 file changed, 27 insertions(+), 27 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 2c1bd3bf..1d7ac51a 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -48,12 +48,12 @@ Friend Class WaveController
'''
''' Dictionary of series in the main chart, key corresponds to TimeSeries ID
'''
- Friend Plottables As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Friend ChartSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'''
''' Dictionary of series in the overview chart, key corresponds to TimeSeries ID
'''
- Friend PlottablesOverview As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Friend OverviewSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'''
''' Dictionary of markers in main chart, key corresponds to TimeSeries ID
@@ -96,8 +96,8 @@ Friend Class WaveController
Me.View.SetController(Me)
'Initialize chart series container
- Me.Plottables = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
- Me.PlottablesOverview = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Me.ChartSeries = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Me.OverviewSeries = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
Me.ChartMarkers = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'Initialize zoom history
@@ -275,8 +275,8 @@ Friend Class WaveController
End If
'Clear chart series
- Me.Plottables.Clear()
- Me.PlottablesOverview.Clear()
+ Me.ChartSeries.Clear()
+ Me.OverviewSeries.Clear()
Me.ChartMarkers.Clear()
'Charts zurücksetzen
@@ -625,7 +625,7 @@ Friend Class WaveController
For Each index As Integer In View.CheckedListBox_Series.CheckedIndices
Dim ts As TimeSeries = CType(View.CheckedListBox_Series.Items(index), TimeSeries)
- Dim color As Color = CType(Me.Plottables(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
+ Dim color As Color = CType(Me.ChartSeries(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
'find beginning and end of nan values
nanFoundInSeries = False
@@ -754,7 +754,7 @@ Friend Class WaveController
ts = ts.removeNaNValues()
_model.TimeSeries(id) = ts
'replace values of series in chart
- Dim series As ScottPlot.Plottable.ScatterPlot = Me.Plottables(id)
+ Dim series As ScottPlot.Plottable.ScatterPlot = Me.ChartSeries(id)
series.Update(ts.Dates.Select(Function(t As DateTime) t.ToOADate()).ToArray(), ts.Values.ToArray())
'TODO: update series in overview chart
Next
@@ -2322,7 +2322,7 @@ Friend Class WaveController
End Select
'Store chart series
- Me.Plottables.Add(ts.Id, Line1)
+ Me.ChartSeries.Add(ts.Id, Line1)
'Add series to overview chart
Call Me.AddSeriesToOverview(ts, Line1.Color)
@@ -2376,7 +2376,7 @@ Friend Class WaveController
View.OverviewPlot.Plot.MoveLast(View.ViewExtentRectangle)
'store plottable
- Me.PlottablesOverview.Add(ts.Id, Line2)
+ Me.OverviewSeries.Add(ts.Id, Line2)
View.OverviewPlot.Refresh()
@@ -2521,8 +2521,8 @@ Friend Class WaveController
Dim id As Integer = View.CheckedListBox_Series.Items(e.Index).Id
- If Me.Plottables.ContainsKey(id) Then
- Me.Plottables(id).IsVisible = (e.NewValue = CheckState.Checked)
+ If Me.ChartSeries.ContainsKey(id) Then
+ Me.ChartSeries(id).IsVisible = (e.NewValue = CheckState.Checked)
End If
'collect units of active series
@@ -2591,8 +2591,8 @@ Friend Class WaveController
markers = View.MainPlot.Plot.AddScatterPoints(Xs.Select(Function(t As DateTime) t.ToOADate()).ToArray(), Ys.ToArray())
markers.DataPointLabels = Ys.Select(Function(y As Double) y.ToString()).ToArray()
markers.MarkerSize = 8
- markers.YAxisIndex = Me.Plottables(ts.Id).YAxisIndex
- Dim lineColor As Color = CType(Me.Plottables(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
+ markers.YAxisIndex = Me.ChartSeries(ts.Id).YAxisIndex
+ Dim lineColor As Color = CType(Me.ChartSeries(ts.Id), ScottPlot.Plottable.ScatterPlot).LineColor
markers.MarkerColor = lineColor
markers.DataPointLabelFont.Color = ControlPaint.Dark(lineColor)
Me.ChartMarkers.Add(ts.Id, markers)
@@ -2646,8 +2646,8 @@ Friend Class WaveController
Dim ts As TimeSeries = Model.TimeSeries(id)
'update series in main chart
- If Me.Plottables.ContainsKey(id) Then
- Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.Plottables(id), ScottPlot.Plottable.ScatterPlot)
+ If Me.ChartSeries.ContainsKey(id) Then
+ Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.ChartSeries(id), ScottPlot.Plottable.ScatterPlot)
If Not IsNothing(series) Then
'label
series.Label = ts.Title
@@ -2670,8 +2670,8 @@ Friend Class WaveController
End If
'update series in overview chart
- If Me.PlottablesOverview.ContainsKey(id) Then
- Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.PlottablesOverview(id), ScottPlot.Plottable.ScatterPlot)
+ If Me.OverviewSeries.ContainsKey(id) Then
+ Dim series As ScottPlot.Plottable.ScatterPlot = TryCast(Me.OverviewSeries(id), ScottPlot.Plottable.ScatterPlot)
If Not IsNothing(series) Then
'interpretation
Select Case ts.Interpretation
@@ -2701,23 +2701,23 @@ Friend Class WaveController
Private Sub SeriesRemoved(id As Integer)
'Remove series from main chart
- If Me.Plottables.ContainsKey(id) Then
- View.MainPlot.Plot.Remove(Me.Plottables(id))
+ If Me.ChartSeries.ContainsKey(id) Then
+ View.MainPlot.Plot.Remove(Me.ChartSeries(id))
'reset Y axis limits
- View.MainPlot.Plot.GetAxesMatching(axisIndex:=Me.Plottables(id).XAxisIndex, isVertical:=True).First().Dims.ResetLimits()
+ View.MainPlot.Plot.GetAxesMatching(axisIndex:=Me.ChartSeries(id).XAxisIndex, isVertical:=True).First().Dims.ResetLimits()
View.MainPlot.Refresh()
End If
- Me.Plottables.Remove(id)
+ Me.ChartSeries.Remove(id)
'Remove series from overview chart
- If Me.PlottablesOverview.ContainsKey(id) Then
- View.OverviewPlot.Plot.Remove(Me.PlottablesOverview(id))
+ If Me.OverviewSeries.ContainsKey(id) Then
+ View.OverviewPlot.Plot.Remove(Me.OverviewSeries(id))
'reset Y axis limits
View.OverviewPlot.Plot.YAxis.Dims.ResetLimits()
'update chart extents
Call Me.UpdateChartExtents()
End If
- Me.PlottablesOverview.Remove(id)
+ Me.OverviewSeries.Remove(id)
'Remove series from TOC
Dim indexFound As Boolean = False
@@ -2908,7 +2908,7 @@ Friend Class WaveController
'change colors of existing series in main chart
Dim counter As Integer = 0
- For Each series As ScottPlot.Plottable.ScatterPlot In Me.Plottables.Values
+ For Each series As ScottPlot.Plottable.ScatterPlot In Me.ChartSeries.Values
If counter >= colors.Length Then
'loop color palette
counter = 0
@@ -2920,7 +2920,7 @@ Friend Class WaveController
'change colors of existing series in overview chart
counter = 0
- For Each series As ScottPlot.Plottable.ScatterPlot In Me.PlottablesOverview.Values
+ For Each series As ScottPlot.Plottable.ScatterPlot In Me.OverviewSeries.Values
If counter >= colors.Length Then
'loop color palette
counter = 0
From 18a699b56290775d04decba2372b974526715626 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 24 Dec 2023 11:55:03 +0100
Subject: [PATCH 43/57] make variables private
---
source/Controllers/WaveController.vb | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 1d7ac51a..4a6d3984 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -48,17 +48,17 @@ Friend Class WaveController
'''
''' Dictionary of series in the main chart, key corresponds to TimeSeries ID
'''
- Friend ChartSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Private ChartSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'''
''' Dictionary of series in the overview chart, key corresponds to TimeSeries ID
'''
- Friend OverviewSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Private OverviewSeries As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
'''
''' Dictionary of markers in main chart, key corresponds to TimeSeries ID
'''
- Friend ChartMarkers As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Private ChartMarkers As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
Private selectionMade As Boolean 'Flag zeigt an, ob bereits ein Auswahlbereich ausgewählt wurde
From 626d1157e4ac4624e074611207cb2f324900c9d0 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 24 Dec 2023 12:28:47 +0100
Subject: [PATCH 44/57] replace save chart (TEN) button with save image (PNG)
button
---
source/Controllers/WaveController.vb | 22 ++++++++----
source/My Project/Resources.Designer.vb | 10 ++++++
source/My Project/Resources.resx | 3 ++
source/Resources/picture_save.png | Bin 0 -> 755 bytes
source/Views/MainWindow.Designer.vb | 44 +++++++++++++++---------
source/Views/MainWindow.resx | 35 ++++++++++++-------
source/Wave.vbproj | 1 +
7 files changed, 79 insertions(+), 36 deletions(-)
create mode 100644 source/Resources/picture_save.png
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 4a6d3984..799d4f8d 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -119,7 +119,7 @@ Friend Class WaveController
AddHandler Me.View.ToolStripMenuItem_RecentlyUsedFiles.DropDownItemClicked, AddressOf openRecentlyUsedFile
AddHandler Me.View.ToolStripMenuItem_PasteFromClipboard.Click, AddressOf PasteFromClipboard_Click
AddHandler Me.View.ToolStripMenuItem_SaveProjectFile.Click, AddressOf SaveProjectFile_Click
- AddHandler Me.View.ToolStripMenuItem_SaveChart.Click, AddressOf SaveChart_Click
+ AddHandler Me.View.ToolStripMenuItem_SaveImage.Click, AddressOf SaveImage_Click
AddHandler Me.View.ToolStripMenuItem_ExportSeries.Click, AddressOf ExportZeitreihe_Click
AddHandler Me.View.ToolStripMenuItem_EnterSeries.Click, AddressOf Eingeben_Click
AddHandler Me.View.ToolStripButton_Cut.Click, AddressOf Zuschneiden_Click
@@ -404,12 +404,20 @@ Friend Class WaveController
End Sub
- 'Teechart Export
- '***************
- Private Sub SaveChart_Click(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Dim fmt As New Steema.TeeChart.Export.TemplateExport(View.MainPlot.MainPlot)
- 'Call View.MainPlot.Export.ShowExportDialog(fmt)
+ '''
+ ''' Save image button clicked
+ '''
+ '''
+ '''
+ Private Sub SaveImage_Click(sender As System.Object, e As System.EventArgs)
+ View.SaveFileDialog1.Title = "Save image"
+ View.SaveFileDialog1.Filter = "PNG images (*.png)|*.png"
+ View.SaveFileDialog1.DefaultExt = "png"
+ View.SaveFileDialog1.OverwritePrompt = True
+ Dim dlgResult As DialogResult = View.SaveFileDialog1.ShowDialog()
+ If dlgResult = DialogResult.OK Then
+ View.MainPlot.Plot.SaveFig(View.SaveFileDialog1.FileName)
+ End If
End Sub
'Zeitreihen Export
diff --git a/source/My Project/Resources.Designer.vb b/source/My Project/Resources.Designer.vb
index 58568336..f5f22808 100644
--- a/source/My Project/Resources.Designer.vb
+++ b/source/My Project/Resources.Designer.vb
@@ -500,6 +500,16 @@ Namespace My.Resources
End Get
End Property
+ '''
+ ''' Looks up a localized resource of type System.Drawing.Bitmap.
+ '''
+ Friend ReadOnly Property picture_save() As System.Drawing.Bitmap
+ Get
+ Dim obj As Object = ResourceManager.GetObject("picture_save", resourceCulture)
+ Return CType(obj,System.Drawing.Bitmap)
+ End Get
+ End Property
+
'''
''' Looks up a localized resource of type System.Drawing.Bitmap.
'''
diff --git a/source/My Project/Resources.resx b/source/My Project/Resources.resx
index ebf11d13..9a7baee0 100644
--- a/source/My Project/Resources.resx
+++ b/source/My Project/Resources.resx
@@ -250,6 +250,9 @@
..\Resources\pan.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
+ ..\Resources\picture_save.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
+
..\Resources\script.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
diff --git a/source/Resources/picture_save.png b/source/Resources/picture_save.png
new file mode 100644
index 0000000000000000000000000000000000000000..777fb5d2e6a8418c573972246582c21d2c4984e4
GIT binary patch
literal 755
zcmVe)^Pp+~01yB`w`9=u(Ho~0
z&q0|Zy>{}2gZl=9K}x9u0000cnYNkw{OYaOaSqCHmHYkvAYHn)ZsML%y6Mn?Rm1M4
zCbIimL%-gdGZROY_IT&jL)x4YKv_2wMMsgSixr3VuIl&xwpoodZKLe>9X|MwKbLly
z@9mW{08m0kQ6yEY>2=p_>};yqiMnYtv8~_l+pdQ83=1I;07}RxQW8y8wNsO(vNNsJ
zxzT2%smQIeNFo9Nln_CYl7W3j+smTUwfx(8yZemmMmgIvlXtBAH}d|cf5_39J9FWB
zT>bgZGbKb&6v=F7!JU=6<_61l#uG1|c+xA2v%dWPU+)_++yuBPsf8gS*uy8tE)TNP^?wUn|FBDi_)Ep5))oIO#kS?(pBVA^IE&o0V2
z1UkY@NmW(0wrgcXNO*bi9DvTz4L^KUm{e2mUH(gvXxc2dSs)?^X1ZCKKmdStIIqc}
zY8#!Ri;%QZN+O4dtZAm|x={|gX;Yrg9Xs$WDG3lp>Fmkfnp~qGh?EV=o(rGc
zc5iE2*(=lK&%R!Iu5ROK1ORQ0xsI-E$A>rGws+=HNnvgLk2jzGKw)59)ygxcj-Lkr
zfNySo7mq#2f!UFlj-4>yTcBWLvS9zN#!QbgB`G2R0KijcuYCLXBg5zC`|}3n1DZUQ
la+ac%)7bB~m#l70{SP&gLHlD?H{SpN002ovPDHLkV1hOfWCQ>J
literal 0
HcmV?d00001
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 5358e7ed..754253ea 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -46,7 +46,6 @@ Partial Class MainWindow
Me.ToolStripMenuItem_RecentlyUsedFiles = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripDropDownButton_Save = New System.Windows.Forms.ToolStripDropDownButton()
Me.ToolStripMenuItem_SaveProjectFile = New System.Windows.Forms.ToolStripMenuItem()
- Me.ToolStripMenuItem_SaveChart = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_ExportSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripButton_Copy = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_Cut = New System.Windows.Forms.ToolStripButton()
@@ -117,6 +116,7 @@ Partial Class MainWindow
Me.ToolStripMenuItem_ActivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_DeactivateAllSeries = New System.Windows.Forms.ToolStripMenuItem()
Me.CheckedListBox_Series = New System.Windows.Forms.CheckedListBox()
+ Me.ToolStripMenuItem_SaveImage = New System.Windows.Forms.ToolStripMenuItem()
ToolStripSeparator1 = New System.Windows.Forms.ToolStripSeparator()
toolStripSeparator = New System.Windows.Forms.ToolStripSeparator()
ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
@@ -289,7 +289,7 @@ Partial Class MainWindow
'ToolStripDropDownButton_Save
'
Me.ToolStripDropDownButton_Save.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripDropDownButton_Save.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_SaveProjectFile, Me.ToolStripMenuItem_SaveChart, Me.ToolStripMenuItem_ExportSeries})
+ Me.ToolStripDropDownButton_Save.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripMenuItem_SaveProjectFile, Me.ToolStripMenuItem_SaveImage, Me.ToolStripMenuItem_ExportSeries})
Me.ToolStripDropDownButton_Save.Image = CType(resources.GetObject("ToolStripDropDownButton_Save.Image"), System.Drawing.Image)
Me.ToolStripDropDownButton_Save.ImageTransparentColor = System.Drawing.Color.Magenta
Me.ToolStripDropDownButton_Save.Name = "ToolStripDropDownButton_Save"
@@ -300,21 +300,14 @@ Partial Class MainWindow
'
Me.ToolStripMenuItem_SaveProjectFile.Image = Global.BlueM.Wave.My.Resources.Resources.chart_curve_link
Me.ToolStripMenuItem_SaveProjectFile.Name = "ToolStripMenuItem_SaveProjectFile"
- Me.ToolStripMenuItem_SaveProjectFile.Size = New System.Drawing.Size(167, 22)
+ Me.ToolStripMenuItem_SaveProjectFile.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_SaveProjectFile.Text = "Save project file"
'
- 'ToolStripMenuItem_SaveChart
- '
- Me.ToolStripMenuItem_SaveChart.Image = Global.BlueM.Wave.My.Resources.Resources.chart_pie
- Me.ToolStripMenuItem_SaveChart.Name = "ToolStripMenuItem_SaveChart"
- Me.ToolStripMenuItem_SaveChart.Size = New System.Drawing.Size(167, 22)
- Me.ToolStripMenuItem_SaveChart.Text = "Save chart"
- '
'ToolStripMenuItem_ExportSeries
'
Me.ToolStripMenuItem_ExportSeries.Image = Global.BlueM.Wave.My.Resources.Resources.page_white_go
Me.ToolStripMenuItem_ExportSeries.Name = "ToolStripMenuItem_ExportSeries"
- Me.ToolStripMenuItem_ExportSeries.Size = New System.Drawing.Size(167, 22)
+ Me.ToolStripMenuItem_ExportSeries.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ExportSeries.Text = "Export time series"
'
'ToolStripSeparator4
@@ -416,28 +409,40 @@ Partial Class MainWindow
Me.ToolStripDropDownButton_ColorPalette.Size = New System.Drawing.Size(29, 31)
Me.ToolStripDropDownButton_ColorPalette.Text = "Set color palette"
'
+ 'ToolStripMenuItem_ColorPaletteCategory10
+ '
+ Me.ToolStripMenuItem_ColorPaletteCategory10.Name = "ToolStripMenuItem_ColorPaletteCategory10"
+ Me.ToolStripMenuItem_ColorPaletteCategory10.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteCategory10.Text = "Category10"
+ '
+ 'ToolStripMenuItem_ColorPaletteCategory20
+ '
+ Me.ToolStripMenuItem_ColorPaletteCategory20.Name = "ToolStripMenuItem_ColorPaletteCategory20"
+ Me.ToolStripMenuItem_ColorPaletteCategory20.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteCategory20.Text = "Category20"
+ '
'ToolStripMenuItem_ColorPaletteMaterial
'
Me.ToolStripMenuItem_ColorPaletteMaterial.Name = "ToolStripMenuItem_ColorPaletteMaterial"
- Me.ToolStripMenuItem_ColorPaletteMaterial.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_ColorPaletteMaterial.Size = New System.Drawing.Size(139, 22)
Me.ToolStripMenuItem_ColorPaletteMaterial.Text = "Material"
'
'ToolStripMenuItem_ColorPaletteDistinct
'
Me.ToolStripMenuItem_ColorPaletteDistinct.Name = "ToolStripMenuItem_ColorPaletteDistinct"
- Me.ToolStripMenuItem_ColorPaletteDistinct.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_ColorPaletteDistinct.Size = New System.Drawing.Size(139, 22)
Me.ToolStripMenuItem_ColorPaletteDistinct.Text = "Distinct"
'
'ToolStripMenuItem_ColorPaletteWheel
'
Me.ToolStripMenuItem_ColorPaletteWheel.Name = "ToolStripMenuItem_ColorPaletteWheel"
- Me.ToolStripMenuItem_ColorPaletteWheel.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_ColorPaletteWheel.Size = New System.Drawing.Size(139, 22)
Me.ToolStripMenuItem_ColorPaletteWheel.Text = "Color Wheel"
'
'ToolStripMenuItem_ColorPaletteRandom
'
Me.ToolStripMenuItem_ColorPaletteRandom.Name = "ToolStripMenuItem_ColorPaletteRandom"
- Me.ToolStripMenuItem_ColorPaletteRandom.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_ColorPaletteRandom.Size = New System.Drawing.Size(139, 22)
Me.ToolStripMenuItem_ColorPaletteRandom.Text = "Random"
'
'ToolStripSeparator9
@@ -962,6 +967,13 @@ Partial Class MainWindow
Me.CheckedListBox_Series.TabIndex = 0
Me.CheckedListBox_Series.ThreeDCheckBoxes = True
'
+ 'ToolStripMenuItem_SaveImage
+ '
+ Me.ToolStripMenuItem_SaveImage.Image = Global.BlueM.Wave.My.Resources.Resources.picture_save
+ Me.ToolStripMenuItem_SaveImage.Name = "ToolStripMenuItem_SaveImage"
+ Me.ToolStripMenuItem_SaveImage.Size = New System.Drawing.Size(180, 22)
+ Me.ToolStripMenuItem_SaveImage.Text = "Save image"
+ '
'MainWindow
'
Me.AllowDrop = True
@@ -1026,7 +1038,6 @@ Partial Class MainWindow
Friend WithEvents ToolStripMenuItem_About As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_ImportSeries As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_LoadTEN As System.Windows.Forms.ToolStripMenuItem
- Friend WithEvents ToolStripMenuItem_SaveChart As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_ExportSeries As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_ReloadFromFiles As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_EnterSeries As System.Windows.Forms.ToolStripMenuItem
@@ -1095,4 +1106,5 @@ Partial Class MainWindow
Friend WithEvents ToolStripSeparator13 As ToolStripSeparator
Friend WithEvents ToolStripMenuItem_ColorPaletteCategory10 As ToolStripMenuItem
Friend WithEvents ToolStripMenuItem_ColorPaletteCategory20 As ToolStripMenuItem
+ Friend WithEvents ToolStripMenuItem_SaveImage As ToolStripMenuItem
End Class
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 97e3ab2f..7ed8e04d 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -226,19 +226,19 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25xG
- rmKMpbcMUlRQZkhhzjnN5cIkhVujKVomoluXxIsiTWbORoaSKFIhF1crt9ZCaIsaaxX40gP7dZHrWNNV
- n+28nPP7/L7n/A5rDY+pDPUOia3UUHnYMZwXc5jYMRchCrv7iqzu7vMoU7YxPpNI6huUhLxGMeUxlCgW
- CCHi0hci7j6+wq0XUHO6opBTe1bKlP9JPDkhl+JefySdWo7wqUC01heMXlkM/Mx/HfiR5uzE8FktFpq+
- w1t/E69JbI0nL/gjCBWIXKZXky8YaaSCKw2+QLSOblTq839PnenAqKlbPCujJaFM5WGPoVix+ClSSMvX
- EnK0Pi5zrpohQ0YAfaNTU2qewqbODzNaEscQO7agFyJ0UvVa6toT8mpIKGkdB0TYC7YWDjKtYccYLYmD
- pKdND8wXiMhy60jIrhuErOoBOCJ9AIIbVuiyeABrtMAerham8A0auIjSsLuHr/AGV7hojRF6xijoHvWu
- ip1mDzR02UEz4AaOnIQUVA2MlmRex7fOdwuo+KAypMSqXKudhGqNDarwJyC5OQ6ytglo0zshR2wA1k75
- L0ZN4NQWoHP3sdDzDgxPF/VD58graDe9oFPn4TbhAjndpLXXCdxLJOw7VA+jtTlCRk3i0BRInfQ/p/F1
- sPfMXdjF0cK243cgu4IApW4GOBeNgLBb4eNcO9jbMBirRHczapJpnIdOqnhWm5oTjg/LrmLHNh9VwknJ
- Qzh4ohm+vDXC1yUS3j9TgiUvN2baqMk69jeFN6Veh5mOYvC7tBB6Y4Bl9z142S8B/DTy4XFV5ham8u88
- kueI7KpzsDTRDO8mWmC26wJYZBnfRgQHtjIl/8YszRKRZZnwVMmF4Qr0MynM3MEc/T/mymPb+4oPq4hy
- dkpih8X6DdAJlwUOpv2HAAAAAElFTkSuQmCC
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK7SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25x2
+ axVjLKUMUlRQZkhhzjnN5cIkBWo4vVomoluXxIsiTWbORoaSKFIhF1crt9ZCaIsaaxX40gP7dZHrWNNV
+ n+28nPP7/L7n/A5rDY+pFPUOia3UUFnYMYzFHCYs5iJEYXdfodXdfQFlyjbGZxJJfYOSkNcopjyGYsUC
+ IURc+gLE3cdXuPUCak5XGHLi56RM+Z/EkxNyicbrj6RTyxE+FYjW+ILRq4uBn3mvAz/SnJ08zSzOC023
+ cdffxGsSW+PJC/4IQgUiV+jV6AtGGqjgSr0vEK2lG5X4/N9TZzp41NRtrpXRklCmsrDHUKRY/BQpoOXr
+ CTlaF5fZ18yQISOAvtHpKTVXYVPnhRktiWMIiy3ohQidVLWWuvaEk9UkFLeMAyLsBVszG5nWYjFGS+Ig
+ 6WnTA/MFIrLcWhKyawchq2oAjkgfgOCmFbosHuA1WGAPB4cpzQYNXERJ2N3DV3iDKxy02gg9YxR0j3pX
+ xU6zB+q77KAdcANbTkIKqgZGSzKv41vnuwVUfFAZUmJVrsEnoUprg0rNE5DcGgdZ6wS06p2QIzYAa6f8
+ F6MmcOL56Nx9Xuh5B0+TLuqHzpFX0G56QafOwx3CBXK6SUuvEziXSdh3qA5Ga3KEjJrEoc2XOul/TuPr
+ YO/Zu7CLjcO2422QXU6AUjcD7EtGQLAW+DjXDvZWHoxVoLsZNcm0hotOqrhWm5odjg/LrsJim48q4ZTk
+ IRw80QRf3hrh6xIJ758pwYLlxkwbNVnH/sbwptQbMNNRBH4XDqE3Blh234OX/RLQnEE+PK7M3MJU/p1H
+ 8hyRXXUeliaa4N1EM8x2XQSLLOPbiODAVqbk35ilWSKyNBOeKjkwXI5+JoWZO5ij/8dccWx7X9FhFVGG
+ pSR2WKzfxfmXAXLVpW0AAAAASUVORK5CYII=
@@ -262,6 +262,12 @@
25iC8wXPdvCp1kI+tSp/locg/gWbSFuRUqfdRgAAAABJRU5ErkJggg==
+
+ False
+
+
+ False
+
6, 3
@@ -301,6 +307,9 @@
222, 3
+
+ 458, 4
+
556, 4
diff --git a/source/Wave.vbproj b/source/Wave.vbproj
index 94499ac5..194fc890 100644
--- a/source/Wave.vbproj
+++ b/source/Wave.vbproj
@@ -560,6 +560,7 @@
+
From 0c3e92282240500f42ab7e20b891d61b5cc74756 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sat, 23 Dec 2023 22:06:59 +0100
Subject: [PATCH 45/57] remove axis dialog, add an edit chart dialog and start
implementing the ability to edit axes
---
source/Classes/AxisWrapper.vb | 115 +++++-----
source/Controllers/WaveController.vb | 204 ++++++------------
source/Dialogs/AxisDialog.Designer.vb | 111 ----------
source/Dialogs/AxisDialog.vb | 83 -------
source/Dialogs/EditChartDialog.Designer.vb | 177 +++++++++++++++
.../{AxisDialog.resx => EditChartDialog.resx} | 10 +-
source/Dialogs/EditChartDialog.vb | 67 ++++++
.../DataSources/AxisWrapper.datasource | 2 +-
source/Views/MainWindow.Designer.vb | 20 +-
source/Views/MainWindow.resx | 26 +--
source/Wave.vbproj | 20 +-
11 files changed, 414 insertions(+), 421 deletions(-)
delete mode 100644 source/Dialogs/AxisDialog.Designer.vb
delete mode 100644 source/Dialogs/AxisDialog.vb
create mode 100644 source/Dialogs/EditChartDialog.Designer.vb
rename source/Dialogs/{AxisDialog.resx => EditChartDialog.resx} (94%)
create mode 100644 source/Dialogs/EditChartDialog.vb
diff --git a/source/Classes/AxisWrapper.vb b/source/Classes/AxisWrapper.vb
index 588c40b0..c341d023 100644
--- a/source/Classes/AxisWrapper.vb
+++ b/source/Classes/AxisWrapper.vb
@@ -15,81 +15,96 @@
'You should have received a copy of the GNU Lesser General Public License
'along with this program. If not, see .
'
-Imports System.Text.RegularExpressions
-
'''
-''' Wrapper around a Steema.TeeChart.Axis instance
-''' exposing selected properties
+''' Wrapper for a Y axis
'''
Friend Class AxisWrapper
- Private _name As String
- Private _TAxis As Steema.TeeChart.Axis
+ Private _axis As ScottPlot.Renderable.Axis
+ Private _min As Double
+ Private _max As Double
+ Private _autoMin As Boolean
+ Private _autoMax As Boolean
- '''
- ''' Constructor
- '''
- ''' One of "Left", "Right", "Custom 0", etc.
- ''' The axis instance to wrap around
- Public Sub New(_name As String, ByRef _axis As Steema.TeeChart.Axis)
- Me._name = _name
- Me._TAxis = _axis
+ Public Sub New(axis As ScottPlot.Renderable.Axis)
+ Me._axis = axis
+ Me._autoMin = True
+ Me._autoMax = True
End Sub
- '''
- ''' Axis Name, e.g. "Left", "Right", "Custom 0", etc.
- '''
- Public ReadOnly Property Name As String
+ Public ReadOnly Property AxisIndex As Integer
Get
- Return Me._name
+ Return Me._axis.AxisIndex
End Get
End Property
- '''
- ''' Axis Title as displayed in the chart
- '''
- '''
- Public Property Title As String
+ Public Property Unit As String
Get
- Return Me._TAxis.Title.Text
+ Return Me._axis.AxisLabel.Label
End Get
Set(value As String)
- Me._TAxis.Title.Text = value
+ Me._axis.AxisLabel.Label = value
End Set
End Property
- '''
- ''' Axis Unit, internally stored in the Tag property
- '''
- '''
- Public Property Unit As String
+ Public Property AutoMin As Boolean
Get
- Return Me._TAxis.Tag
+ Return Me._autoMin
End Get
- Set(value As String)
- Me._TAxis.Tag = value
+ Set(value As Boolean)
+ Me._autoMin = value
+ Call Me.setLimits()
End Set
End Property
- '''
- ''' Attempts to extract a unit enclosed in square or round brackets from a text
- '''
- ''' Text from which to extract the unit
- ''' The extracted unit or if unsuccessful the original text
- Public Shared Function parseUnit(text As String) As String
+ Public Property AutoMax As Boolean
+ Get
+ Return Me._autoMax
+ End Get
+ Set(value As Boolean)
+ Me._autoMax = value
+ Call Me.setLimits()
+ End Set
+ End Property
- Dim m As Match
- Dim unit As String
+ Public Property Max As Double
+ Get
+ Return Me._axis.Dims.Max
+ End Get
+ Set(value As Double)
+ Me._axis.Dims.SetAxis(min:=Nothing, max:=value)
+ Me._autoMax = False
+ 'Call Me.setLimits()
+ End Set
+ End Property
+
+ Public Property Min As Double
+ Get
+ Return Me._axis.Dims.Min
+ End Get
+ Set(value As Double)
+ Me._axis.Dims.SetAxis(min:=value, max:=Nothing)
+ Me._autoMin = False
+ 'Call Me.setLimits()
+ End Set
+ End Property
- m = Regex.Match(text, ".*[\[\(](.+?)[\]\)].*")
- If m.Success Then
- unit = m.Groups(1).Value
+ Private Sub setLimits()
+ If Me._autoMin And Me._autoMax Then
+ Me._axis.Dims.ResetLimits()
+ 'Me._axis.Dims.SetAxis(min:=Nothing, max:=Nothing)
+ ElseIf Me._autoMin Then
+ Dim max As Double = Me.Max
+ Me._axis.Dims.ResetLimits()
+ Me._axis.Dims.SetAxis(min:=Nothing, max:=max)
+ ElseIf Me._autoMax Then
+ Dim min As Double = Me.Min
+ Me._axis.Dims.ResetLimits()
+ Me._axis.Dims.SetAxis(min:=min, max:=Nothing)
Else
- unit = text
+ Me._axis.Dims.SetAxis(Me.Min, Me.Max)
End If
-
- Return unit
-
- End Function
+ End Sub
End Class
+
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 799d4f8d..5cf92d9d 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -60,6 +60,14 @@ Friend Class WaveController
'''
Private ChartMarkers As Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ '''
+ ''' List of Y axes
+ '''
+ Private Axes As System.ComponentModel.BindingList(Of AxisWrapper)
+
+ 'Edit Chart dialog
+ Private WithEvents EditChartDlg As EditChartDialog
+
Private selectionMade As Boolean 'Flag zeigt an, ob bereits ein Auswahlbereich ausgewählt wurde
'''
@@ -83,8 +91,6 @@ Friend Class WaveController
Private OverviewChartMouseDragStartX As Double
Private OverviewChartMouseDragOffset As Double
- Private WithEvents _axisDialog As AxisDialog
-
'Events handled by the AppInstance
Friend Event Properties_Clicked()
Friend Event TimeseriesValues_Clicked()
@@ -95,17 +101,19 @@ Friend Class WaveController
Me.View.SetController(Me)
- 'Initialize chart series container
+ 'Initialize chart series containers
Me.ChartSeries = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
Me.OverviewSeries = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
Me.ChartMarkers = New Dictionary(Of Integer, ScottPlot.Plottable.IPlottable)
+ Me.Axes = New ComponentModel.BindingList(Of AxisWrapper)
+
+ 'Initialize edit chart dialog
+ Me.EditChartDlg = New EditChartDialog(Me.Axes)
'Initialize zoom history
Me.ZoomHistory = New List(Of (xmin As Double, xmax As Double))
Me.ZoomHistoryIndex = 0
- _axisDialog = New AxisDialog()
-
'Subscribe to view events
AddHandler Me.View.Load, AddressOf View_Load
@@ -125,7 +133,6 @@ Friend Class WaveController
AddHandler Me.View.ToolStripButton_Cut.Click, AddressOf Zuschneiden_Click
AddHandler Me.View.ToolStripButton_Merge.Click, AddressOf Merge_Click
AddHandler Me.View.ToolStripButton_Analysis.Click, AddressOf Analysis_Click
- AddHandler Me.View.ToolStripButton_AxisDialog.Click, AddressOf AxisDialog_Click
AddHandler Me.View.ToolStripButton_EditChart.Click, AddressOf EditChart_Click
AddHandler Me.View.ToolStripMenuItem_ColorPaletteCategory10.Click, AddressOf ColorPalette_Click
AddHandler Me.View.ToolStripMenuItem_ColorPaletteCategory20.Click, AddressOf ColorPalette_Click
@@ -202,10 +209,6 @@ Friend Class WaveController
AddHandler Me.View.ToolStripStatusLabel_Errors.Click, AddressOf ShowLog_Click
AddHandler Me.View.ToolStripStatusLabel_Warnings.Click, AddressOf ShowLog_Click
- 'axis dialog events
- AddHandler _axisDialog.AxisDeleted, AddressOf axisDeleted
- AddHandler _axisDialog.AxisUnitChanged, AddressOf AxisUnitChanged
-
'model events
AddHandler _model.FileImported, AddressOf FileImported
AddHandler _model.SeriesAdded, AddressOf SeriesAdded
@@ -217,6 +220,9 @@ Friend Class WaveController
AddHandler _model.TENFileLoading, AddressOf Load_TEN
AddHandler _model.IsBusyChanged, AddressOf ShowBusy
+ 'edit chart events
+ AddHandler EditChartDlg.AxesEdited, AddressOf AxesEditedHandler
+
'add any already existing time series
For Each ts As TimeSeries In _model.TimeSeries.Values
Call SeriesAdded(ts)
@@ -234,6 +240,10 @@ Friend Class WaveController
End Sub
+ Private Sub AxesEditedHandler()
+ View.MainPlot.Refresh()
+ End Sub
+
'''
''' Handles the case where all series were cleared from the model
'''
@@ -301,9 +311,6 @@ Friend Class WaveController
View.ToolStripStatusLabel_Errors.Image = My.Resources.cancel_inactive
View.ToolStripStatusLabel_Warnings.Image = My.Resources.warning_inactive
- 'Update axis dialog
- Me.UpdateAxisDialog()
-
Me.selectionMade = False
'Update window title
@@ -544,8 +551,9 @@ Friend Class WaveController
'''
'''
Private Sub EditChart_Click(sender As System.Object, e As System.EventArgs)
- 'TODO: TChart
- 'Call Steema.TeeChart.Editor.Show(View.MainPlot)
+ Me.EditChartDlg.Visible = True
+ Me.EditChartDlg.Show()
+ Me.EditChartDlg.BringToFront()
End Sub
'''
@@ -558,17 +566,6 @@ Friend Class WaveController
SetChartColorPalette(Helpers.getColorPalette(colorPaletteName))
End Sub
- '''
- ''' Show AxisDialog button clicked
- '''
- '''
- '''
- Private Sub AxisDialog_Click(sender As Object, e As EventArgs)
- Call UpdateAxisDialog()
- _axisDialog.Show()
- _axisDialog.BringToFront()
- End Sub
-
'''
''' Properties button clicked
'''
@@ -2421,59 +2418,63 @@ Friend Class WaveController
''' The unit
Private Sub assignSeriesToAxis(ByRef series As ScottPlot.Plottable.IPlottable, unit As String)
- 'TODO: for now, assign series to axes by matching the axis label to the unit
+ Dim axisW As AxisWrapper
- 'check for reusable axes
- Dim axes As IEnumerable(Of ScottPlot.Renderable.Axis)
- axes = View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ 'check for existing axes
+ Dim axisExists As Boolean = False
+ For Each axisW In Me.Axes
+ If axisW.Unit = unit Then
+ axisExists = True
+ 'assign series to axis
+ series.YAxisIndex = axisW.AxisIndex
+ Exit For
+ End If
+ Next
- Dim axisFound As Boolean = False
- For Each axis As ScottPlot.Renderable.Axis In axes
- If axis.AxisLabel.Label = "" Then
- 'this axis hasn't been used yet
- axis.AxisLabel.Label = unit
- axis.AxisLabel.IsVisible = True
- axis.Ticks(enable:=True)
+ If Not axisExists Then
+ 'check for existing, but unused axes
+ Dim axisFound As Boolean = False
+ For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
+ If axis.AxisLabel.Label = "" Then
+ 'this axis hasn't been used yet
+ axis.AxisLabel.Label = unit
+ axis.AxisLabel.IsVisible = True
+ axis.Ticks(enable:=True)
- 'assign series to new axis
- series.YAxisIndex = axis.AxisIndex
+ 'assign series to axis
+ series.YAxisIndex = axis.AxisIndex
- axis.Dims.ResetLimits()
+ 'store axis
+ axisW = New AxisWrapper(axis)
+ Me.Axes.Add(axisW)
- axisFound = True
- Exit For
- ElseIf axis.AxisLabel.Label = unit Then
- 'suitable existing axis found
+ axisFound = True
+ Exit For
+ End If
+ Next
+ If Not axisFound Then
+ 'create a new custom axis
+ Dim axis As ScottPlot.Renderable.Axis
+ Dim number As Integer = Axes.Count + 1
+
+ 'Place every second axis on the right
+ If number Mod 2 = 0 Then
+ axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Right)
+ Else
+ axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Left)
+ End If
- 'assign series to new axis
- series.YAxisIndex = axis.AxisIndex
+ axis.AxisLabel.Label = unit
+ axis.IsVisible = True
- axis.Dims.ResetLimits()
+ 'assign series to axis
+ series.YAxisIndex = axis.AxisIndex
- axisFound = True
- Exit For
- End If
- Next
- If Not axisFound Then
- 'create a new custom axis
- Dim axis As ScottPlot.Renderable.Axis
- Dim number As Integer = axes.Count + 1
-
- 'Place every second axis on the right
- If number Mod 2 = 0 Then
- axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Right)
- Else
- axis = View.MainPlot.Plot.AddAxis(ScottPlot.Renderable.Edge.Left)
+ 'store axis
+ axisW = New AxisWrapper(axis)
+ Me.Axes.Add(axisW)
End If
- axis.AxisLabel.Label = unit
-
- axis.IsVisible = True
-
- 'assign series to new axis
- series.YAxisIndex = axis.AxisIndex
-
- axis.Dims.ResetLimits()
End If
'remove any unused axes
@@ -2515,8 +2516,7 @@ Friend Class WaveController
View.MainPlot.Refresh()
End If
- 'update axis dialog
- Call Me.UpdateAxisDialog()
+ 'TODO: remove axis wrappers
End Sub
@@ -2798,68 +2798,6 @@ Friend Class WaveController
End Sub
- '''
- ''' Handles axis deleted in the AxisDialog
- '''
- '''
- Private Sub axisDeleted(axisname As String)
- 'TODO: TChart
- 'Dim axisnumber As Integer
- 'Dim m As Match = Regex.Match(axisname, "Custom (\d+)")
- 'If m.Success Then
- ' axisnumber = Integer.Parse(m.Groups(1).Value)
- ' 'Delete axis from chart
- ' View.MainPlot.Axes.Custom.RemoveAt(axisnumber)
- ' View.MainPlot.Refresh()
- ' 'update axis dialog
- ' Call Me.UpdateAxisDialog()
- 'End If
- End Sub
-
- '''
- ''' Handles axis unit changed in the AxisDialog
- '''
- ''' Reassigns all series to their appropriate axis
- Private Sub AxisUnitChanged()
-
- 'TODO: TChart
- 'For Each series As Steema.TeeChart.Styles.Series In View.MainPlot.Series
- ' assignSeriesToAxis(series, _model.TimeSeries(series.Tag).Unit)
- 'Next
-
- ''deactivate unused custom axes
- 'Dim unitUsed As Boolean
- 'For Each axis As Steema.TeeChart.Axis In View.MainPlot.Axes.Custom
- ' unitUsed = False
- ' For Each ts As TimeSeries In _model.TimeSeries.Values
- ' If ts.Unit = axis.Tag Then
- ' unitUsed = True
- ' Exit For
- ' End If
- ' Next
- ' If Not unitUsed Then
- ' axis.Visible = False
- ' End If
- 'Next
-
- End Sub
-
- '''
- ''' Update AxisDialog
- '''
- Private Sub UpdateAxisDialog()
- 'TODO: TChart
- ''Wrap Left, Right and Custom axes
- 'Dim axisList As New List(Of AxisWrapper)
- 'axisList.Add(New AxisWrapper("Left", View.MainPlot.Axes.Left))
- 'axisList.Add(New AxisWrapper("Right", View.MainPlot.Axes.Right))
- 'For i As Integer = 0 To View.MainPlot.Axes.Custom.Count - 1
- ' axisList.Add(New AxisWrapper("Custom " & i, View.MainPlot.Axes.Custom(i)))
- 'Next
-
- '_axisDialog.Update(axisList)
- End Sub
-
'''
''' Process Drag and Drop of files
'''
diff --git a/source/Dialogs/AxisDialog.Designer.vb b/source/Dialogs/AxisDialog.Designer.vb
deleted file mode 100644
index 9e5c8e9b..00000000
--- a/source/Dialogs/AxisDialog.Designer.vb
+++ /dev/null
@@ -1,111 +0,0 @@
-
-Partial Class AxisDialog
- Inherits System.Windows.Forms.Form
-
- 'Form overrides dispose to clean up the component list.
-
- Protected Overrides Sub Dispose(disposing As Boolean)
- Try
- If disposing AndAlso components IsNot Nothing Then
- components.Dispose()
- End If
- Finally
- MyBase.Dispose(disposing)
- End Try
- End Sub
-
- 'Required by the Windows Form Designer
- Private components As System.ComponentModel.IContainer
-
- 'NOTE: The following procedure is required by the Windows Form Designer
- 'It can be modified using the Windows Form Designer.
- 'Do not modify it using the code editor.
-
- Private Sub InitializeComponent()
- Me.components = New System.ComponentModel.Container()
- Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AxisDialog))
- Me.DataGridView1 = New System.Windows.Forms.DataGridView()
- Me.NameColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
- Me.TitleColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
- Me.UnitColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
- Me.AxisWrapperBindingSource = New System.Windows.Forms.BindingSource(Me.components)
- Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
- CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
- CType(Me.AxisWrapperBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'DataGridView1
- '
- Me.DataGridView1.AllowUserToAddRows = False
- Me.DataGridView1.AllowUserToResizeRows = False
- Me.DataGridView1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
- Or System.Windows.Forms.AnchorStyles.Left) _
- Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
- Me.DataGridView1.AutoGenerateColumns = False
- Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells
- Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
- Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.NameColumn, Me.TitleColumn, Me.UnitColumn})
- Me.DataGridView1.DataSource = Me.AxisWrapperBindingSource
- Me.DataGridView1.Location = New System.Drawing.Point(15, 12)
- Me.DataGridView1.Name = "DataGridView1"
- Me.DataGridView1.Size = New System.Drawing.Size(405, 199)
- Me.DataGridView1.TabIndex = 3
- '
- 'NameColumn
- '
- Me.NameColumn.DataPropertyName = "Name"
- Me.NameColumn.HeaderText = "Name"
- Me.NameColumn.Name = "NameColumn"
- Me.NameColumn.ReadOnly = True
- Me.NameColumn.Width = 60
- '
- 'TitleColumn
- '
- Me.TitleColumn.DataPropertyName = "Title"
- Me.TitleColumn.HeaderText = "Title"
- Me.TitleColumn.Name = "TitleColumn"
- Me.TitleColumn.Width = 52
- '
- 'UnitColumn
- '
- Me.UnitColumn.DataPropertyName = "Unit"
- Me.UnitColumn.HeaderText = "Unit"
- Me.UnitColumn.Name = "UnitColumn"
- Me.UnitColumn.Width = 51
- '
- 'AxisWrapperBindingSource
- '
- Me.AxisWrapperBindingSource.DataSource = GetType(BlueM.Wave.AxisWrapper)
- '
- 'DataGridViewTextBoxColumn1
- '
- Me.DataGridViewTextBoxColumn1.DataPropertyName = "Tag"
- Me.DataGridViewTextBoxColumn1.HeaderText = "Tag"
- Me.DataGridViewTextBoxColumn1.Name = "DataGridViewTextBoxColumn1"
- Me.DataGridViewTextBoxColumn1.Width = 51
- '
- 'AxisDialog
- '
- Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
- Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
- Me.ClientSize = New System.Drawing.Size(435, 223)
- Me.Controls.Add(Me.DataGridView1)
- Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
- Me.MaximizeBox = False
- Me.MinimizeBox = False
- Me.Name = "AxisDialog"
- Me.ShowInTaskbar = False
- Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
- Me.Text = "Manage Axes"
- CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
- CType(Me.AxisWrapperBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
-
- End Sub
- Friend WithEvents DataGridView1 As DataGridView
- Friend WithEvents AxisWrapperBindingSource As BindingSource
- Friend WithEvents DataGridViewTextBoxColumn1 As DataGridViewTextBoxColumn
- Friend WithEvents NameColumn As DataGridViewTextBoxColumn
- Friend WithEvents TitleColumn As DataGridViewTextBoxColumn
- Friend WithEvents UnitColumn As DataGridViewTextBoxColumn
-End Class
diff --git a/source/Dialogs/AxisDialog.vb b/source/Dialogs/AxisDialog.vb
deleted file mode 100644
index fbb7243e..00000000
--- a/source/Dialogs/AxisDialog.vb
+++ /dev/null
@@ -1,83 +0,0 @@
-'BlueM.Wave
-'Copyright (C) BlueM Dev Group
-'
-'
-'This program is free software: you can redistribute it and/or modify
-'it under the terms of the GNU Lesser General Public License as published by
-'the Free Software Foundation, either version 3 of the License, or
-'(at your option) any later version.
-'
-'This program is distributed in the hope that it will be useful,
-'but WITHOUT ANY WARRANTY; without even the implied warranty of
-'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-'GNU Lesser General Public License for more details.
-'
-'You should have received a copy of the GNU Lesser General Public License
-'along with this program. If not, see .
-'
-Imports System.Windows.Forms
-Friend Class AxisDialog
-
- '''
- ''' Is raised when an axis unit is changed by the user
- '''
- Friend Event AxisUnitChanged()
-
- '''
- ''' Is raised when an axis is deleted by the user
- '''
- '''
- Friend Event AxisDeleted(axisname As String)
-
- Public Overloads Sub Update(ByRef axisList As List(Of AxisWrapper))
- Me.AxisWrapperBindingSource.DataSource = axisList
- End Sub
-
- '''
- ''' Handles changed cell values
- '''
- '''
- '''
- Private Sub DataGridView1_CellValueChanged(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
-
- If e.RowIndex = -1 Then
- Exit Sub
- End If
-
- If Me.DataGridView1.Columns(e.ColumnIndex).Name = "UnitColumn" Then
- RaiseEvent AxisUnitChanged()
- End If
-
- End Sub
-
- '''
- ''' Handles user trying to delete a row
- '''
- '''
- '''
- Private Sub DataGridView1_UserDeletingRow(sender As Object, e As DataGridViewRowCancelEventArgs) Handles DataGridView1.UserDeletingRow
-
- Dim axisname As String
-
- 'cancel row deletion because datagridview will be refreshed from outside
- 'otherwise, two rows end up being deleted
- e.Cancel = True
-
- axisname = CType(e.Row.DataBoundItem, AxisWrapper).Name
- If axisname = "Left" Or axisname = "Right" Then
- MsgBox("Left and Right axes cannot be deleted.", MsgBoxStyle.Information)
- Return
- Else
- If MsgBox($"Delete axis {axisname}?", MsgBoxStyle.OkCancel) = MsgBoxResult.Ok Then
- RaiseEvent AxisDeleted(axisname)
- End If
- End If
- End Sub
-
- Private Sub PropertiesDialog_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
- 'prevent the form from closing and hide it instead
- e.Cancel = True
- Call Me.Hide()
- End Sub
-
-End Class
diff --git a/source/Dialogs/EditChartDialog.Designer.vb b/source/Dialogs/EditChartDialog.Designer.vb
new file mode 100644
index 00000000..8600c96e
--- /dev/null
+++ b/source/Dialogs/EditChartDialog.Designer.vb
@@ -0,0 +1,177 @@
+
+Partial Class EditChartDialog
+ Inherits System.Windows.Forms.Form
+
+ 'Form overrides dispose to clean up the component list.
+
+ Protected Overrides Sub Dispose(ByVal disposing As Boolean)
+ Try
+ If disposing AndAlso components IsNot Nothing Then
+ components.Dispose()
+ End If
+ Finally
+ MyBase.Dispose(disposing)
+ End Try
+ End Sub
+
+ 'Required by the Windows Form Designer
+ Private components As System.ComponentModel.IContainer
+
+ 'NOTE: The following procedure is required by the Windows Form Designer
+ 'It can be modified using the Windows Form Designer.
+ 'Do not modify it using the code editor.
+
+ Private Sub InitializeComponent()
+ Me.components = New System.ComponentModel.Container()
+ Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(EditChartDialog))
+ Me.TableLayoutPanel1 = New System.Windows.Forms.TableLayoutPanel()
+ Me.OK_Button = New System.Windows.Forms.Button()
+ Me.Cancel_Button = New System.Windows.Forms.Button()
+ Me.DataGridView1 = New System.Windows.Forms.DataGridView()
+ Me.AxisWrapperBindingSource = New System.Windows.Forms.BindingSource(Me.components)
+ Me.AxisIndexDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.UnitDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.AutoMinDataGridViewCheckBoxColumn = New System.Windows.Forms.DataGridViewCheckBoxColumn()
+ Me.MinDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.AutoMaxDataGridViewCheckBoxColumn = New System.Windows.Forms.DataGridViewCheckBoxColumn()
+ Me.MaxDataGridViewTextBoxColumn = New System.Windows.Forms.DataGridViewTextBoxColumn()
+ Me.TableLayoutPanel1.SuspendLayout()
+ CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
+ CType(Me.AxisWrapperBindingSource, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.SuspendLayout()
+ '
+ 'TableLayoutPanel1
+ '
+ Me.TableLayoutPanel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.TableLayoutPanel1.ColumnCount = 2
+ Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
+ Me.TableLayoutPanel1.ColumnStyles.Add(New System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
+ Me.TableLayoutPanel1.Controls.Add(Me.OK_Button, 0, 0)
+ Me.TableLayoutPanel1.Controls.Add(Me.Cancel_Button, 1, 0)
+ Me.TableLayoutPanel1.Location = New System.Drawing.Point(277, 274)
+ Me.TableLayoutPanel1.Name = "TableLayoutPanel1"
+ Me.TableLayoutPanel1.RowCount = 1
+ Me.TableLayoutPanel1.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50.0!))
+ Me.TableLayoutPanel1.Size = New System.Drawing.Size(146, 29)
+ Me.TableLayoutPanel1.TabIndex = 0
+ '
+ 'OK_Button
+ '
+ Me.OK_Button.Anchor = System.Windows.Forms.AnchorStyles.None
+ Me.OK_Button.Location = New System.Drawing.Point(3, 3)
+ Me.OK_Button.Name = "OK_Button"
+ Me.OK_Button.Size = New System.Drawing.Size(67, 23)
+ Me.OK_Button.TabIndex = 0
+ Me.OK_Button.Text = "OK"
+ '
+ 'Cancel_Button
+ '
+ Me.Cancel_Button.Anchor = System.Windows.Forms.AnchorStyles.None
+ Me.Cancel_Button.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.Cancel_Button.Location = New System.Drawing.Point(76, 3)
+ Me.Cancel_Button.Name = "Cancel_Button"
+ Me.Cancel_Button.Size = New System.Drawing.Size(67, 23)
+ Me.Cancel_Button.TabIndex = 1
+ Me.Cancel_Button.Text = "Cancel"
+ '
+ 'DataGridView1
+ '
+ Me.DataGridView1.AllowUserToAddRows = False
+ Me.DataGridView1.AllowUserToDeleteRows = False
+ Me.DataGridView1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
+ Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
+ Me.DataGridView1.AutoGenerateColumns = False
+ Me.DataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.ColumnHeader
+ Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
+ Me.DataGridView1.Columns.AddRange(New System.Windows.Forms.DataGridViewColumn() {Me.AxisIndexDataGridViewTextBoxColumn, Me.UnitDataGridViewTextBoxColumn, Me.AutoMinDataGridViewCheckBoxColumn, Me.MinDataGridViewTextBoxColumn, Me.AutoMaxDataGridViewCheckBoxColumn, Me.MaxDataGridViewTextBoxColumn})
+ Me.DataGridView1.DataSource = Me.AxisWrapperBindingSource
+ Me.DataGridView1.Location = New System.Drawing.Point(13, 13)
+ Me.DataGridView1.Name = "DataGridView1"
+ Me.DataGridView1.Size = New System.Drawing.Size(410, 150)
+ Me.DataGridView1.TabIndex = 1
+ '
+ 'AxisWrapperBindingSource
+ '
+ Me.AxisWrapperBindingSource.DataSource = GetType(BlueM.Wave.AxisWrapper)
+ '
+ 'AxisIndexDataGridViewTextBoxColumn
+ '
+ Me.AxisIndexDataGridViewTextBoxColumn.DataPropertyName = "AxisIndex"
+ Me.AxisIndexDataGridViewTextBoxColumn.Frozen = True
+ Me.AxisIndexDataGridViewTextBoxColumn.HeaderText = "AxisIndex"
+ Me.AxisIndexDataGridViewTextBoxColumn.Name = "AxisIndexDataGridViewTextBoxColumn"
+ Me.AxisIndexDataGridViewTextBoxColumn.ReadOnly = True
+ Me.AxisIndexDataGridViewTextBoxColumn.Visible = False
+ Me.AxisIndexDataGridViewTextBoxColumn.Width = 77
+ '
+ 'UnitDataGridViewTextBoxColumn
+ '
+ Me.UnitDataGridViewTextBoxColumn.DataPropertyName = "Unit"
+ Me.UnitDataGridViewTextBoxColumn.Frozen = True
+ Me.UnitDataGridViewTextBoxColumn.HeaderText = "Unit"
+ Me.UnitDataGridViewTextBoxColumn.Name = "UnitDataGridViewTextBoxColumn"
+ Me.UnitDataGridViewTextBoxColumn.Width = 51
+ '
+ 'AutoMinDataGridViewCheckBoxColumn
+ '
+ Me.AutoMinDataGridViewCheckBoxColumn.DataPropertyName = "AutoMin"
+ Me.AutoMinDataGridViewCheckBoxColumn.HeaderText = "AutoMin"
+ Me.AutoMinDataGridViewCheckBoxColumn.Name = "AutoMinDataGridViewCheckBoxColumn"
+ Me.AutoMinDataGridViewCheckBoxColumn.Width = 52
+ '
+ 'MinDataGridViewTextBoxColumn
+ '
+ Me.MinDataGridViewTextBoxColumn.DataPropertyName = "Min"
+ Me.MinDataGridViewTextBoxColumn.HeaderText = "Min"
+ Me.MinDataGridViewTextBoxColumn.Name = "MinDataGridViewTextBoxColumn"
+ Me.MinDataGridViewTextBoxColumn.Width = 49
+ '
+ 'AutoMaxDataGridViewCheckBoxColumn
+ '
+ Me.AutoMaxDataGridViewCheckBoxColumn.DataPropertyName = "AutoMax"
+ Me.AutoMaxDataGridViewCheckBoxColumn.HeaderText = "AutoMax"
+ Me.AutoMaxDataGridViewCheckBoxColumn.Name = "AutoMaxDataGridViewCheckBoxColumn"
+ Me.AutoMaxDataGridViewCheckBoxColumn.Width = 55
+ '
+ 'MaxDataGridViewTextBoxColumn
+ '
+ Me.MaxDataGridViewTextBoxColumn.DataPropertyName = "Max"
+ Me.MaxDataGridViewTextBoxColumn.HeaderText = "Max"
+ Me.MaxDataGridViewTextBoxColumn.Name = "MaxDataGridViewTextBoxColumn"
+ Me.MaxDataGridViewTextBoxColumn.Width = 52
+ '
+ 'EditChartDialog
+ '
+ Me.AcceptButton = Me.OK_Button
+ Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
+ Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
+ Me.CancelButton = Me.Cancel_Button
+ Me.ClientSize = New System.Drawing.Size(435, 315)
+ Me.Controls.Add(Me.DataGridView1)
+ Me.Controls.Add(Me.TableLayoutPanel1)
+ Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
+ Me.MaximizeBox = False
+ Me.MinimizeBox = False
+ Me.Name = "EditChartDialog"
+ Me.ShowInTaskbar = False
+ Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
+ Me.Text = "Edit Chart"
+ Me.TopMost = True
+ Me.TableLayoutPanel1.ResumeLayout(False)
+ CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
+ CType(Me.AxisWrapperBindingSource, System.ComponentModel.ISupportInitialize).EndInit()
+ Me.ResumeLayout(False)
+
+ End Sub
+ Friend WithEvents TableLayoutPanel1 As System.Windows.Forms.TableLayoutPanel
+ Friend WithEvents OK_Button As System.Windows.Forms.Button
+ Friend WithEvents Cancel_Button As System.Windows.Forms.Button
+ Friend WithEvents DataGridView1 As DataGridView
+ Friend WithEvents AxisIndexDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
+ Friend WithEvents UnitDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
+ Friend WithEvents AutoMinDataGridViewCheckBoxColumn As DataGridViewCheckBoxColumn
+ Friend WithEvents MinDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
+ Friend WithEvents AutoMaxDataGridViewCheckBoxColumn As DataGridViewCheckBoxColumn
+ Friend WithEvents MaxDataGridViewTextBoxColumn As DataGridViewTextBoxColumn
+ Friend WithEvents AxisWrapperBindingSource As BindingSource
+End Class
diff --git a/source/Dialogs/AxisDialog.resx b/source/Dialogs/EditChartDialog.resx
similarity index 94%
rename from source/Dialogs/AxisDialog.resx
rename to source/Dialogs/EditChartDialog.resx
index 59d99686..eee96e35 100644
--- a/source/Dialogs/AxisDialog.resx
+++ b/source/Dialogs/EditChartDialog.resx
@@ -112,15 +112,15 @@
2.0
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- 17, 16
+
+ 17, 17
-
+
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAABMLAAATCwAAAAAAAAAA
diff --git a/source/Dialogs/EditChartDialog.vb b/source/Dialogs/EditChartDialog.vb
new file mode 100644
index 00000000..6d728cee
--- /dev/null
+++ b/source/Dialogs/EditChartDialog.vb
@@ -0,0 +1,67 @@
+'BlueM.Wave
+'Copyright (C) BlueM Dev Group
+'
+'
+'This program is free software: you can redistribute it and/or modify
+'it under the terms of the GNU Lesser General Public License as published by
+'the Free Software Foundation, either version 3 of the License, or
+'(at your option) any later version.
+'
+'This program is distributed in the hope that it will be useful,
+'but WITHOUT ANY WARRANTY; without even the implied warranty of
+'MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+'GNU Lesser General Public License for more details.
+'
+'You should have received a copy of the GNU Lesser General Public License
+'along with this program. If not, see .
+'
+Imports System.Windows.Forms
+
+Friend Class EditChartDialog
+
+ '''
+ ''' Is raised when axes properties were changed
+ '''
+ Friend Event AxesEdited()
+
+ Public Sub New(ByRef axes As System.ComponentModel.BindingList(Of AxisWrapper))
+
+ ' This call is required by the designer.
+ InitializeComponent()
+
+ ' Add any initialization after the InitializeComponent() call.
+ Me.AxisWrapperBindingSource.DataSource = axes
+
+ End Sub
+
+ '''
+ ''' Commit edits as soon as they occur, but only if they occur in the AutoMin or AutoMax columns
+ '''
+ '''
+ '''
+ Private Sub DataGridView1_CurrentCellDirtyStateChanged(sender As Object, e As EventArgs) Handles DataGridView1.CurrentCellDirtyStateChanged
+ If DataGridView1.IsCurrentCellDirty And
+ (DataGridView1.CurrentCell.OwningColumn.DataPropertyName = "AutoMin" Or DataGridView1.CurrentCell.OwningColumn.DataPropertyName = "AutoMax") Then
+ DataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit)
+ End If
+ End Sub
+
+ Private Sub DataGridView1_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
+ RaiseEvent AxesEdited()
+ End Sub
+
+ Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
+ Me.DialogResult = System.Windows.Forms.DialogResult.OK
+ Me.Close()
+ End Sub
+
+ Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
+ Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
+ Me.Close()
+ End Sub
+
+ Private Sub EditChartDialog_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
+ Me.Hide()
+ e.Cancel = True
+ End Sub
+End Class
diff --git a/source/My Project/DataSources/AxisWrapper.datasource b/source/My Project/DataSources/AxisWrapper.datasource
index 8a3a11dd..826fc7af 100644
--- a/source/My Project/DataSources/AxisWrapper.datasource
+++ b/source/My Project/DataSources/AxisWrapper.datasource
@@ -6,5 +6,5 @@
cause the file to be unrecognizable by the program.
-->
- BlueM.Wave.AxisWrapper, Wave, Version=1.9.2.0, Culture=neutral, PublicKeyToken=null
+ BlueM.Wave.AxisWrapper, Wave, Version=2.6.1.23947, Culture=neutral, PublicKeyToken=null
\ No newline at end of file
diff --git a/source/Views/MainWindow.Designer.vb b/source/Views/MainWindow.Designer.vb
index 754253ea..468de26b 100644
--- a/source/Views/MainWindow.Designer.vb
+++ b/source/Views/MainWindow.Designer.vb
@@ -58,6 +58,8 @@ Partial Class MainWindow
Me.ToolStripButton_Analysis = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_EditChart = New System.Windows.Forms.ToolStripButton()
Me.ToolStripDropDownButton_ColorPalette = New System.Windows.Forms.ToolStripDropDownButton()
+ Me.ToolStripMenuItem_ColorPaletteCategory10 = New System.Windows.Forms.ToolStripMenuItem()
+ Me.ToolStripMenuItem_ColorPaletteCategory20 = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_ColorPaletteMaterial = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_ColorPaletteDistinct = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem_ColorPaletteWheel = New System.Windows.Forms.ToolStripMenuItem()
@@ -66,7 +68,6 @@ Partial Class MainWindow
Me.ToolStripButton_Properties = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_TimeseriesValues = New System.Windows.Forms.ToolStripButton()
Me.ToolStripSeparator10 = New System.Windows.Forms.ToolStripSeparator()
- Me.ToolStripButton_AxisDialog = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_AutoAdjustYAxes = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_ToggleOverview = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_ToggleNavigation = New System.Windows.Forms.ToolStripButton()
@@ -209,7 +210,7 @@ Partial Class MainWindow
'
ToolStrip1.AutoSize = False
ToolStrip1.BackColor = System.Drawing.SystemColors.Control
- ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_New, Me.ToolStripDropDownButton_Open, Me.ToolStripDropDownButton_Save, ToolStripSeparator4, Me.ToolStripButton_Copy, ToolStripSeparator2, Me.ToolStripButton_Cut, Me.ToolStripButton_Merge, Me.ToolStripSeparator8, Me.ToolStripButton_ShowNaNValues, Me.ToolStripButton_ConvertErrorValues, Me.ToolStripButton_RemoveNaNValues, Me.ToolStripSeparator7, Me.ToolStripButton_Analysis, ToolStripSeparator1, Me.ToolStripButton_EditChart, Me.ToolStripDropDownButton_ColorPalette, Me.ToolStripSeparator9, Me.ToolStripButton_Properties, Me.ToolStripButton_TimeseriesValues, Me.ToolStripSeparator10, Me.ToolStripButton_AxisDialog, Me.ToolStripButton_AutoAdjustYAxes, ToolStripSeparator3, Me.ToolStripButton_ToggleOverview, Me.ToolStripButton_ToggleNavigation, toolStripSeparator, Me.ToolStripButton_ZoomIn, Me.ToolStripButton_ZoomOut, Me.ToolStripButton_ZoomPrevious, Me.ToolStripDropDownButton_Help, Me.ToolStripButton_ZoomNext, Me.ToolStripDropDownButton_ZoomToSeries, Me.ToolStripButton_ZoomAll, Me.ToolStripButton_UpdateNotification, Me.ToolStripSeparator11})
+ ToolStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripButton_New, Me.ToolStripDropDownButton_Open, Me.ToolStripDropDownButton_Save, ToolStripSeparator4, Me.ToolStripButton_Copy, ToolStripSeparator2, Me.ToolStripButton_Cut, Me.ToolStripButton_Merge, Me.ToolStripSeparator8, Me.ToolStripButton_ShowNaNValues, Me.ToolStripButton_ConvertErrorValues, Me.ToolStripButton_RemoveNaNValues, Me.ToolStripSeparator7, Me.ToolStripButton_Analysis, ToolStripSeparator1, Me.ToolStripButton_EditChart, Me.ToolStripDropDownButton_ColorPalette, Me.ToolStripSeparator9, Me.ToolStripButton_Properties, Me.ToolStripButton_TimeseriesValues, Me.ToolStripSeparator10, Me.ToolStripButton_AutoAdjustYAxes, ToolStripSeparator3, Me.ToolStripButton_ToggleOverview, Me.ToolStripButton_ToggleNavigation, toolStripSeparator, Me.ToolStripButton_ZoomIn, Me.ToolStripButton_ZoomOut, Me.ToolStripButton_ZoomPrevious, Me.ToolStripDropDownButton_Help, Me.ToolStripButton_ZoomNext, Me.ToolStripDropDownButton_ZoomToSeries, Me.ToolStripButton_ZoomAll, Me.ToolStripButton_UpdateNotification, Me.ToolStripSeparator11})
ToolStrip1.Location = New System.Drawing.Point(0, 0)
ToolStrip1.Name = "ToolStrip1"
ToolStrip1.Size = New System.Drawing.Size(944, 34)
@@ -412,13 +413,13 @@ Partial Class MainWindow
'ToolStripMenuItem_ColorPaletteCategory10
'
Me.ToolStripMenuItem_ColorPaletteCategory10.Name = "ToolStripMenuItem_ColorPaletteCategory10"
- Me.ToolStripMenuItem_ColorPaletteCategory10.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteCategory10.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ColorPaletteCategory10.Text = "Category10"
'
'ToolStripMenuItem_ColorPaletteCategory20
'
Me.ToolStripMenuItem_ColorPaletteCategory20.Name = "ToolStripMenuItem_ColorPaletteCategory20"
- Me.ToolStripMenuItem_ColorPaletteCategory20.Size = New System.Drawing.Size(139, 22)
+ Me.ToolStripMenuItem_ColorPaletteCategory20.Size = New System.Drawing.Size(180, 22)
Me.ToolStripMenuItem_ColorPaletteCategory20.Text = "Category20"
'
'ToolStripMenuItem_ColorPaletteMaterial
@@ -475,16 +476,6 @@ Partial Class MainWindow
Me.ToolStripSeparator10.Name = "ToolStripSeparator10"
Me.ToolStripSeparator10.Size = New System.Drawing.Size(6, 34)
'
- 'ToolStripButton_AxisDialog
- '
- Me.ToolStripButton_AxisDialog.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image
- Me.ToolStripButton_AxisDialog.Image = Global.BlueM.Wave.My.Resources.Resources.shape_align_bottom
- Me.ToolStripButton_AxisDialog.ImageTransparentColor = System.Drawing.Color.Magenta
- Me.ToolStripButton_AxisDialog.Name = "ToolStripButton_AxisDialog"
- Me.ToolStripButton_AxisDialog.Size = New System.Drawing.Size(23, 31)
- Me.ToolStripButton_AxisDialog.Text = "ToolStripButton_AxisDialog"
- Me.ToolStripButton_AxisDialog.ToolTipText = "Manage Axes"
- '
'ToolStripButton_AutoAdjustYAxes
'
Me.ToolStripButton_AutoAdjustYAxes.CheckOnClick = True
@@ -1070,7 +1061,6 @@ Partial Class MainWindow
Friend WithEvents ToolStripButton_AutoAdjustYAxes As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripButton_RemoveNaNValues As System.Windows.Forms.ToolStripButton
Friend WithEvents ToolStripMenuItem_Changelog As ToolStripMenuItem
- Friend WithEvents ToolStripButton_AxisDialog As ToolStripButton
Friend WithEvents ToolStripMenuItem_PasteFromClipboard As ToolStripMenuItem
Friend WithEvents ToolStripSeparator10 As ToolStripSeparator
Friend WithEvents ToolStripStatusLabel_Errors As ToolStripStatusLabel
diff --git a/source/Views/MainWindow.resx b/source/Views/MainWindow.resx
index 7ed8e04d..b4fed811 100644
--- a/source/Views/MainWindow.resx
+++ b/source/Views/MainWindow.resx
@@ -226,19 +226,19 @@
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK7SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25x2
- axVjLKUMUlRQZkhhzjnN5cIkBWo4vVomoluXxIsiTWbORoaSKFIhF1crt9ZCaIsaaxX40gP7dZHrWNNV
- n+28nPP7/L7n/A5rDY+pFPUOia3UUFnYMYzFHCYs5iJEYXdfodXdfQFlyjbGZxJJfYOSkNcopjyGYsUC
- IURc+gLE3cdXuPUCak5XGHLi56RM+Z/EkxNyicbrj6RTyxE+FYjW+ILRq4uBn3mvAz/SnJ08zSzOC023
- cdffxGsSW+PJC/4IQgUiV+jV6AtGGqjgSr0vEK2lG5X4/N9TZzp41NRtrpXRklCmsrDHUKRY/BQpoOXr
- CTlaF5fZ18yQISOAvtHpKTVXYVPnhRktiWMIiy3ohQidVLWWuvaEk9UkFLeMAyLsBVszG5nWYjFGS+Ig
- 6WnTA/MFIrLcWhKyawchq2oAjkgfgOCmFbosHuA1WGAPB4cpzQYNXERJ2N3DV3iDKxy02gg9YxR0j3pX
- xU6zB+q77KAdcANbTkIKqgZGSzKv41vnuwVUfFAZUmJVrsEnoUprg0rNE5DcGgdZ6wS06p2QIzYAa6f8
- F6MmcOL56Nx9Xuh5B0+TLuqHzpFX0G56QafOwx3CBXK6SUuvEziXSdh3qA5Ga3KEjJrEoc2XOul/TuPr
- YO/Zu7CLjcO2422QXU6AUjcD7EtGQLAW+DjXDvZWHoxVoLsZNcm0hotOqrhWm5odjg/LrsJim48q4ZTk
- IRw80QRf3hrh6xIJ758pwYLlxkwbNVnH/sbwptQbMNNRBH4XDqE3Blh234OX/RLQnEE+PK7M3MJU/p1H
- 8hyRXXUeliaa4N1EM8x2XQSLLOPbiODAVqbk35ilWSKyNBOeKjkwXI5+JoWZO5ij/8dccWx7X9FhFVGG
- pSR2WKzfxfmXAXLVpW0AAAAASUVORK5CYII=
+ YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAK8SURBVDhPjZFfTFJRHMfZerHWQ2v9e6jlfLrWQ5nN25yG
+ rWKMpbcMUlRQZkhhzjnN5cIkBWo0RctEdOuSeK8iTWbORoaSKFIhF1crt9ZCaIsaaxX40gP7dZHrWNNV
+ n+28nPP7/L7n/A5rDQ9ZhnqHxFZqqDzsGM6LOUh2zIWLwu6+Iqu7+zzKlG2MjxRJfYOSkNckpjzGEsUC
+ LkRchkLE3cdXuA0Cak5fFHLqzkqZ8j+JJyfkUo3XH0mnliN8KhCt9QWjVxYDP/NfB36kOTsxzawOC03f
+ 4a2/iZcUW+PJC/4IQgUil+nV5AtGGqngSoMvEK2jG5X6/N9TZzowauoWz8poSSiyPOwxFisWP0UKafla
+ Qo7Wx2XOVTNkyHCgb3RqSs1T2NT5YUZL4hhixxYMQoROql5LXXvCiRoCSlrHARH2gq2Fg0xr2TFGS+Ig
+ 6GnTA/MFIrLcOgKy6wYhq3oAjkgfgOCGFbosHsAaLbCHq4MpzQYNXHhp2N3DV3iDK1y0xgQ9YxR0j3pX
+ xU6zBxq67KAdcANHTkAKqgZGSzKv51vnuwVUfFAZUnxVrtVNQrXWBlWaJyC5OQ6ytgloMzghR2wE1k75
+ L0ZN4NQVoHP3sdDzDkyTLuqHzpFX0E6+oFPn4TbuAjndpLXXCdxLBOw7VA+jtTlCRk3i0BZInfQ/p/H1
+ sPfMXdjF0cG243cguwIHpX4GOBdNgLBb4eNcO9jbMBirRHczapJpDQ+dVPGsNjUnHB+WXcWObT6qhJOS
+ h3Awrxm+vDXB1yUC3j9TgiUvN0Zu1GQd+5vCm1Kvw0xHMfhdOgi9McKy+x687JeA5jTy4XFV5ham8u88
+ kueI7KpzsDTRDO8mWmC26wJYZBnfRgQHtjIl/8YszRIRZZnwVMmF4Qr0MyHM3MEc/T/mymPb+4oPq/By
+ dkpih8X6DcsBlwPmslDeAAAAAElFTkSuQmCC
diff --git a/source/Wave.vbproj b/source/Wave.vbproj
index 194fc890..28ca263f 100644
--- a/source/Wave.vbproj
+++ b/source/Wave.vbproj
@@ -209,6 +209,13 @@
Form
+
+
+ EditChartDialog.vb
+
+
+ Form
+
SaveProjectFileDialog.vb
@@ -225,7 +232,6 @@
-
@@ -246,12 +252,6 @@
Form
-
- AxisDialog.vb
-
-
- Form
-
ConvertErrorValuesDialog.vb
@@ -425,9 +425,6 @@
AboutBox.vb
-
- AxisDialog.vb
-
ConvertErrorValuesDialog.vb
@@ -437,6 +434,9 @@
CalculatorDialog.vb
+
+ EditChartDialog.vb
+
SaveProjectFileDialog.vb
From ca0c024ef13e88c301f1a6d271fd8422cdc00c9c Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Wed, 3 Jan 2024 11:30:14 +0100
Subject: [PATCH 46/57] expose Axis object in order to be able to manipulate it
in `SeriesActiveChanged()`
---
source/Classes/AxisWrapper.vb | 32 ++++++++++++++--------------
source/Controllers/WaveController.vb | 14 ++++++------
2 files changed, 23 insertions(+), 23 deletions(-)
diff --git a/source/Classes/AxisWrapper.vb b/source/Classes/AxisWrapper.vb
index c341d023..d1fc80d2 100644
--- a/source/Classes/AxisWrapper.vb
+++ b/source/Classes/AxisWrapper.vb
@@ -20,30 +20,30 @@
'''
Friend Class AxisWrapper
- Private _axis As ScottPlot.Renderable.Axis
+ Public Axis As ScottPlot.Renderable.Axis
Private _min As Double
Private _max As Double
Private _autoMin As Boolean
Private _autoMax As Boolean
Public Sub New(axis As ScottPlot.Renderable.Axis)
- Me._axis = axis
+ Me.Axis = axis
Me._autoMin = True
Me._autoMax = True
End Sub
Public ReadOnly Property AxisIndex As Integer
Get
- Return Me._axis.AxisIndex
+ Return Me.Axis.AxisIndex
End Get
End Property
Public Property Unit As String
Get
- Return Me._axis.AxisLabel.Label
+ Return Me.Axis.AxisLabel.Label
End Get
Set(value As String)
- Me._axis.AxisLabel.Label = value
+ Me.Axis.AxisLabel.Label = value
End Set
End Property
@@ -69,10 +69,10 @@ Friend Class AxisWrapper
Public Property Max As Double
Get
- Return Me._axis.Dims.Max
+ Return Me.Axis.Dims.Max
End Get
Set(value As Double)
- Me._axis.Dims.SetAxis(min:=Nothing, max:=value)
+ Me.Axis.Dims.SetAxis(min:=Nothing, max:=value)
Me._autoMax = False
'Call Me.setLimits()
End Set
@@ -80,29 +80,29 @@ Friend Class AxisWrapper
Public Property Min As Double
Get
- Return Me._axis.Dims.Min
+ Return Me.Axis.Dims.Min
End Get
Set(value As Double)
- Me._axis.Dims.SetAxis(min:=value, max:=Nothing)
+ Me.Axis.Dims.SetAxis(min:=value, max:=Nothing)
Me._autoMin = False
'Call Me.setLimits()
End Set
End Property
- Private Sub setLimits()
+ Public Sub setLimits()
If Me._autoMin And Me._autoMax Then
- Me._axis.Dims.ResetLimits()
+ Me.Axis.Dims.ResetLimits()
'Me._axis.Dims.SetAxis(min:=Nothing, max:=Nothing)
ElseIf Me._autoMin Then
Dim max As Double = Me.Max
- Me._axis.Dims.ResetLimits()
- Me._axis.Dims.SetAxis(min:=Nothing, max:=max)
+ Me.Axis.Dims.ResetLimits()
+ Me.Axis.Dims.SetAxis(min:=Nothing, max:=max)
ElseIf Me._autoMax Then
Dim min As Double = Me.Min
- Me._axis.Dims.ResetLimits()
- Me._axis.Dims.SetAxis(min:=min, max:=Nothing)
+ Me.Axis.Dims.ResetLimits()
+ Me.Axis.Dims.SetAxis(min:=min, max:=Nothing)
Else
- Me._axis.Dims.SetAxis(Me.Min, Me.Max)
+ Me.Axis.Dims.SetAxis(Me.Min, Me.Max)
End If
End Sub
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 5cf92d9d..4527ba97 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -2551,15 +2551,15 @@ Friend Class WaveController
Next
'rescale and set visibility of axes
- For Each axis As ScottPlot.Renderable.Axis In View.MainPlot.Plot.GetAxesMatching(axisIndex:=Nothing, isVertical:=True)
- axis.Dims.ResetLimits()
- Dim visibility As Boolean = activeUnits.Contains(axis.AxisLabel.Label)
- If axis.AxisIndex <= 1 Then
+ For Each axisW As AxisWrapper In Me.Axes
+ axisW.setLimits()
+ Dim visibility As Boolean = activeUnits.Contains(axisW.Unit)
+ If axisW.AxisIndex <= 1 Then
'left and right axis should never be made completely invisible
- axis.AxisLabel.IsVisible = visibility
- axis.Ticks(enable:=visibility)
+ axisW.Axis.AxisLabel.IsVisible = visibility
+ axisW.Axis.Ticks(enable:=visibility)
Else
- axis.IsVisible = visibility
+ axisW.Axis.IsVisible = visibility
End If
Next
From c28aae4c0a0759f43beef11fce85a1b9bdca5b62 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Wed, 3 Jan 2024 15:00:13 +0100
Subject: [PATCH 47/57] implement analysis result chart
---
source/Analysis/Analysis.vb | 4 +-
.../Analysis/AnalysisResultChart.Designer.vb | 1231 +----------------
source/Analysis/AnalysisResultChart.vb | 28 +-
source/Analysis/TestAnalysis.vb | 2 +-
source/Controllers/WaveController.vb | 4 +-
5 files changed, 40 insertions(+), 1229 deletions(-)
diff --git a/source/Analysis/Analysis.vb b/source/Analysis/Analysis.vb
index d297cbc7..383fc23d 100644
--- a/source/Analysis/Analysis.vb
+++ b/source/Analysis/Analysis.vb
@@ -65,7 +65,7 @@ Friend MustInherit Class Analysis
''' is shown in a separate window if `hasResultChart` is True
'''
''' Optional
- Protected ResultChart As ScottPlot.Plot
+ Protected ResultChart As ScottPlot.FormsPlot
'''
''' List of result series
@@ -144,7 +144,7 @@ Friend MustInherit Class Analysis
''' Analysis result chart
'''
''' Optional
- Public ReadOnly Property getResultChart() As ScottPlot.Plot
+ Public ReadOnly Property getResultChart() As ScottPlot.FormsPlot
Get
Return Me.ResultChart
End Get
diff --git a/source/Analysis/AnalysisResultChart.Designer.vb b/source/Analysis/AnalysisResultChart.Designer.vb
index 8b2ced16..d53f2b19 100644
--- a/source/Analysis/AnalysisResultChart.Designer.vb
+++ b/source/Analysis/AnalysisResultChart.Designer.vb
@@ -1,9 +1,9 @@
- _
+
Partial Class AnalysisResultChart
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
- _
+
Protected Overrides Sub Dispose(disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
@@ -20,14 +20,13 @@ Partial Class AnalysisResultChart
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
- _
+
Private Sub InitializeComponent()
Dim ToolStrip1 As System.Windows.Forms.ToolStrip
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(AnalysisResultChart))
- Dim Margins1 As Steema.TeeChart.Margins = New Steema.TeeChart.Margins()
Me.ToolStripButton_Copy = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_EditChart = New System.Windows.Forms.ToolStripButton()
- Me.TChart1 = New Steema.TeeChart.TChart()
+ Me.Panel1 = New System.Windows.Forms.Panel()
ToolStrip1 = New System.Windows.Forms.ToolStrip()
ToolStrip1.SuspendLayout()
Me.SuspendLayout()
@@ -59,1226 +58,21 @@ Partial Class AnalysisResultChart
Me.ToolStripButton_EditChart.Size = New System.Drawing.Size(23, 22)
Me.ToolStripButton_EditChart.Text = "Edit chart"
'
- 'TChart1
+ 'Panel1
'
- Me.TChart1.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
- Or System.Windows.Forms.AnchorStyles.Left) _
- Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Bottom.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Bottom.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Bottom.Labels.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Bottom.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Bottom.Labels.Font.Size = 9
- Me.TChart1.Axes.Bottom.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Bottom.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Bottom.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Bottom.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Bottom.Title.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Bottom.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Bottom.Title.Font.Size = 11
- Me.TChart1.Axes.Bottom.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Bottom.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Bottom.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Bottom.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Bottom.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Bottom.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Depth.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Depth.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Depth.Labels.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Depth.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Depth.Labels.Font.Size = 9
- Me.TChart1.Axes.Depth.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Depth.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Depth.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Depth.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Depth.Title.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Depth.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Depth.Title.Font.Size = 11
- Me.TChart1.Axes.Depth.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Depth.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Depth.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Depth.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Depth.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Depth.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.DepthTop.Labels.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.DepthTop.Labels.Font.Size = 9
- Me.TChart1.Axes.DepthTop.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.DepthTop.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.DepthTop.Title.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.DepthTop.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.DepthTop.Title.Font.Size = 11
- Me.TChart1.Axes.DepthTop.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.DepthTop.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.DepthTop.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.DepthTop.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.DepthTop.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.DepthTop.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Left.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Left.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Left.Labels.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Left.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Left.Labels.Font.Size = 9
- Me.TChart1.Axes.Left.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Left.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Angle = 90
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Left.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Left.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Left.Title.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Left.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Left.Title.Font.Size = 11
- Me.TChart1.Axes.Left.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Left.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Left.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Left.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Left.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Left.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Right.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Right.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Right.Labels.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Right.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Right.Labels.Font.Size = 9
- Me.TChart1.Axes.Right.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Right.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Angle = 270
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Right.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Right.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Right.Title.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Right.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Right.Title.Font.Size = 11
- Me.TChart1.Axes.Right.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Right.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Right.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Right.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Right.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Right.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Top.Labels.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Top.Labels.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Axes.Top.Labels.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Top.Labels.Font.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Labels.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Top.Labels.Font.Size = 9
- Me.TChart1.Axes.Top.Labels.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Top.Labels.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Labels.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Labels.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Labels.Shadow.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Angle = 0
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Axes.Top.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Axes.Top.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Axes.Top.Title.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Font.Bold = False
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Axes.Top.Title.Font.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Top.Title.Font.Size = 11
- Me.TChart1.Axes.Top.Title.Font.SizeFloat = 11.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Axes.Top.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Axes.Top.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Axes.Top.Title.Shadow.Brush.Solid = True
- Me.TChart1.Axes.Top.Title.Shadow.Brush.Visible = True
- Me.TChart1.Axes.Top.UseMaxPixelPos = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Footer.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Footer.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Footer.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Footer.Brush.Solid = True
- Me.TChart1.Footer.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Footer.Font.Bold = False
- '
- '
- '
- Me.TChart1.Footer.Font.Brush.Color = System.Drawing.Color.Red
- Me.TChart1.Footer.Font.Brush.Solid = True
- Me.TChart1.Footer.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Footer.Font.Shadow.Brush.Solid = True
- Me.TChart1.Footer.Font.Shadow.Brush.Visible = True
- Me.TChart1.Footer.Font.Size = 8
- Me.TChart1.Footer.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Footer.ImageBevel.Brush.Solid = True
- Me.TChart1.Footer.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Footer.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Footer.Shadow.Brush.Solid = True
- Me.TChart1.Footer.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Header.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Header.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Header.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TChart1.Header.Brush.Solid = True
- Me.TChart1.Header.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Header.Font.Bold = False
- '
- '
- '
- Me.TChart1.Header.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Header.Font.Brush.Solid = True
- Me.TChart1.Header.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Header.Font.Shadow.Brush.Solid = True
- Me.TChart1.Header.Font.Shadow.Brush.Visible = True
- Me.TChart1.Header.Font.Size = 12
- Me.TChart1.Header.Font.SizeFloat = 12.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Header.ImageBevel.Brush.Solid = True
- Me.TChart1.Header.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Header.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer))
- Me.TChart1.Header.Shadow.Brush.Solid = True
- Me.TChart1.Header.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Legend.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Legend.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Legend.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Legend.Brush.Solid = True
- Me.TChart1.Legend.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Legend.Font.Bold = False
- '
- '
- '
- Me.TChart1.Legend.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
- Me.TChart1.Legend.Font.Brush.Solid = True
- Me.TChart1.Legend.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Font.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Font.Shadow.Brush.Visible = True
- Me.TChart1.Legend.Font.Size = 9
- Me.TChart1.Legend.Font.SizeFloat = 9.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Legend.ImageBevel.Brush.Solid = True
- Me.TChart1.Legend.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer))
- Me.TChart1.Legend.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Symbol.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Symbol.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Symbol.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Legend.Title.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Legend.Title.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Legend.Title.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Legend.Title.Brush.Solid = True
- Me.TChart1.Legend.Title.Brush.Visible = True
- '
- '
- '
- Me.TChart1.Legend.Title.Font.Bold = True
- '
- '
- '
- Me.TChart1.Legend.Title.Font.Brush.Color = System.Drawing.Color.Black
- Me.TChart1.Legend.Title.Font.Brush.Solid = True
- Me.TChart1.Legend.Title.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Title.Font.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Title.Font.Shadow.Brush.Visible = True
- Me.TChart1.Legend.Title.Font.Size = 8
- Me.TChart1.Legend.Title.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Legend.Title.ImageBevel.Brush.Solid = True
- Me.TChart1.Legend.Title.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Legend.Title.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Legend.Title.Shadow.Brush.Solid = True
- Me.TChart1.Legend.Title.Shadow.Brush.Visible = True
- Me.TChart1.Location = New System.Drawing.Point(0, 25)
- Me.TChart1.Margin = New System.Windows.Forms.Padding(0)
- Me.TChart1.Name = "TChart1"
- '
- '
- '
- '
- '
- '
- Me.TChart1.Panel.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Panel.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Panel.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Panel.Brush.Solid = True
- Me.TChart1.Panel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Panel.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Panel.ImageBevel.Brush.Solid = True
- Me.TChart1.Panel.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Panel.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Panel.Shadow.Brush.Solid = True
- Me.TChart1.Panel.Shadow.Brush.Visible = True
- '
- '
- '
- Margins1.Bottom = 100
- Margins1.Left = 100
- Margins1.Right = 100
- Margins1.Top = 100
- Me.TChart1.Printer.Margins = Margins1
- Me.TChart1.Size = New System.Drawing.Size(784, 424)
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.SubFooter.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.SubFooter.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.SubFooter.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.SubFooter.Brush.Solid = True
- Me.TChart1.SubFooter.Brush.Visible = True
- '
- '
- '
- Me.TChart1.SubFooter.Font.Bold = False
- '
- '
- '
- Me.TChart1.SubFooter.Font.Brush.Color = System.Drawing.Color.Red
- Me.TChart1.SubFooter.Font.Brush.Solid = True
- Me.TChart1.SubFooter.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.SubFooter.Font.Shadow.Brush.Solid = True
- Me.TChart1.SubFooter.Font.Shadow.Brush.Visible = True
- Me.TChart1.SubFooter.Font.Size = 8
- Me.TChart1.SubFooter.Font.SizeFloat = 8.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.SubFooter.ImageBevel.Brush.Solid = True
- Me.TChart1.SubFooter.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubFooter.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.SubFooter.Shadow.Brush.Solid = True
- Me.TChart1.SubFooter.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.SubHeader.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.SubHeader.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.SubHeader.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
- Me.TChart1.SubHeader.Brush.Solid = True
- Me.TChart1.SubHeader.Brush.Visible = True
- '
- '
- '
- Me.TChart1.SubHeader.Font.Bold = False
- '
- '
- '
- Me.TChart1.SubHeader.Font.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.SubHeader.Font.Brush.Solid = True
- Me.TChart1.SubHeader.Font.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.Font.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.SubHeader.Font.Shadow.Brush.Solid = True
- Me.TChart1.SubHeader.Font.Shadow.Brush.Visible = True
- Me.TChart1.SubHeader.Font.Size = 12
- Me.TChart1.SubHeader.Font.SizeFloat = 12.0!
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.SubHeader.ImageBevel.Brush.Solid = True
- Me.TChart1.SubHeader.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.SubHeader.Shadow.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer), CType(CType(169, Byte), Integer))
- Me.TChart1.SubHeader.Shadow.Brush.Solid = True
- Me.TChart1.SubHeader.Shadow.Brush.Visible = True
- Me.TChart1.TabIndex = 0
- '
- '
- '
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Back.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Back.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Back.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Back.Brush.Color = System.Drawing.Color.Silver
- Me.TChart1.Walls.Back.Brush.Solid = True
- Me.TChart1.Walls.Back.Brush.Visible = False
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Back.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Back.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Back.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Back.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Back.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Back.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Bottom.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Bottom.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Bottom.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Bottom.Brush.Color = System.Drawing.Color.White
- Me.TChart1.Walls.Bottom.Brush.Solid = True
- Me.TChart1.Walls.Bottom.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Bottom.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Bottom.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Bottom.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Bottom.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Bottom.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Bottom.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Left.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Left.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Left.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Left.Brush.Color = System.Drawing.Color.LightYellow
- Me.TChart1.Walls.Left.Brush.Solid = True
- Me.TChart1.Walls.Left.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Left.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Left.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Left.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Left.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Left.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Left.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Right.Bevel.ColorOne = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Walls.Right.Bevel.ColorTwo = System.Drawing.Color.FromArgb(CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer), CType(CType(128, Byte), Integer))
- Me.TChart1.Walls.Right.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None
- '
- '
- '
- Me.TChart1.Walls.Right.Brush.Color = System.Drawing.Color.LightYellow
- Me.TChart1.Walls.Right.Brush.Solid = True
- Me.TChart1.Walls.Right.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Right.ImageBevel.Brush.Color = System.Drawing.Color.LightGray
- Me.TChart1.Walls.Right.ImageBevel.Brush.Solid = True
- Me.TChart1.Walls.Right.ImageBevel.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Walls.Right.Shadow.Brush.Color = System.Drawing.Color.DarkGray
- Me.TChart1.Walls.Right.Shadow.Brush.Solid = True
- Me.TChart1.Walls.Right.Shadow.Brush.Visible = True
- '
- '
- '
- '
- '
- '
- Me.TChart1.Zoom.Brush.Color = System.Drawing.Color.FromArgb(CType(CType(127, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(255, Byte), Integer))
- Me.TChart1.Zoom.Brush.Solid = True
- Me.TChart1.Zoom.Brush.Visible = False
+ Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.Panel1.Location = New System.Drawing.Point(0, 25)
+ Me.Panel1.Name = "Panel1"
+ Me.Panel1.Size = New System.Drawing.Size(784, 425)
+ Me.Panel1.TabIndex = 3
'
'AnalysisResultChart
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(784, 450)
+ Me.Controls.Add(Me.Panel1)
Me.Controls.Add(ToolStrip1)
- Me.Controls.Add(Me.TChart1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
Me.MinimumSize = New System.Drawing.Size(400, 200)
Me.Name = "AnalysisResultChart"
@@ -1289,8 +83,7 @@ Partial Class AnalysisResultChart
Me.PerformLayout()
End Sub
-
- Friend WithEvents TChart1 As Steema.TeeChart.TChart
Friend WithEvents ToolStripButton_Copy As ToolStripButton
Friend WithEvents ToolStripButton_EditChart As ToolStripButton
+ Friend WithEvents Panel1 As Panel
End Class
diff --git a/source/Analysis/AnalysisResultChart.vb b/source/Analysis/AnalysisResultChart.vb
index de7d1e70..0c62d0b3 100644
--- a/source/Analysis/AnalysisResultChart.vb
+++ b/source/Analysis/AnalysisResultChart.vb
@@ -17,17 +17,32 @@
'
'''
''' Form to display an analysis result chart
-''' TODO: unlike the main chart, this chart uses the inbuilt TeeChart zoom and pan behaviour, which may be unexpected for users
'''
Friend Class AnalysisResultChart
+ Private formsPlot As ScottPlot.FormsPlot
+
+ Public Sub New(formsPlot As ScottPlot.FormsPlot)
+
+ ' This call is required by the designer.
+ InitializeComponent()
+
+ ' Add any initialization after the InitializeComponent() call.
+ Me.formsPlot = formsPlot
+
+ 'add plot to form
+ Me.formsPlot.Dock = DockStyle.Fill
+ Me.Panel1.Controls.Add(Me.formsPlot)
+
+ End Sub
+
'''
''' Copy chart to clipboard as PNG image
'''
'''
'''
Private Sub ToolStripButton_Copy_Click(sender As Object, e As EventArgs) Handles ToolStripButton_Copy.Click
- Call Me.TChart1.Export.Image.PNG.CopyToClipboard()
+ Clipboard.SetImage(Me.formsPlot.Plot.Render())
End Sub
'''
@@ -35,8 +50,13 @@ Friend Class AnalysisResultChart
'''
'''
'''
- Private Sub ToolStripButton_EditChart_Click(sender As Object, e As EventArgs) Handles ToolStripButton_EditChart.Click, TChart1.DoubleClick
- TChart1.ShowEditor()
+ Private Sub ToolStripButton_EditChart_Click(sender As Object, e As EventArgs) Handles ToolStripButton_EditChart.Click
+ 'TODO: TChart
+ MsgBox("Not yet implemented!", MsgBoxStyle.Critical)
+ End Sub
+
+ Private Sub AnalysisResultChart_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ Me.formsPlot.Refresh()
End Sub
End Class
\ No newline at end of file
diff --git a/source/Analysis/TestAnalysis.vb b/source/Analysis/TestAnalysis.vb
index 4ebb59f1..a2a06652 100644
--- a/source/Analysis/TestAnalysis.vb
+++ b/source/Analysis/TestAnalysis.vb
@@ -139,7 +139,7 @@ Friend Class TestAnalysis
MyBase.ResultValues.Add($"Count values of time series '{title}'", length)
'Result chart (will be shown in separate window)
- MyBase.ResultChart = New ScottPlot.Plot()
+ MyBase.ResultChart = New ScottPlot.FormsPlot()
'Fill and format chart
'...
'...
diff --git a/source/Controllers/WaveController.vb b/source/Controllers/WaveController.vb
index 4527ba97..5fb472e9 100644
--- a/source/Controllers/WaveController.vb
+++ b/source/Controllers/WaveController.vb
@@ -823,10 +823,8 @@ Friend Class WaveController
'--------------------
'Ergebnisdiagramm anzeigen
If (oAnalysis.hasResultChart) Then
- Dim resultChart As New AnalysisResultChart()
+ Dim resultChart As New AnalysisResultChart(oAnalysis.getResultChart())
resultChart.Text &= " - " & oAnalysisDialog.selectedAnalysisFunction.ToString()
- 'TODO: TChart
- 'resultChart.ResultChart.Controls.Add(oAnalysis.getResultChart())
Call resultChart.Show()
End If
From 3bdd2e58ad33a709e0a060d340ae18efe80e4f1d Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Wed, 3 Jan 2024 15:00:46 +0100
Subject: [PATCH 48/57] implement analysis result chart for Autocorrelation
---
source/Analysis/Autocorrelation.vb | 94 +++++++++++++++++-------------
1 file changed, 55 insertions(+), 39 deletions(-)
diff --git a/source/Analysis/Autocorrelation.vb b/source/Analysis/Autocorrelation.vb
index 05b9db6a..b9ab9c34 100644
--- a/source/Analysis/Autocorrelation.vb
+++ b/source/Analysis/Autocorrelation.vb
@@ -197,51 +197,67 @@ Friend Class Autocorrelation
$"Assumed periodicity: {periode_avg} time steps" & eol &
raMaxAuswertung
- 'Ergebnisdiagramm
- Me.ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Header.Text = "Autocorrelation for " & ts_in.Title
-
- 'X-Achse
- Me.ResultChart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
- Me.ResultChart.Axes.Bottom.Title.Caption = "Offset (Lag) [number of time steps]"
-
- 'Y-Achse
- Me.ResultChart.Axes.Left.Title.Caption = "Autocorrelation coefficient (-1 < ra < 1)"
- Me.ResultChart.Axes.Left.Automatic = False
- Me.ResultChart.Axes.Left.Minimum = -1
- Me.ResultChart.Axes.Left.Maximum = 1
-
- 'Linie instanzieren und benennen
- Dim line_ra As New Steema.TeeChart.Styles.Bar(Me.ResultChart)
- line_ra.Title = "Autocorrelogram"
- Dim line_raMax As New Steema.TeeChart.Styles.Points(Me.ResultChart)
- line_raMax.Title = "Peaks (guessed)"
-
- 'Linie befüllen
- For i = 0 To Me.lagCount
- Dim mark As String = $"Lag {i * lagSize}, ra = {raList.Item(i)}"
- line_ra.Add(i * lagSize, raList.Item(i), mark)
- Next
+ 'Result chart
+ Me.ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(Me.ResultChart.Plot)
- For i = 0 To Me.periodeList.Count - 1
- Dim mark As String = $"Lag {periodeList.Item(i)}, ra = {raMaxlist.Item(i)}"
- line_raMax.Add(periodeList.Item(i), raMaxlist.Item(i), mark)
- Next
+ Me.ResultChart.Plot.Title($"Autocorrelation for {ts_in.Title}")
+
+ 'X axis
+ Me.ResultChart.Plot.XLabel("Offset (Lag) [number of time steps]")
+ Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
- 'Marks nicht anzeigen
- line_ra.Marks.Visible = False
+ 'Y axis
+ Me.ResultChart.Plot.YLabel("Autocorrelation coefficient (-1 < ra < 1)")
+ Me.ResultChart.Plot.YAxis.Dims.SetAxis(-1, 1)
- 'Markstips bei Mausaktion anzeigen
- Dim markstips As New Steema.TeeChart.Tools.MarksTip(Me.ResultChart)
- markstips.MouseAction = Steema.TeeChart.Tools.MarksTipMouseAction.Move
+ 'series
+ Dim Xs, Ys As List(Of Double)
+ Dim labels As List(Of String)
- 'Textfeld in Diagramm einfügen und Position bestimmen
- Dim annot As New Steema.TeeChart.Tools.Annotation(Me.ResultChart)
- annot.Text =
+ 'add bar plot
+ Xs = New List(Of Double)
+ Ys = New List(Of Double)
+ labels = New List(Of String)
+ For i = 0 To Me.lagCount
+ Xs.Add(i * lagSize)
+ Ys.Add(raList.Item(i))
+ labels.Add($"Lag {i * lagSize}, ra = {Math.Round(raList.Item(i), 3)}")
+ Next
+ Dim bars As ScottPlot.Plottable.BarPlot
+ bars = Me.ResultChart.Plot.AddBar(values:=Ys.ToArray(), positions:=Xs.ToArray())
+ bars.Label = "Autocorrelogram"
+ bars.BarWidth = lagSize
+ bars.PositionOffset = -0.5 * lagSize 'center bars
+ bars.FillColorNegative = bars.FillColor 'use same color for positive and negative values
+ 'TODO: TChart
+ 'show labels on hover
+ 'Dim markstips As New Steema.TeeChart.Tools.MarksTip(Me.ResultChart)
+ 'markstips.MouseAction = Steema.TeeChart.Tools.MarksTipMouseAction.Move
+
+ 'add point series
+ Xs = New List(Of Double)
+ Ys = New List(Of Double)
+ labels = New List(Of String)
+ For i = 0 To Me.periodeList.Count - 1
+ Xs.Add(periodeList.Item(i))
+ Ys.Add(raMaxlist.Item(i))
+ labels.Add($"Lag {periodeList.Item(i)}, ra = {Math.Round(raMaxlist.Item(i), 3)}")
+ Next
+ Dim points As ScottPlot.Plottable.ScatterPlot
+ points = Me.ResultChart.Plot.AddScatterPoints(Xs.ToArray(), Ys.ToArray(), label:="Peaks (guessed)")
+ points.MarkerShape = ScottPlot.MarkerShape.filledSquare
+ points.MarkerSize = 10
+ points.DataPointLabels = labels.ToArray()
+
+ 'add annotation
+ Dim annot As New ScottPlot.Plottable.Annotation()
+ annot.Label =
$"Time series was offset {lagCount} times by {lagSize} time steps." & eol &
$"Assumed periodicity: {periode_avg}"
- annot.Position = Steema.TeeChart.Tools.AnnotationPositions.RightTop
+ annot.Alignment = ScottPlot.Alignment.LowerRight
+ annot.BackgroundColor = Color.White
+ Me.ResultChart.Plot.Add(annot)
'Announce finish
MyBase.AnalysisProgressFinish()
From 126c2697577c29e696cf0acd03b20817cdd90cc6 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Wed, 3 Jan 2024 15:53:14 +0100
Subject: [PATCH 49/57] implement analysis result chart for
AnnualRecurrenceProbability
---
.../Analysis/AnnualRecurrenceProbability.vb | 69 ++++++++++---------
1 file changed, 35 insertions(+), 34 deletions(-)
diff --git a/source/Analysis/AnnualRecurrenceProbability.vb b/source/Analysis/AnnualRecurrenceProbability.vb
index 01f6b6db..c073b20e 100644
--- a/source/Analysis/AnnualRecurrenceProbability.vb
+++ b/source/Analysis/AnnualRecurrenceProbability.vb
@@ -228,44 +228,45 @@ Friend Class AnnualRecurrenceProbability
)
Next
- 'Chart
- ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(ResultChart)
- ResultChart.Walls.Back.Visible = True
-
- 'Legend
- ResultChart.Legend.CheckBoxes = False
- ResultChart.Legend.Alignment = Steema.TeeChart.LegendAlignments.Top
-
- 'x-Axis
- ResultChart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
- ResultChart.Axes.Bottom.Title.Caption = "Return period [years]"
- ResultChart.Axes.Bottom.Labels.Angle = 90
- ResultChart.Axes.Bottom.Logarithmic = True
- ResultChart.Axes.Bottom.LogarithmicBase = 10
- ResultChart.Axes.Bottom.Automatic = False
- ResultChart.Axes.Bottom.Minimum = 1
- ResultChart.Axes.Bottom.Maximum = 100
- ResultChart.Axes.Bottom.Increment = 1
- ResultChart.Axes.Bottom.Grid.DrawEvery = 1
-
- 'y-Axis
- ResultChart.Axes.Left.AutomaticMaximum = True
- ResultChart.Axes.Left.AutomaticMinimum = False
- ResultChart.Axes.Left.Minimum = 0
- ResultChart.Axes.Left.MaximumRound = True
- ResultChart.Axes.Left.Grid.DrawEvery = 1
- ResultChart.Axes.Left.Title.Caption = Me.InputTimeSeries(0).Unit
+ 'result chart
+ ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(ResultChart.Plot)
+
+ 'legend
+ ResultChart.Plot.Legend.Location = ScottPlot.Alignment.LowerRight
+
+ 'X axis
+ ResultChart.Plot.XLabel("Return period [years]")
+ ResultChart.Plot.XAxis.DateTimeFormat(False)
+ ResultChart.Plot.XAxis.TickLabelStyle(rotation:=90)
+ 'logarithmic labels and ticks
+ ResultChart.Plot.XAxis.TickLabelFormat(Function(x As Double) Math.Pow(10, x).ToString("N0"))
+ ResultChart.Plot.XAxis.MinorLogScale(True)
+ ResultChart.Plot.XAxis.MajorGrid(True, Color.FromArgb(80, Color.Black))
+ ResultChart.Plot.XAxis.MinorGrid(True, Color.FromArgb(20, Color.Black))
+
+ 'Y axis
+ ResultChart.Plot.YLabel(Me.InputTimeSeries(0).Unit)
'point series
- Dim points As New Steema.TeeChart.Styles.Points(ResultChart)
- points.Title = $"Plotting Position ({InputTimeSeries(0).Title})"
+ Dim Xs As New List(Of Double)
+ Dim Ys As New List(Of Double)
+ Dim labels As New List(Of String)
For Each ev As AnnualEvent In Me.events
- points.Add(ev.returnPeriod, ev.maxValue, ev.year.ToString())
+ Xs.Add(Math.Log10(ev.returnPeriod)) 'plot the log value
+ Ys.Add(ev.maxValue)
+ labels.Add(ev.year.ToString())
Next
- 'prepare year label as mark, but hide it by default
- points.Marks.Style = Steema.TeeChart.Styles.MarksStyles.Label
- points.Marks.Visible = False
+ Dim points As ScottPlot.Plottable.ScatterPlot
+ points = ResultChart.Plot.AddScatterPoints(Xs.ToArray(), Ys.ToArray())
+ points.Label = $"Plotting Position ({InputTimeSeries(0).Title})"
+ points.MarkerSize = 10
+ points.MarkerShape = ScottPlot.MarkerShape.filledSquare
+ 'add data point labels
+ points.DataPointLabels = labels.ToArray()
+
+ 'set Y axis limits
+ ResultChart.Plot.YAxis.Dims.SetAxis(0, Ys.Max() * 1.1)
'result series (annual maxima)
Dim ts As New TimeSeries(Me.InputTimeSeries(0).Title + " (annual maxima)")
From dd7307e93f51ebfe68eab56ae7cd1579bb7c5e8b Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 7 Jan 2024 12:19:49 +0100
Subject: [PATCH 50/57] implement analysis result chart for Comparison
---
source/Analysis/Comparison.vb | 86 +++++++++++++++--------------------
1 file changed, 37 insertions(+), 49 deletions(-)
diff --git a/source/Analysis/Comparison.vb b/source/Analysis/Comparison.vb
index 2bb8b9be..077aa92b 100644
--- a/source/Analysis/Comparison.vb
+++ b/source/Analysis/Comparison.vb
@@ -149,63 +149,51 @@ Friend Class Comparison
Dim x_unit As String = Me.ts_x.Unit
Dim y_unit As String = Me.ts_y.Unit
- 'Text:
- '-----
+ 'Result text
Me.ResultText = $"The analysis is based on {Me.ts_x.Length} coincident data points between {Me.ts_x.StartDate.ToString(Helpers.CurrentDateFormat)} and {Me.ts_x.EndDate.ToString(Helpers.CurrentDateFormat)}"
- 'Diagramm:
- '---------
- Dim series_points As Steema.TeeChart.Styles.Points
- Dim regression_line As Steema.TeeChart.Styles.Line
-
- Me.ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Header.Text = $"Comparison ({x_title} / {y_title})"
- Me.ResultChart.Legend.Visible = False
-
- 'Achsen
- '------
- Me.ResultChart.Axes.Bottom.Title.Caption = $"{x_title} [{x_unit}]"
- Me.ResultChart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
- Me.ResultChart.Axes.Left.Title.Caption = $"{y_title} [{y_unit}]"
- Me.ResultChart.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
-
- 'Reihen
- '------
- series_points = New Steema.TeeChart.Styles.Points(Me.ResultChart)
- series_points.Title = $"Comparison {x_title} - {y_title}"
- series_points.Pointer.Visible = True
- series_points.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
- series_points.Pointer.HorizSize = 2
- series_points.Pointer.VertSize = 2
-
- regression_line = New Steema.TeeChart.Styles.Line(Me.ResultChart)
- regression_line.Title = "Regression line"
- regression_line.LinePen.Width = 2
- regression_line.LinePen.Color = Color.Red
-
- 'Plot points
- '-----------
- series_points.Add(x_values, y_values)
-
- 'Plot regression line
- '--------------------
+ 'Result chart
+ Dim series_points As ScottPlot.Plottable.ScatterPlot
+ Dim regression_line As ScottPlot.Plottable.ScatterPlot
+
+ Me.ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(Me.ResultChart.Plot)
+ Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+
+ Me.ResultChart.Plot.Title($"Comparison ({x_title} / {y_title})")
+ Me.ResultChart.Plot.Legend.IsVisible = False
+
+ 'axes
+ Me.ResultChart.Plot.XLabel($"{x_title} [{x_unit}]")
+ Me.ResultChart.Plot.YLabel($"{y_title} [{y_unit}]")
+
+ 'point series
+ series_points = Me.ResultChart.Plot.AddScatterPoints(x_values, y_values)
+ series_points.Label = $"Comparison {x_title} - {y_title}"
+ series_points.MarkerShape = ScottPlot.MarkerShape.filledCircle
+ series_points.MarkerSize = 4
+
+ 'regression line
Dim intercept, slope As Double
Dim x_min, x_max As Double
x_min = x_values.Min()
x_max = x_values.Max()
intercept = Me.ResultValues("Linear regression intercept")
slope = Me.ResultValues("Linear regression slope")
- regression_line.Add(x_min, slope * x_min + intercept)
- regression_line.Add(x_max, slope * x_max + intercept)
-
- 'Annotation
- '----------
- Dim anno As New Steema.TeeChart.Tools.Annotation(Me.ResultChart)
- anno.Position = Steema.TeeChart.Tools.AnnotationPositions.RightBottom
- anno.Text = $"Correlation coefficient: {Me.ResultValues("Correlation coefficient").ToString(DefaultNumberFormat)}" & eol
- anno.Text &= "Linear regression line: " & eol
- anno.Text &= $"y = {slope.ToString(DefaultNumberFormat)} * x + {intercept.ToString(DefaultNumberFormat)}"
+ regression_line = Me.ResultChart.Plot.AddScatterLines({x_min, x_max}, {slope * x_min + intercept, slope * x_max + intercept})
+ regression_line.Label = "Regression line"
+ regression_line.LineWidth = 2
+ regression_line.LineColor = Color.Red
+
+ 'annotation
+ Dim annot As New ScottPlot.Plottable.Annotation()
+ annot.Label =
+ $"Correlation coefficient: {Me.ResultValues("Correlation coefficient").ToString(DefaultNumberFormat)}" & eol &
+ "Linear regression line: " & eol &
+ $"y = {slope.ToString(DefaultNumberFormat)} * x + {intercept.ToString(DefaultNumberFormat)}"
+ annot.Alignment = ScottPlot.Alignment.LowerRight
+ annot.BackgroundColor = Color.White
+ Me.ResultChart.Plot.Add(annot)
End Sub
From f9680d6ee0bc300cd0575f5c8ee9a36553c1cc08 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 7 Jan 2024 12:29:20 +0100
Subject: [PATCH 51/57] implement analysis result chart for DoubleSumCurve
---
source/Analysis/DoubleSumCurve.vb | 60 +++++++++++++------------------
1 file changed, 24 insertions(+), 36 deletions(-)
diff --git a/source/Analysis/DoubleSumCurve.vb b/source/Analysis/DoubleSumCurve.vb
index a3556ac9..740c76e9 100644
--- a/source/Analysis/DoubleSumCurve.vb
+++ b/source/Analysis/DoubleSumCurve.vb
@@ -126,42 +126,30 @@ Friend Class DoubleSumCurve
'-----
Me.ResultText = $"The analysis is based on {Me.summe1.Length} coincident data points between {Me.ts_1.StartDate.ToString(Helpers.CurrentDateFormat)} and {Me.ts_1.EndDate.ToString(Helpers.CurrentDateFormat)}"
- 'Diagramm:
- '---------
- Dim doppelsumme, gerade As Steema.TeeChart.Styles.Line
-
- Me.ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Header.Text = $"Double Sum Curve ({Me.ts_1.Title} / {Me.ts_2.Title})"
- Me.ResultChart.Legend.Visible = False
-
- 'Achsen
- '------
- Me.ResultChart.Axes.Bottom.Title.Caption = $"Sum {Me.ts_1.Title}"
- Me.ResultChart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
- Me.ResultChart.Axes.Left.Title.Caption = $"Sum {Me.ts_2.Title}"
- Me.ResultChart.Axes.Left.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
-
- 'Reihen
- '------
- doppelsumme = New Steema.TeeChart.Styles.Line(Me.ResultChart)
- doppelsumme.Title = $"Double Sum Curve {Me.ts_1.Title} - {Me.ts_2.Title}"
- doppelsumme.Pointer.Visible = True
- doppelsumme.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
- doppelsumme.Pointer.HorizSize = 2
- doppelsumme.Pointer.VertSize = 2
-
- gerade = New Steema.TeeChart.Styles.Line(Me.ResultChart)
- gerade.Title = "45° line"
- gerade.Color = Color.DarkGray
- gerade.LinePen.Style = Drawing2D.DashStyle.Dash
-
- 'Werte eintragen
- doppelsumme.Add(summe1, summe2)
-
- gerade.Add(0, 0)
- Dim maxwert As Double = Math.Min(Me.ResultChart.Axes.Bottom.MaxXValue, Me.ResultChart.Axes.Left.MaxYValue)
- gerade.Add(maxwert, maxwert)
+ 'Result chart:
+ Dim doppelsumme, gerade As ScottPlot.Plottable.ScatterPlot
+
+ Me.ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(Me.ResultChart.Plot)
+ Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+ Me.ResultChart.Plot.Title($"Double Sum Curve ({Me.ts_1.Title} / {Me.ts_2.Title})")
+ Me.ResultChart.Plot.Legend.IsVisible = False
+
+ 'axes
+ Me.ResultChart.Plot.XLabel($"Sum {Me.ts_1.Title}")
+ Me.ResultChart.Plot.YLabel($"Sum {Me.ts_2.Title}")
+
+ 'series
+ doppelsumme = Me.ResultChart.Plot.AddScatter(summe1, summe2)
+ doppelsumme.Label = $"Double Sum Curve {Me.ts_1.Title} - {Me.ts_2.Title}"
+ doppelsumme.MarkerShape = ScottPlot.MarkerShape.filledCircle
+ doppelsumme.MarkerSize = 4
+
+ Dim max As Double = Math.Max(summe1.Max, summe2.Max)
+ gerade = Me.ResultChart.Plot.AddScatterLines({0, max}, {0, max})
+ gerade.Label = "45° line"
+ gerade.LineColor = Color.DarkGray
+ gerade.LineStyle = ScottPlot.LineStyle.Dash
End Sub
From d6503572eed6e33c91fe385d1e9873d03600c750 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 7 Jan 2024 14:19:20 +0100
Subject: [PATCH 52/57] implement analysis result chart for GoodnessOfFit
(still some todos)
---
source/Analysis/GoodnessOfFit.vb | 92 +++++++++++++++-----------------
1 file changed, 43 insertions(+), 49 deletions(-)
diff --git a/source/Analysis/GoodnessOfFit.vb b/source/Analysis/GoodnessOfFit.vb
index 1d53355e..395c2685 100644
--- a/source/Analysis/GoodnessOfFit.vb
+++ b/source/Analysis/GoodnessOfFit.vb
@@ -355,12 +355,13 @@ Friend Class GoodnessOfFit
'result chart (radar plot):
'--------------------------
- 'TODO: m is currently plotted using its absolute value, but labelled with the actual value, while the axis title says "absolute", confusing?
- 'TODO: the axis titles and grid disappear when the last series is unchecked by the user, why?
+ 'TODO: NaN and negative values mess up the chart!
- Me.ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Header.Text = $"Goodness of Fit: {Me.ts_obs.Title} vs. {String.Join(", ", Me.ts_sim_list)}"
+ Me.ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(Me.ResultChart.Plot)
+ Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+
+ Me.ResultChart.Plot.Title($"Goodness of Fit: {Me.ts_obs.Title} vs. {String.Join(", ", Me.ts_sim_list)}")
'determine max absolute volume error for scaling
Dim max_abs_volume_error As Double = 0
@@ -378,55 +379,48 @@ Friend Class GoodnessOfFit
max_abs_volume_error = 0.1
End If
+ Dim axistitles() As String = {
+ "Absolute volume error [%]",
+ "Nash-Sutcliffe efficiency",
+ "Logarithmic Nash-Sutcliffe efficiency",
+ "Kling-Gupta efficiency",
+ "Coefficient of correlation"
+ }
+
+ Dim maxvalues() As Double = {
+ max_abs_volume_error,
+ 1,
+ 1,
+ 1,
+ 1
+ }
+
+ Dim labels As New List(Of String)
For Each series_title As String In Me.GoFResults.Keys
- For Each kvp As KeyValuePair(Of String, GoF) In Me.GoFResults(series_title)
- Dim period = kvp.Key
- Dim gof As GoF = kvp.Value
-
- Dim series As New Steema.TeeChart.Styles.Radar(Me.ResultChart.Chart)
- series.Title = $"{series_title} ({period})"
-
- 'make sure NaN values are handled
- series.TreatNaNAsNull = True
- series.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
-
- 'this is important because otherwise the series nodes are automatically ordered by their x values (angles), potentially messing up the labelling
- series.XValues.Order = Steema.TeeChart.Styles.ValueListOrder.None
-
- 'in the chart, X (angle) represents the actual value, Y is the scaled (plotted) value, text is the axis label
-
- 'scale the absolute volume error to range (-1, 1) and reverse it's sign
- Dim scaled_volume_error As Double = -1 * (gof.abs_volume_error / max_abs_volume_error * 2 + -1)
- 'plot other indicators with their actual values
- series.Add(gof.volume_error, scaled_volume_error, "Volume error [%]")
- series.Add(gof.nash_sutcliffe, gof.nash_sutcliffe, "Nash-Sutcliffe efficiency")
- series.Add(gof.ln_nash_sutcliffe, gof.ln_nash_sutcliffe, "Logarithmic Nash-Sutcliffe efficiency")
- series.Add(gof.kge, gof.kge, "Kling-Gupta efficiency")
- series.Add(gof.coeff_correlation, gof.coeff_correlation, "Coefficient of correlation")
-
- series.Circled = True
- series.Pen.Width = 2
- series.Pen.Color = series.Pointer.Color
- 'series.Color
- series.Brush.Visible = False
- series.Pointer.Visible = True
- series.CircleLabels = True
- series.ClockWiseLabels = False
- series.Marks.Visible = True
- series.Marks.Style = Steema.TeeChart.Styles.MarksStyles.XValue 'label the actual value
- series.Marks.FontSeriesColor = True
+ For Each period As String In Me.GoFResults(series_title).Keys
+ labels.Add($"{series_title} ({period})")
Next
Next
- 'scale radar spokes between -1 and 1
- Me.ResultChart.Axes.Left.Automatic = False
- Me.ResultChart.Axes.Left.Minimum = -1
- Me.ResultChart.Axes.Left.Maximum = 1
+ Dim values(labels.Count - 1, 4) As Double
+
+ Dim i As Integer = 0
+ For Each series_title As String In Me.GoFResults.Keys
+ For Each period As String In Me.GoFResults(series_title).Keys
+ values(i, 0) = Me.GoFResults(series_title)(period).abs_volume_error
+ values(i, 1) = Me.GoFResults(series_title)(period).nash_sutcliffe
+ values(i, 2) = Me.GoFResults(series_title)(period).ln_nash_sutcliffe
+ values(i, 3) = Me.GoFResults(series_title)(period).kge
+ values(i, 4) = Me.GoFResults(series_title)(period).coeff_correlation
+ i += 1
+ Next
+ Next
- 'grid is on chart's left axis
- Me.ResultChart.Axes.Left.Increment = 0.2
- 'labels are on chart's right axis, hide them
- Me.ResultChart.Axes.Right.Labels.Visible = False
+ Dim radar As ScottPlot.Plottable.RadarPlot
+ radar = Me.ResultChart.Plot.AddRadar(values, independentAxes:=True, maxValues:=maxvalues)
+ radar.AxisType = ScottPlot.RadarAxis.Polygon
+ radar.CategoryLabels = axistitles
+ radar.GroupLabels = labels.ToArray()
'result table
'------------
From 08bf06382b4cec57e82f17b094c7c2525bcdb1f2 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 14 Jan 2024 10:03:37 +0100
Subject: [PATCH 53/57] implement analysis result chart for Histogram
---
source/Analysis/Histogram.vb | 97 +++++++++++++++++++-----------------
1 file changed, 50 insertions(+), 47 deletions(-)
diff --git a/source/Analysis/Histogram.vb b/source/Analysis/Histogram.vb
index d4b8d2ac..9179509a 100644
--- a/source/Analysis/Histogram.vb
+++ b/source/Analysis/Histogram.vb
@@ -226,63 +226,66 @@ Friend Class Histogram
'-------------
'TODO: Ergebniswerte zurückgeben?
- 'Ergebnisdiagramm
- '----------------
-
- 'Diagramm formatieren
- Me.ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Header.Text = "Histogram"
-
- 'Achsen
- Me.ResultChart.Axes.Left.Title.Caption = "Probability [%]"
- Me.ResultChart.Axes.Left.Automatic = False
- Me.ResultChart.Axes.Left.Minimum = 0
- Me.ResultChart.Axes.Left.AutomaticMaximum = True
- Me.ResultChart.Axes.Left.MaximumOffset = 2
-
- Me.ResultChart.Axes.Right.Visible = True
- Me.ResultChart.Axes.Right.Title.Caption = "Probability of non-exceedance [%]"
- Me.ResultChart.Axes.Right.Title.Angle = 90
- Me.ResultChart.Axes.Right.Automatic = False
- Me.ResultChart.Axes.Right.Minimum = 0
- Me.ResultChart.Axes.Right.Maximum = 100
- Me.ResultChart.Axes.Right.Grid.Visible = False
-
- Me.ResultChart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Value
- Me.ResultChart.Axes.Bottom.Title.Caption = $"Value [{Me.InputTimeSeries(0).Unit}]"
-
- 'Serien
- For Each res As histogramResults In Me.results
+ 'Result chart
+ '------------
+ Me.ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(Me.ResultChart.Plot)
+ Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+
+ Me.ResultChart.Plot.Title("Histogram")
- Dim serieP As New Steema.TeeChart.Styles.Histogram(Me.ResultChart)
- serieP.Title = $"{res.title} (P(x))"
- serieP.Marks.Visible = False
+ 'series
+ For Each res As histogramResults In Me.results
+ 'bars
+ Dim Xs As New List(Of Double)
+ Dim Ys As New List(Of Double)
For i As Integer = 0 To n_bins - 1
- serieP.Add((Me.breaks(i) + Me.breaks(i + 1)) / 2, res.probability(i), res.probability(i).ToString("F2") & "%")
+ Xs.Add((Me.breaks(i) + Me.breaks(i + 1)) / 2)
+ Ys.Add(res.probability(i))
Next
- Dim seriePU As New Steema.TeeChart.Styles.Line(Me.ResultChart)
- seriePU.VertAxis = Steema.TeeChart.Styles.VerticalAxis.Right
- seriePU.Title = $"{res.title} (PU(x))"
- seriePU.LinePen.Width = 2
- seriePU.Pointer.Visible = True
- seriePU.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Circle
- seriePU.Pointer.HorizSize = 2
- seriePU.Pointer.VertSize = 2
-
+ Dim serieP As ScottPlot.Plottable.BarPlot
+ serieP = Me.ResultChart.Plot.AddBar(values:=Ys.ToArray(), positions:=Xs.ToArray())
+ serieP.Label = $"{res.title} (P(x))"
+ serieP.BarWidth = Me.breaks(1) - Me.breaks(0) 'TODO: bars are not necessarily all the same width!
+ Dim originalColor As Color = serieP.FillColor
+ serieP.FillColor = Color.FromArgb(128, originalColor.R, originalColor.G, originalColor.B)
+ If Me.results.Length = 1 Then
+ 'show values if there is only one series
+ serieP.ShowValuesAboveBars = True
+ serieP.ValueFormatter = Function(v As Double) v.ToString("F2") & "%"
+ End If
+
+ 'line
+ Xs = New List(Of Double)
+ Ys = New List(Of Double)
For i As Integer = 0 To Me.n_bins - 1
- seriePU.Add(Me.breaks(i + 1), res.PU(i), res.PU(i).ToString("F2") & "%")
+ Xs.Add(Me.breaks(i + 1))
+ Ys.Add(res.PU(i))
Next
+ Dim seriePU As ScottPlot.Plottable.ScatterPlot
+ seriePU = Me.ResultChart.Plot.AddScatter(Xs.ToArray(), Ys.ToArray())
+ seriePU.YAxisIndex = 1
+ seriePU.Label = $"{res.title} (PU(x))"
+ seriePU.LineWidth = 2
+ seriePU.MarkerShape = ScottPlot.MarkerShape.filledCircle
+ seriePU.MarkerSize = 4
+ seriePU.Color = originalColor
+
Next
- 'Markstips
- Dim markstip As New Steema.TeeChart.Tools.MarksTip()
- markstip.Style = Steema.TeeChart.Styles.MarksStyles.Label
- 'markstip.MouseAction = Steema.TeeChart.Tools.MarksTipMouseAction.Move
- Me.ResultChart.Tools.Add(markstip)
+ 'axes
+ Me.ResultChart.Plot.XLabel($"Value [{Me.InputTimeSeries(0).Unit}]")
+
+ Me.ResultChart.Plot.YLabel("Probability [%]")
+ Me.ResultChart.Plot.SetAxisLimits(yMin:=0, yAxisIndex:=0)
+
+ Me.ResultChart.Plot.YAxis2.Label("Probability of non-exceedance [%]")
+ Me.ResultChart.Plot.YAxis2.LabelStyle(rotation:=90)
+ Me.ResultChart.Plot.YAxis2.Ticks(enable:=True)
+ Me.ResultChart.Plot.SetAxisLimits(yMin:=0, yMax:=105, yAxisIndex:=1)
End Sub
From 44425054277c7376ff4eacd1725f7e158c1527da Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 14 Jan 2024 13:17:05 +0100
Subject: [PATCH 54/57] implement analysis result chart for MonthlyStatistics
---
source/Analysis/MonthlyStatistics.vb | 142 ++++++++++++---------------
1 file changed, 63 insertions(+), 79 deletions(-)
diff --git a/source/Analysis/MonthlyStatistics.vb b/source/Analysis/MonthlyStatistics.vb
index f1878717..3c46d426 100644
--- a/source/Analysis/MonthlyStatistics.vb
+++ b/source/Analysis/MonthlyStatistics.vb
@@ -27,8 +27,6 @@ Imports BlueM.Wave.AnnualStatistics
Friend Class MonthlyStatistics
Inherits Analysis
-#Region "Data structures"
-
'''
''' Class for storing the statistic values of a month
'''
@@ -43,11 +41,6 @@ Friend Class MonthlyStatistics
Public median As Double
End Class
-
-#End Region 'Data structures
-
-#Region "Members"
-
'''
''' Result of the analysis
'''
@@ -59,9 +52,7 @@ Friend Class MonthlyStatistics
'''
Private isPreviousMonth As Boolean
-#End Region 'Members
-
-#Region "Properties"
+ Private startMonth As Integer
Public Overloads Shared Function Description() As String
Return "Calculates the following statistical values for each month of the year: average, median, minimum, maximum, standard deviation " &
@@ -111,10 +102,6 @@ Friend Class MonthlyStatistics
End Get
End Property
-#End Region ' Properties
-
-#Region "Methoden"
-
'''
''' Constructor
'''
@@ -136,7 +123,7 @@ Friend Class MonthlyStatistics
End If
Me.isPreviousMonth = (dlg.ComboBox_MonthType.SelectedItem = "previous month")
- Dim startMonth As Integer = CType(dlg.ComboBox_startMonth.SelectedItem, Month).number
+ Me.startMonth = CType(dlg.ComboBox_startMonth.SelectedItem, Month).number
'Initialize result data structure
Me.result = New Dictionary(Of Integer, MonthData)
@@ -266,74 +253,71 @@ Friend Class MonthlyStatistics
Next
'Result chart
- '------------
- Dim i As Integer
- Dim mittelwert, median As Steema.TeeChart.Styles.Line
- Dim stdabw As Steema.TeeChart.Styles.Error
- Dim minmax As Steema.TeeChart.Styles.HighLow
-
- 'Diagram
- Me.ResultChart = New Steema.TeeChart.Chart()
- Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Header.Text = $"Monthly statistics ({Me.InputTimeSeries(0).Title})"
-
- 'Axes
- Me.ResultChart.Axes.Bottom.Labels.Style = Steema.TeeChart.AxisLabelStyle.Text
- Me.ResultChart.Axes.Bottom.Labels.Angle = 90
- Me.ResultChart.Axes.Bottom.MinorTickCount = 0
- Me.ResultChart.Axes.Left.Title.Text = Me.InputTimeSeries(0).Unit
-
- 'Series
-
- 'MinMax
- minmax = New Steema.TeeChart.Styles.HighLow(Me.ResultChart)
- minmax.DefaultNullValue = Double.NaN
- minmax.Title = "Min / Max"
- minmax.Color = Color.DarkGray
- minmax.Pen.Color = Color.DarkGray
- minmax.HighBrush.Visible = True
- minmax.HighBrush.Color = Color.LightGray
- minmax.HighBrush.Transparency = 50
- For i = 1 To 12
- minmax.Add(Me.result(i).index, Me.result(i).max, Me.result(i).min, Me.result(i).month.name)
- Next
-
- 'Standard deviation
- stdabw = New Steema.TeeChart.Styles.Error(Me.ResultChart)
- stdabw.DefaultNullValue = Double.NaN
- stdabw.Title = "Standard deviation"
- stdabw.Color = Color.Red
- stdabw.ErrorWidth = 50
- For i = 1 To 12
- 'Skip months with no or NaN data
- If Me.result(i).values.Count > 0 And Not Double.IsNaN(Me.result(i).stddev) Then
- stdabw.Add(Me.result(i).index, Me.result(i).average, Me.result(i).stddev, Me.result(i).month.name)
- End If
+ Me.ResultChart = New ScottPlot.FormsPlot()
+ Call Helpers.FormatChart(Me.ResultChart.Plot)
+ Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+ Me.ResultChart.Plot.Title($"Monthly statistics ({Me.InputTimeSeries(0).Title})")
+
+ 'sort month data by index for plotting
+ Dim monthDatas As List(Of MonthData) = Me.result.Values.ToList()
+ monthDatas.Sort(Function(m1 As MonthData, m2 As MonthData)
+ Return m1.index.CompareTo(m2.index)
+ End Function)
+
+ 'collect data
+ Dim Xs As Double() = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}
+ Dim xLabels As New List(Of String)
+ Dim mins As New List(Of Double)
+ Dim maxs As New List(Of Double)
+ Dim avgs As New List(Of Double)
+ Dim stddevs As New List(Of Double)
+ Dim medians As New List(Of Double)
+ For Each monthdata As MonthData In monthDatas
+ xLabels.Add(monthdata.month.name)
+ mins.Add(monthdata.min)
+ maxs.Add(monthdata.max)
+ avgs.Add(monthdata.average)
+ stddevs.Add(monthdata.stddev)
+ medians.Add(monthdata.median)
Next
- 'Average
- mittelwert = New Steema.TeeChart.Styles.Line(Me.ResultChart)
- mittelwert.TreatNaNAsNull = True
- mittelwert.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
- mittelwert.Title = "Average"
- mittelwert.Color = Color.Blue
- mittelwert.LinePen.Width = 2
- For i = 1 To 12
- mittelwert.Add(Me.result(i).index, Me.result(i).average, Me.result(i).month.name)
- Next
-
- 'Median
- median = New Steema.TeeChart.Styles.Line(Me.ResultChart)
- median.TreatNaNAsNull = True
- median.TreatNulls = Steema.TeeChart.Styles.TreatNullsStyle.DoNotPaint
- median.Title = "Median"
+ 'axes
+ Me.ResultChart.Plot.XAxis.ManualTickPositions(Xs, xLabels.ToArray)
+ Me.ResultChart.Plot.XAxis.AxisTicks.TickLabelRotation = 90
+ Me.ResultChart.Plot.XAxis.AxisTicks.MinorGridVisible = False
+ Me.ResultChart.Plot.YLabel(Me.InputTimeSeries(0).Unit)
+
+ 'series min-max
+ Dim minmax As ScottPlot.Plottable.Polygon
+ minmax = Me.ResultChart.Plot.AddFill(Xs, mins.ToArray(), maxs.ToArray())
+ minmax.Label = "Min / Max"
+ minmax.FillColor = Color.FromArgb(128, Color.LightGray.R, Color.LightGray.G, Color.LightGray.B)
+ minmax.LineColor = Color.DarkGray
+ minmax.LineWidth = 1
+
+ 'series standard deviation
+ Dim stddev As ScottPlot.Plottable.ErrorBar
+ stddev = Me.ResultChart.Plot.AddErrorBars(Xs, avgs.ToArray(), xErrors:=Nothing, yErrors:=stddevs.ToArray())
+ stddev.Label = "Standard deviation"
+ stddev.Color = Color.Red
+ stddev.CapSize = 8
+
+ 'series average
+ Dim avg As ScottPlot.Plottable.ScatterPlot
+ avg = Me.ResultChart.Plot.AddScatterLines(Xs, avgs.ToArray())
+ avg.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
+ avg.Label = "Average"
+ avg.Color = Color.Blue
+ avg.LineWidth = 2
+
+ 'series median
+ Dim median As ScottPlot.Plottable.ScatterPlot
+ median = Me.ResultChart.Plot.AddScatterLines(Xs, medians.ToArray())
+ median.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
+ median.Label = "Median"
median.Color = Color.Green
- For i = 1 To 12
- median.Add(Me.result(i).index, Me.result(i).median, Me.result(i).month.name)
- Next
+ median.LineWidth = 1
End Sub
-#End Region 'Methods
-
End Class
\ No newline at end of file
From b6e00e258766b9ca7b7aaecafe22ba36a73aae33 Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 14 Jan 2024 13:47:55 +0100
Subject: [PATCH 55/57] better handling of months with no data in
MonthlyStatistics result chart
---
source/Analysis/MonthlyStatistics.vb | 63 ++++++++++++++--------------
1 file changed, 32 insertions(+), 31 deletions(-)
diff --git a/source/Analysis/MonthlyStatistics.vb b/source/Analysis/MonthlyStatistics.vb
index 3c46d426..1e534450 100644
--- a/source/Analysis/MonthlyStatistics.vb
+++ b/source/Analysis/MonthlyStatistics.vb
@@ -200,7 +200,11 @@ Friend Class MonthlyStatistics
End If
Else
Log.AddLogEntry(Log.levels.warning, $"The series does not contain any data for the month of { .month}!")
- 'TODO: ideally we would set all result values to Double.NaN here but this inexplicably causes the result chart to crash!
+ .average = Double.NaN
+ .stddev = Double.NaN
+ .min = Double.NaN
+ .max = Double.NaN
+ .median = Double.NaN
End If
End With
@@ -227,29 +231,16 @@ Friend Class MonthlyStatistics
Me.ResultTable.Columns.Add("Standard deviation", GetType(Double))
For Each monthData As MonthData In Me.result.Values
- If monthData.values.Count > 0 Then
- Me.ResultTable.Rows.Add(
- monthData.month.number,
- monthData.month.name,
- monthData.values.Count,
- monthData.average,
- monthData.median,
- monthData.min,
- monthData.max,
- monthData.stddev
- )
- Else
- Me.ResultTable.Rows.Add(
- monthData.month.number,
- monthData.month.name,
- monthData.values.Count,
- Double.NaN,
- Double.NaN,
- Double.NaN,
- Double.NaN,
- Double.NaN
- )
- End If
+ Me.ResultTable.Rows.Add(
+ monthData.month.number,
+ monthData.month.name,
+ monthData.values.Count,
+ monthData.average,
+ monthData.median,
+ monthData.min,
+ monthData.max,
+ monthData.stddev
+ )
Next
'Result chart
@@ -270,19 +261,29 @@ Friend Class MonthlyStatistics
Dim mins As New List(Of Double)
Dim maxs As New List(Of Double)
Dim avgs As New List(Of Double)
+ Dim stddevbases As New List(Of Double)
Dim stddevs As New List(Of Double)
Dim medians As New List(Of Double)
For Each monthdata As MonthData In monthDatas
xLabels.Add(monthdata.month.name)
- mins.Add(monthdata.min)
- maxs.Add(monthdata.max)
avgs.Add(monthdata.average)
- stddevs.Add(monthdata.stddev)
medians.Add(monthdata.median)
+ If monthdata.values.Count > 0 Then
+ mins.Add(monthdata.min)
+ maxs.Add(monthdata.max)
+ stddevbases.Add(monthdata.stddev)
+ stddevs.Add(monthdata.stddev)
+ Else
+ 'series that cannot handle NaNs are displayed as 0
+ mins.Add(0)
+ maxs.Add(0)
+ stddevbases.Add(0)
+ stddevs.Add(0)
+ End If
Next
'axes
- Me.ResultChart.Plot.XAxis.ManualTickPositions(Xs, xLabels.ToArray)
+ Me.ResultChart.Plot.XAxis.ManualTickPositions(Xs, xLabels.ToArray())
Me.ResultChart.Plot.XAxis.AxisTicks.TickLabelRotation = 90
Me.ResultChart.Plot.XAxis.AxisTicks.MinorGridVisible = False
Me.ResultChart.Plot.YLabel(Me.InputTimeSeries(0).Unit)
@@ -297,14 +298,14 @@ Friend Class MonthlyStatistics
'series standard deviation
Dim stddev As ScottPlot.Plottable.ErrorBar
- stddev = Me.ResultChart.Plot.AddErrorBars(Xs, avgs.ToArray(), xErrors:=Nothing, yErrors:=stddevs.ToArray())
+ stddev = Me.ResultChart.Plot.AddErrorBars(Xs, stddevbases.ToArray(), xErrors:=Nothing, yErrors:=stddevs.ToArray())
stddev.Label = "Standard deviation"
stddev.Color = Color.Red
stddev.CapSize = 8
'series average
Dim avg As ScottPlot.Plottable.ScatterPlot
- avg = Me.ResultChart.Plot.AddScatterLines(Xs, avgs.ToArray())
+ avg = Me.ResultChart.Plot.AddScatter(Xs, avgs.ToArray())
avg.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
avg.Label = "Average"
avg.Color = Color.Blue
@@ -312,7 +313,7 @@ Friend Class MonthlyStatistics
'series median
Dim median As ScottPlot.Plottable.ScatterPlot
- median = Me.ResultChart.Plot.AddScatterLines(Xs, medians.ToArray())
+ median = Me.ResultChart.Plot.AddScatter(Xs, medians.ToArray())
median.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
median.Label = "Median"
median.Color = Color.Green
From b86853d0a7f761ddd6b2e3275c00eab647b4735f Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 14 Jan 2024 23:02:39 +0100
Subject: [PATCH 56/57] change type of Analysis.ResultChart to ScottPlot.Plot
---
source/Analysis/Analysis.vb | 4 +--
.../Analysis/AnalysisResultChart.Designer.vb | 13 ++++++++++
source/Analysis/AnalysisResultChart.vb | 14 ++++------
.../Analysis/AnnualRecurrenceProbability.vb | 26 +++++++++----------
source/Analysis/Autocorrelation.vb | 20 +++++++-------
source/Analysis/Comparison.vb | 20 +++++++-------
source/Analysis/DoubleSumCurve.vb | 18 ++++++-------
source/Analysis/GoodnessOfFit.vb | 10 +++----
source/Analysis/Histogram.vb | 26 +++++++++----------
source/Analysis/MonthlyStatistics.vb | 24 ++++++++---------
source/Analysis/TestAnalysis.vb | 2 +-
11 files changed, 93 insertions(+), 84 deletions(-)
diff --git a/source/Analysis/Analysis.vb b/source/Analysis/Analysis.vb
index 383fc23d..d297cbc7 100644
--- a/source/Analysis/Analysis.vb
+++ b/source/Analysis/Analysis.vb
@@ -65,7 +65,7 @@ Friend MustInherit Class Analysis
''' is shown in a separate window if `hasResultChart` is True
'''
''' Optional
- Protected ResultChart As ScottPlot.FormsPlot
+ Protected ResultChart As ScottPlot.Plot
'''
''' List of result series
@@ -144,7 +144,7 @@ Friend MustInherit Class Analysis
''' Analysis result chart
'''
''' Optional
- Public ReadOnly Property getResultChart() As ScottPlot.FormsPlot
+ Public ReadOnly Property getResultChart() As ScottPlot.Plot
Get
Return Me.ResultChart
End Get
diff --git a/source/Analysis/AnalysisResultChart.Designer.vb b/source/Analysis/AnalysisResultChart.Designer.vb
index d53f2b19..ace11da0 100644
--- a/source/Analysis/AnalysisResultChart.Designer.vb
+++ b/source/Analysis/AnalysisResultChart.Designer.vb
@@ -27,8 +27,10 @@ Partial Class AnalysisResultChart
Me.ToolStripButton_Copy = New System.Windows.Forms.ToolStripButton()
Me.ToolStripButton_EditChart = New System.Windows.Forms.ToolStripButton()
Me.Panel1 = New System.Windows.Forms.Panel()
+ Me.ResultPlot = New ScottPlot.FormsPlot()
ToolStrip1 = New System.Windows.Forms.ToolStrip()
ToolStrip1.SuspendLayout()
+ Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'ToolStrip1
@@ -60,12 +62,21 @@ Partial Class AnalysisResultChart
'
'Panel1
'
+ Me.Panel1.Controls.Add(Me.ResultPlot)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel1.Location = New System.Drawing.Point(0, 25)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(784, 425)
Me.Panel1.TabIndex = 3
'
+ 'ResultPlot
+ '
+ Me.ResultPlot.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.ResultPlot.Location = New System.Drawing.Point(0, 0)
+ Me.ResultPlot.Name = "ResultPlot"
+ Me.ResultPlot.Size = New System.Drawing.Size(784, 425)
+ Me.ResultPlot.TabIndex = 0
+ '
'AnalysisResultChart
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -79,6 +90,7 @@ Partial Class AnalysisResultChart
Me.Text = "Analysis Result Chart"
ToolStrip1.ResumeLayout(False)
ToolStrip1.PerformLayout()
+ Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -86,4 +98,5 @@ Partial Class AnalysisResultChart
Friend WithEvents ToolStripButton_Copy As ToolStripButton
Friend WithEvents ToolStripButton_EditChart As ToolStripButton
Friend WithEvents Panel1 As Panel
+ Friend WithEvents ResultPlot As ScottPlot.FormsPlot
End Class
diff --git a/source/Analysis/AnalysisResultChart.vb b/source/Analysis/AnalysisResultChart.vb
index 0c62d0b3..1f12061d 100644
--- a/source/Analysis/AnalysisResultChart.vb
+++ b/source/Analysis/AnalysisResultChart.vb
@@ -20,19 +20,15 @@
'''
Friend Class AnalysisResultChart
- Private formsPlot As ScottPlot.FormsPlot
-
- Public Sub New(formsPlot As ScottPlot.FormsPlot)
+ Public Sub New(plot As ScottPlot.Plot)
' This call is required by the designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
- Me.formsPlot = formsPlot
- 'add plot to form
- Me.formsPlot.Dock = DockStyle.Fill
- Me.Panel1.Controls.Add(Me.formsPlot)
+ 'replace the plot
+ Me.ResultPlot.Reset(plot)
End Sub
@@ -42,7 +38,7 @@ Friend Class AnalysisResultChart
'''
'''
Private Sub ToolStripButton_Copy_Click(sender As Object, e As EventArgs) Handles ToolStripButton_Copy.Click
- Clipboard.SetImage(Me.formsPlot.Plot.Render())
+ Clipboard.SetImage(Me.ResultPlot.Plot.Render())
End Sub
'''
@@ -56,7 +52,7 @@ Friend Class AnalysisResultChart
End Sub
Private Sub AnalysisResultChart_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Me.formsPlot.Refresh()
+ Me.ResultPlot.Refresh()
End Sub
End Class
\ No newline at end of file
diff --git a/source/Analysis/AnnualRecurrenceProbability.vb b/source/Analysis/AnnualRecurrenceProbability.vb
index c073b20e..2a4c20dd 100644
--- a/source/Analysis/AnnualRecurrenceProbability.vb
+++ b/source/Analysis/AnnualRecurrenceProbability.vb
@@ -229,24 +229,24 @@ Friend Class AnnualRecurrenceProbability
Next
'result chart
- ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(ResultChart.Plot)
+ ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(ResultChart)
'legend
- ResultChart.Plot.Legend.Location = ScottPlot.Alignment.LowerRight
+ ResultChart.Legend.Location = ScottPlot.Alignment.LowerRight
'X axis
- ResultChart.Plot.XLabel("Return period [years]")
- ResultChart.Plot.XAxis.DateTimeFormat(False)
- ResultChart.Plot.XAxis.TickLabelStyle(rotation:=90)
+ ResultChart.XLabel("Return period [years]")
+ ResultChart.XAxis.DateTimeFormat(False)
+ ResultChart.XAxis.TickLabelStyle(rotation:=90)
'logarithmic labels and ticks
- ResultChart.Plot.XAxis.TickLabelFormat(Function(x As Double) Math.Pow(10, x).ToString("N0"))
- ResultChart.Plot.XAxis.MinorLogScale(True)
- ResultChart.Plot.XAxis.MajorGrid(True, Color.FromArgb(80, Color.Black))
- ResultChart.Plot.XAxis.MinorGrid(True, Color.FromArgb(20, Color.Black))
+ ResultChart.XAxis.TickLabelFormat(Function(x As Double) Math.Pow(10, x).ToString("N0"))
+ ResultChart.XAxis.MinorLogScale(True)
+ ResultChart.XAxis.MajorGrid(True, Color.FromArgb(80, Color.Black))
+ ResultChart.XAxis.MinorGrid(True, Color.FromArgb(20, Color.Black))
'Y axis
- ResultChart.Plot.YLabel(Me.InputTimeSeries(0).Unit)
+ ResultChart.YLabel(Me.InputTimeSeries(0).Unit)
'point series
Dim Xs As New List(Of Double)
@@ -258,7 +258,7 @@ Friend Class AnnualRecurrenceProbability
labels.Add(ev.year.ToString())
Next
Dim points As ScottPlot.Plottable.ScatterPlot
- points = ResultChart.Plot.AddScatterPoints(Xs.ToArray(), Ys.ToArray())
+ points = ResultChart.AddScatterPoints(Xs.ToArray(), Ys.ToArray())
points.Label = $"Plotting Position ({InputTimeSeries(0).Title})"
points.MarkerSize = 10
points.MarkerShape = ScottPlot.MarkerShape.filledSquare
@@ -266,7 +266,7 @@ Friend Class AnnualRecurrenceProbability
points.DataPointLabels = labels.ToArray()
'set Y axis limits
- ResultChart.Plot.YAxis.Dims.SetAxis(0, Ys.Max() * 1.1)
+ ResultChart.YAxis.Dims.SetAxis(0, Ys.Max() * 1.1)
'result series (annual maxima)
Dim ts As New TimeSeries(Me.InputTimeSeries(0).Title + " (annual maxima)")
diff --git a/source/Analysis/Autocorrelation.vb b/source/Analysis/Autocorrelation.vb
index b9ab9c34..a3ebc8c8 100644
--- a/source/Analysis/Autocorrelation.vb
+++ b/source/Analysis/Autocorrelation.vb
@@ -198,18 +198,18 @@ Friend Class Autocorrelation
raMaxAuswertung
'Result chart
- Me.ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(Me.ResultChart.Plot)
+ Me.ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(Me.ResultChart)
- Me.ResultChart.Plot.Title($"Autocorrelation for {ts_in.Title}")
+ Me.ResultChart.Title($"Autocorrelation for {ts_in.Title}")
'X axis
- Me.ResultChart.Plot.XLabel("Offset (Lag) [number of time steps]")
- Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+ Me.ResultChart.XLabel("Offset (Lag) [number of time steps]")
+ Me.ResultChart.XAxis.DateTimeFormat(False)
'Y axis
- Me.ResultChart.Plot.YLabel("Autocorrelation coefficient (-1 < ra < 1)")
- Me.ResultChart.Plot.YAxis.Dims.SetAxis(-1, 1)
+ Me.ResultChart.YLabel("Autocorrelation coefficient (-1 < ra < 1)")
+ Me.ResultChart.YAxis.Dims.SetAxis(-1, 1)
'series
Dim Xs, Ys As List(Of Double)
@@ -225,7 +225,7 @@ Friend Class Autocorrelation
labels.Add($"Lag {i * lagSize}, ra = {Math.Round(raList.Item(i), 3)}")
Next
Dim bars As ScottPlot.Plottable.BarPlot
- bars = Me.ResultChart.Plot.AddBar(values:=Ys.ToArray(), positions:=Xs.ToArray())
+ bars = Me.ResultChart.AddBar(values:=Ys.ToArray(), positions:=Xs.ToArray())
bars.Label = "Autocorrelogram"
bars.BarWidth = lagSize
bars.PositionOffset = -0.5 * lagSize 'center bars
@@ -245,7 +245,7 @@ Friend Class Autocorrelation
labels.Add($"Lag {periodeList.Item(i)}, ra = {Math.Round(raMaxlist.Item(i), 3)}")
Next
Dim points As ScottPlot.Plottable.ScatterPlot
- points = Me.ResultChart.Plot.AddScatterPoints(Xs.ToArray(), Ys.ToArray(), label:="Peaks (guessed)")
+ points = Me.ResultChart.AddScatterPoints(Xs.ToArray(), Ys.ToArray(), label:="Peaks (guessed)")
points.MarkerShape = ScottPlot.MarkerShape.filledSquare
points.MarkerSize = 10
points.DataPointLabels = labels.ToArray()
@@ -257,7 +257,7 @@ Friend Class Autocorrelation
$"Assumed periodicity: {periode_avg}"
annot.Alignment = ScottPlot.Alignment.LowerRight
annot.BackgroundColor = Color.White
- Me.ResultChart.Plot.Add(annot)
+ Me.ResultChart.Add(annot)
'Announce finish
MyBase.AnalysisProgressFinish()
diff --git a/source/Analysis/Comparison.vb b/source/Analysis/Comparison.vb
index 077aa92b..97f0e60d 100644
--- a/source/Analysis/Comparison.vb
+++ b/source/Analysis/Comparison.vb
@@ -156,19 +156,19 @@ Friend Class Comparison
Dim series_points As ScottPlot.Plottable.ScatterPlot
Dim regression_line As ScottPlot.Plottable.ScatterPlot
- Me.ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(Me.ResultChart.Plot)
- Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+ Me.ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(Me.ResultChart)
+ Me.ResultChart.XAxis.DateTimeFormat(False)
- Me.ResultChart.Plot.Title($"Comparison ({x_title} / {y_title})")
- Me.ResultChart.Plot.Legend.IsVisible = False
+ Me.ResultChart.Title($"Comparison ({x_title} / {y_title})")
+ Me.ResultChart.Legend.IsVisible = False
'axes
- Me.ResultChart.Plot.XLabel($"{x_title} [{x_unit}]")
- Me.ResultChart.Plot.YLabel($"{y_title} [{y_unit}]")
+ Me.ResultChart.XLabel($"{x_title} [{x_unit}]")
+ Me.ResultChart.YLabel($"{y_title} [{y_unit}]")
'point series
- series_points = Me.ResultChart.Plot.AddScatterPoints(x_values, y_values)
+ series_points = Me.ResultChart.AddScatterPoints(x_values, y_values)
series_points.Label = $"Comparison {x_title} - {y_title}"
series_points.MarkerShape = ScottPlot.MarkerShape.filledCircle
series_points.MarkerSize = 4
@@ -180,7 +180,7 @@ Friend Class Comparison
x_max = x_values.Max()
intercept = Me.ResultValues("Linear regression intercept")
slope = Me.ResultValues("Linear regression slope")
- regression_line = Me.ResultChart.Plot.AddScatterLines({x_min, x_max}, {slope * x_min + intercept, slope * x_max + intercept})
+ regression_line = Me.ResultChart.AddScatterLines({x_min, x_max}, {slope * x_min + intercept, slope * x_max + intercept})
regression_line.Label = "Regression line"
regression_line.LineWidth = 2
regression_line.LineColor = Color.Red
@@ -193,7 +193,7 @@ Friend Class Comparison
$"y = {slope.ToString(DefaultNumberFormat)} * x + {intercept.ToString(DefaultNumberFormat)}"
annot.Alignment = ScottPlot.Alignment.LowerRight
annot.BackgroundColor = Color.White
- Me.ResultChart.Plot.Add(annot)
+ Me.ResultChart.Add(annot)
End Sub
diff --git a/source/Analysis/DoubleSumCurve.vb b/source/Analysis/DoubleSumCurve.vb
index 740c76e9..dd84594f 100644
--- a/source/Analysis/DoubleSumCurve.vb
+++ b/source/Analysis/DoubleSumCurve.vb
@@ -129,24 +129,24 @@ Friend Class DoubleSumCurve
'Result chart:
Dim doppelsumme, gerade As ScottPlot.Plottable.ScatterPlot
- Me.ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(Me.ResultChart.Plot)
- Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
- Me.ResultChart.Plot.Title($"Double Sum Curve ({Me.ts_1.Title} / {Me.ts_2.Title})")
- Me.ResultChart.Plot.Legend.IsVisible = False
+ Me.ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(Me.ResultChart)
+ Me.ResultChart.XAxis.DateTimeFormat(False)
+ Me.ResultChart.Title($"Double Sum Curve ({Me.ts_1.Title} / {Me.ts_2.Title})")
+ Me.ResultChart.Legend.IsVisible = False
'axes
- Me.ResultChart.Plot.XLabel($"Sum {Me.ts_1.Title}")
- Me.ResultChart.Plot.YLabel($"Sum {Me.ts_2.Title}")
+ Me.ResultChart.XLabel($"Sum {Me.ts_1.Title}")
+ Me.ResultChart.YLabel($"Sum {Me.ts_2.Title}")
'series
- doppelsumme = Me.ResultChart.Plot.AddScatter(summe1, summe2)
+ doppelsumme = Me.ResultChart.AddScatter(summe1, summe2)
doppelsumme.Label = $"Double Sum Curve {Me.ts_1.Title} - {Me.ts_2.Title}"
doppelsumme.MarkerShape = ScottPlot.MarkerShape.filledCircle
doppelsumme.MarkerSize = 4
Dim max As Double = Math.Max(summe1.Max, summe2.Max)
- gerade = Me.ResultChart.Plot.AddScatterLines({0, max}, {0, max})
+ gerade = Me.ResultChart.AddScatterLines({0, max}, {0, max})
gerade.Label = "45° line"
gerade.LineColor = Color.DarkGray
gerade.LineStyle = ScottPlot.LineStyle.Dash
diff --git a/source/Analysis/GoodnessOfFit.vb b/source/Analysis/GoodnessOfFit.vb
index 395c2685..9d05eb6a 100644
--- a/source/Analysis/GoodnessOfFit.vb
+++ b/source/Analysis/GoodnessOfFit.vb
@@ -357,11 +357,11 @@ Friend Class GoodnessOfFit
'--------------------------
'TODO: NaN and negative values mess up the chart!
- Me.ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(Me.ResultChart.Plot)
- Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+ Me.ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(Me.ResultChart)
+ Me.ResultChart.XAxis.DateTimeFormat(False)
- Me.ResultChart.Plot.Title($"Goodness of Fit: {Me.ts_obs.Title} vs. {String.Join(", ", Me.ts_sim_list)}")
+ Me.ResultChart.Title($"Goodness of Fit: {Me.ts_obs.Title} vs. {String.Join(", ", Me.ts_sim_list)}")
'determine max absolute volume error for scaling
Dim max_abs_volume_error As Double = 0
@@ -417,7 +417,7 @@ Friend Class GoodnessOfFit
Next
Dim radar As ScottPlot.Plottable.RadarPlot
- radar = Me.ResultChart.Plot.AddRadar(values, independentAxes:=True, maxValues:=maxvalues)
+ radar = Me.ResultChart.AddRadar(values, independentAxes:=True, maxValues:=maxvalues)
radar.AxisType = ScottPlot.RadarAxis.Polygon
radar.CategoryLabels = axistitles
radar.GroupLabels = labels.ToArray()
diff --git a/source/Analysis/Histogram.vb b/source/Analysis/Histogram.vb
index 9179509a..7d60fce0 100644
--- a/source/Analysis/Histogram.vb
+++ b/source/Analysis/Histogram.vb
@@ -228,11 +228,11 @@ Friend Class Histogram
'Result chart
'------------
- Me.ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(Me.ResultChart.Plot)
- Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
+ Me.ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(Me.ResultChart)
+ Me.ResultChart.XAxis.DateTimeFormat(False)
- Me.ResultChart.Plot.Title("Histogram")
+ Me.ResultChart.Title("Histogram")
'series
For Each res As histogramResults In Me.results
@@ -246,7 +246,7 @@ Friend Class Histogram
Next
Dim serieP As ScottPlot.Plottable.BarPlot
- serieP = Me.ResultChart.Plot.AddBar(values:=Ys.ToArray(), positions:=Xs.ToArray())
+ serieP = Me.ResultChart.AddBar(values:=Ys.ToArray(), positions:=Xs.ToArray())
serieP.Label = $"{res.title} (P(x))"
serieP.BarWidth = Me.breaks(1) - Me.breaks(0) 'TODO: bars are not necessarily all the same width!
Dim originalColor As Color = serieP.FillColor
@@ -266,7 +266,7 @@ Friend Class Histogram
Next
Dim seriePU As ScottPlot.Plottable.ScatterPlot
- seriePU = Me.ResultChart.Plot.AddScatter(Xs.ToArray(), Ys.ToArray())
+ seriePU = Me.ResultChart.AddScatter(Xs.ToArray(), Ys.ToArray())
seriePU.YAxisIndex = 1
seriePU.Label = $"{res.title} (PU(x))"
seriePU.LineWidth = 2
@@ -277,15 +277,15 @@ Friend Class Histogram
Next
'axes
- Me.ResultChart.Plot.XLabel($"Value [{Me.InputTimeSeries(0).Unit}]")
+ Me.ResultChart.XLabel($"Value [{Me.InputTimeSeries(0).Unit}]")
- Me.ResultChart.Plot.YLabel("Probability [%]")
- Me.ResultChart.Plot.SetAxisLimits(yMin:=0, yAxisIndex:=0)
+ Me.ResultChart.YLabel("Probability [%]")
+ Me.ResultChart.SetAxisLimits(yMin:=0, yAxisIndex:=0)
- Me.ResultChart.Plot.YAxis2.Label("Probability of non-exceedance [%]")
- Me.ResultChart.Plot.YAxis2.LabelStyle(rotation:=90)
- Me.ResultChart.Plot.YAxis2.Ticks(enable:=True)
- Me.ResultChart.Plot.SetAxisLimits(yMin:=0, yMax:=105, yAxisIndex:=1)
+ Me.ResultChart.YAxis2.Label("Probability of non-exceedance [%]")
+ Me.ResultChart.YAxis2.LabelStyle(rotation:=90)
+ Me.ResultChart.YAxis2.Ticks(enable:=True)
+ Me.ResultChart.SetAxisLimits(yMin:=0, yMax:=105, yAxisIndex:=1)
End Sub
diff --git a/source/Analysis/MonthlyStatistics.vb b/source/Analysis/MonthlyStatistics.vb
index 1e534450..3f764a2b 100644
--- a/source/Analysis/MonthlyStatistics.vb
+++ b/source/Analysis/MonthlyStatistics.vb
@@ -244,10 +244,10 @@ Friend Class MonthlyStatistics
Next
'Result chart
- Me.ResultChart = New ScottPlot.FormsPlot()
- Call Helpers.FormatChart(Me.ResultChart.Plot)
- Me.ResultChart.Plot.XAxis.DateTimeFormat(False)
- Me.ResultChart.Plot.Title($"Monthly statistics ({Me.InputTimeSeries(0).Title})")
+ Me.ResultChart = New ScottPlot.Plot()
+ Call Helpers.FormatChart(Me.ResultChart)
+ Me.ResultChart.XAxis.DateTimeFormat(False)
+ Me.ResultChart.Title($"Monthly statistics ({Me.InputTimeSeries(0).Title})")
'sort month data by index for plotting
Dim monthDatas As List(Of MonthData) = Me.result.Values.ToList()
@@ -283,14 +283,14 @@ Friend Class MonthlyStatistics
Next
'axes
- Me.ResultChart.Plot.XAxis.ManualTickPositions(Xs, xLabels.ToArray())
- Me.ResultChart.Plot.XAxis.AxisTicks.TickLabelRotation = 90
- Me.ResultChart.Plot.XAxis.AxisTicks.MinorGridVisible = False
- Me.ResultChart.Plot.YLabel(Me.InputTimeSeries(0).Unit)
+ Me.ResultChart.XAxis.ManualTickPositions(Xs, xLabels.ToArray())
+ Me.ResultChart.XAxis.AxisTicks.TickLabelRotation = 90
+ Me.ResultChart.XAxis.AxisTicks.MinorGridVisible = False
+ Me.ResultChart.YLabel(Me.InputTimeSeries(0).Unit)
'series min-max
Dim minmax As ScottPlot.Plottable.Polygon
- minmax = Me.ResultChart.Plot.AddFill(Xs, mins.ToArray(), maxs.ToArray())
+ minmax = Me.ResultChart.AddFill(Xs, mins.ToArray(), maxs.ToArray())
minmax.Label = "Min / Max"
minmax.FillColor = Color.FromArgb(128, Color.LightGray.R, Color.LightGray.G, Color.LightGray.B)
minmax.LineColor = Color.DarkGray
@@ -298,14 +298,14 @@ Friend Class MonthlyStatistics
'series standard deviation
Dim stddev As ScottPlot.Plottable.ErrorBar
- stddev = Me.ResultChart.Plot.AddErrorBars(Xs, stddevbases.ToArray(), xErrors:=Nothing, yErrors:=stddevs.ToArray())
+ stddev = Me.ResultChart.AddErrorBars(Xs, stddevbases.ToArray(), xErrors:=Nothing, yErrors:=stddevs.ToArray())
stddev.Label = "Standard deviation"
stddev.Color = Color.Red
stddev.CapSize = 8
'series average
Dim avg As ScottPlot.Plottable.ScatterPlot
- avg = Me.ResultChart.Plot.AddScatter(Xs, avgs.ToArray())
+ avg = Me.ResultChart.AddScatter(Xs, avgs.ToArray())
avg.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
avg.Label = "Average"
avg.Color = Color.Blue
@@ -313,7 +313,7 @@ Friend Class MonthlyStatistics
'series median
Dim median As ScottPlot.Plottable.ScatterPlot
- median = Me.ResultChart.Plot.AddScatter(Xs, medians.ToArray())
+ median = Me.ResultChart.AddScatter(Xs, medians.ToArray())
median.OnNaN = ScottPlot.Plottable.ScatterPlot.NanBehavior.Gap
median.Label = "Median"
median.Color = Color.Green
diff --git a/source/Analysis/TestAnalysis.vb b/source/Analysis/TestAnalysis.vb
index a2a06652..4ebb59f1 100644
--- a/source/Analysis/TestAnalysis.vb
+++ b/source/Analysis/TestAnalysis.vb
@@ -139,7 +139,7 @@ Friend Class TestAnalysis
MyBase.ResultValues.Add($"Count values of time series '{title}'", length)
'Result chart (will be shown in separate window)
- MyBase.ResultChart = New ScottPlot.FormsPlot()
+ MyBase.ResultChart = New ScottPlot.Plot()
'Fill and format chart
'...
'...
From d15a203445303a40172d224fdba4884e92dd408a Mon Sep 17 00:00:00 2001
From: jamaa <90166+jamaa@users.noreply.github.com>
Date: Sun, 14 Jan 2024 23:22:13 +0100
Subject: [PATCH 57/57] add ScottPlot reference to examples and tests, fix
linestyle type
---
examples/Examples.vb | 2 +-
examples/Wave.Examples.vbproj | 5 +++++
tests/TestWVP.vb | 2 +-
tests/Wave.Tests.vbproj | 3 +++
4 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/examples/Examples.vb b/examples/Examples.vb
index ef4b7c9c..05878c60 100644
--- a/examples/Examples.vb
+++ b/examples/Examples.vb
@@ -151,7 +151,7 @@ Public Class Examples
'set some custom display options
ts.DisplayOptions.Color = Color.Red
- ts.DisplayOptions.LineStyle = Drawing2D.DashStyle.Dash
+ ts.DisplayOptions.LineStyle = ScottPlot.LineStyle.Dash
ts.DisplayOptions.LineWidth = 1
ts.DisplayOptions.ShowPoints = True
diff --git a/examples/Wave.Examples.vbproj b/examples/Wave.Examples.vbproj
index 29162676..d0da6056 100644
--- a/examples/Wave.Examples.vbproj
+++ b/examples/Wave.Examples.vbproj
@@ -150,6 +150,11 @@
Wave
+
+
+ 4.1.69
+
+