From 8e58892723ee10792c7d3db275da826f98d01677 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 22 Sep 2020 02:28:35 -0700 Subject: Mostly works --- grapher/Models/Charts/ChartState/ChartState.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'grapher/Models/Charts/ChartState') diff --git a/grapher/Models/Charts/ChartState/ChartState.cs b/grapher/Models/Charts/ChartState/ChartState.cs index ea67e83..e1c7d01 100644 --- a/grapher/Models/Charts/ChartState/ChartState.cs +++ b/grapher/Models/Charts/ChartState/ChartState.cs @@ -100,5 +100,29 @@ namespace grapher.Models.Charts.ChartState GainChart.Hide(); form.Height = SensitivityChart.Height + borderHeight; } + + public void SetLogarithmic(bool x, bool y) + { + if (x) + { + ChartXY.SetLogarithmic(SensitivityChart.ChartX); + ChartXY.SetLogarithmic(GainChart.ChartX); + } + else + { + ChartXY.SetStandard(SensitivityChart.ChartX); + ChartXY.SetStandard(GainChart.ChartX); + } + + if (y) + { + ChartXY.SetLogarithmic(SensitivityChart.ChartY); + ChartXY.SetLogarithmic(GainChart.ChartY); + } + { + ChartXY.SetStandard(SensitivityChart.ChartY); + ChartXY.SetStandard(GainChart.ChartY); + } + } } } -- cgit v1.2.3 From 720a45289b2342c62eebb0e1cee3c4b88c9fe696 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 22 Sep 2020 14:01:05 -0700 Subject: Scaling improvement, remove y data from xy combined --- grapher/Models/Charts/ChartState/CombinedState.cs | 2 ++ grapher/Models/Charts/ChartState/XYOneGraphState.cs | 2 ++ grapher/Models/Charts/ChartState/XYTwoGraphState.cs | 3 +++ 3 files changed, 7 insertions(+) (limited to 'grapher/Models/Charts/ChartState') diff --git a/grapher/Models/Charts/ChartState/CombinedState.cs b/grapher/Models/Charts/ChartState/CombinedState.cs index 17cd68a..f4b6b8f 100644 --- a/grapher/Models/Charts/ChartState/CombinedState.cs +++ b/grapher/Models/Charts/ChartState/CombinedState.cs @@ -36,6 +36,8 @@ namespace grapher.Models.Charts.ChartState SensitivityChart.Bind(Data.Combined.AccelPoints); VelocityChart.Bind(Data.Combined.VelocityPoints); GainChart.Bind(Data.Combined.GainPoints); + SensitivityChart.SetMinMax(Data.Combined.MinAccel, Data.Combined.MaxAccel); + GainChart.SetMinMax(Data.Combined.MinGain, Data.Combined.MaxGain); } public override void Calculate(ManagedAccel accel, DriverSettings settings) diff --git a/grapher/Models/Charts/ChartState/XYOneGraphState.cs b/grapher/Models/Charts/ChartState/XYOneGraphState.cs index bbc0c28..6bfaac5 100644 --- a/grapher/Models/Charts/ChartState/XYOneGraphState.cs +++ b/grapher/Models/Charts/ChartState/XYOneGraphState.cs @@ -38,6 +38,8 @@ namespace grapher.Models.Charts.ChartState SensitivityChart.BindXYCombined(Data.X.AccelPoints, Data.Y.AccelPoints); VelocityChart.BindXYCombined(Data.X.VelocityPoints, Data.Y.VelocityPoints); GainChart.BindXYCombined(Data.X.GainPoints, Data.Y.GainPoints); + SensitivityChart.SetMinMax(Data.Combined.MinAccel, Data.Combined.MaxAccel); + GainChart.SetMinMax(Data.Combined.MinGain, Data.Combined.MaxGain); } public override void Calculate(ManagedAccel accel, DriverSettings settings) diff --git a/grapher/Models/Charts/ChartState/XYTwoGraphState.cs b/grapher/Models/Charts/ChartState/XYTwoGraphState.cs index 69dc335..b775853 100644 --- a/grapher/Models/Charts/ChartState/XYTwoGraphState.cs +++ b/grapher/Models/Charts/ChartState/XYTwoGraphState.cs @@ -65,6 +65,9 @@ namespace grapher.Models.Charts.ChartState SensitivityChart.BindXY(Data.X.AccelPoints, Data.Y.AccelPoints); VelocityChart.BindXY(Data.X.VelocityPoints, Data.Y.VelocityPoints); GainChart.BindXY(Data.X.GainPoints, Data.Y.GainPoints); + + SensitivityChart.SetMinMaxXY(Data.X.MinAccel, Data.X.MaxAccel, Data.Y.MinAccel, Data.Y.MaxAccel); + GainChart.SetMinMaxXY(Data.X.MinGain, Data.X.MaxGain, Data.Y.MinGain, Data.Y.MaxGain); } public override void Calculate(ManagedAccel accel, DriverSettings settings) -- cgit v1.2.3