diff options
Diffstat (limited to 'grapher/Models/Charts/ChartState')
4 files changed, 31 insertions, 0 deletions
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); + } + } } } 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) |