diff options
| author | Jacob Palecki <[email protected]> | 2020-09-07 20:30:15 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-07 20:30:15 -0700 |
| commit | 1462da675f1bc36d2a770413f13ccc68165cf1e9 (patch) | |
| tree | b2636b1455668b42121ffb1133034ed2b30ce672 /grapher/Models/Charts/ChartXY.cs | |
| parent | Fix some separation bugs (diff) | |
| download | rawaccel-1462da675f1bc36d2a770413f13ccc68165cf1e9.tar.xz rawaccel-1462da675f1bc36d2a770413f13ccc68165cf1e9.zip | |
Add chart resize
Diffstat (limited to 'grapher/Models/Charts/ChartXY.cs')
| -rw-r--r-- | grapher/Models/Charts/ChartXY.cs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs index 6a65e41..7998f7f 100644 --- a/grapher/Models/Charts/ChartXY.cs +++ b/grapher/Models/Charts/ChartXY.cs @@ -29,6 +29,9 @@ namespace grapher SetupChart(ChartX); SetupChart(ChartY); + + Widened = false; + SetWidened(); } #endregion Constructors @@ -76,6 +79,8 @@ namespace grapher public bool Combined { get; private set; } + public bool Widened { get; private set; } + private PointData CombinedPointData { get; set; } private PointData XPointData { get; set; } @@ -174,6 +179,34 @@ namespace grapher } } + public void SetWidened() + { + if (!Widened) + { + ChartX.Width = Constants.WideChartWidth; + ChartY.Width = Constants.WideChartWidth; + + ChartX.Left = Constants.WideChartLeft; + ChartY.Left = ChartX.Left + ChartX.Width + Constants.ChartSeparationHorizontal; + + Widened = true; + } + } + + public void SetNarrowed() + { + if (Widened) + { + ChartX.Width = Constants.NarrowChartWidth; + ChartY.Width = Constants.NarrowChartWidth; + + ChartX.Left = Constants.NarrowChartLeft; + ChartY.Left = ChartX.Left + ChartX.Width + Constants.ChartSeparationHorizontal; + + Widened = false; + } + } + public void Hide() { ChartX.Hide(); |