diff options
| author | a1xd <[email protected]> | 2020-09-26 02:10:29 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-09-26 02:10:29 -0400 |
| commit | 9353f5b9adc50456fefc2e55aab5e57029e89682 (patch) | |
| tree | 5d28926aee87c077ffc4ed7222469bbf2f28bd2c /grapher/Models/Charts/ChartXY.cs | |
| parent | Merge pull request #22 from JacobPalecki/GUI (diff) | |
| parent | SetActive changes field default, bugs fixed (diff) | |
| download | rawaccel-9353f5b9adc50456fefc2e55aab5e57029e89682.tar.xz rawaccel-9353f5b9adc50456fefc2e55aab5e57029e89682.zip | |
Merge pull request #23 from JacobPalecki/GUI
Settings writer; GUI performance enhancement and touchups
Diffstat (limited to 'grapher/Models/Charts/ChartXY.cs')
| -rw-r--r-- | grapher/Models/Charts/ChartXY.cs | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/grapher/Models/Charts/ChartXY.cs b/grapher/Models/Charts/ChartXY.cs index c30c993..d95c7ac 100644 --- a/grapher/Models/Charts/ChartXY.cs +++ b/grapher/Models/Charts/ChartXY.cs @@ -154,6 +154,15 @@ namespace grapher */ } + public void Update() + { + ChartX.Update(); + if (ChartY.Visible) + { + ChartY.Update(); + } + } + public void SetPointBinds(PointData combined, PointData x, PointData y) { CombinedPointData = combined; @@ -213,8 +222,8 @@ namespace grapher { if (min < max) { - ChartX.ChartAreas[0].AxisY.Minimum = min; - ChartX.ChartAreas[0].AxisY.Maximum = max; + ChartX.ChartAreas[0].AxisY.Minimum = min * 0.95; + ChartX.ChartAreas[0].AxisY.Maximum = max * 1.05; } } @@ -222,14 +231,14 @@ namespace grapher { if (minX < maxX) { - ChartX.ChartAreas[0].AxisY.Minimum = minX; - ChartX.ChartAreas[0].AxisY.Maximum = maxX; + ChartX.ChartAreas[0].AxisY.Minimum = minX * 0.95; + ChartX.ChartAreas[0].AxisY.Maximum = maxX * 1.05; } if (minY < maxY) { - ChartY.ChartAreas[0].AxisY.Minimum = minY; - ChartY.ChartAreas[0].AxisY.Maximum = maxY; + ChartY.ChartAreas[0].AxisY.Minimum = minY * 0.95; + ChartY.ChartAreas[0].AxisY.Maximum = maxY * 1.05; } } |