Quantcast
Channel: OxyPlot (moved to GitHub)
Viewing all articles
Browse latest Browse all 2061

Commented Unassigned: MaximumPadding become useless after zoom in & out [10048]

$
0
0
Verion: d190d7748a73

when plot shows up, it has 30% padding,
but once use wheel to zoom in, and out, plot's Y stopped at MaxY.
Double click wheel reset plot, 30% padding shows up.

```
// set x max, min
this.XAxis.AbsoluteMaximum = dataPoints.Last().X;
this.XAxis.AbsoluteMinimum = dataPoints.First().X;
// set y max, min
this.YAxis.AbsoluteMaximum = MaxY;
this.YAxis.AbsoluteMinimum = 0;
// set y pading
this.YAxis.MaximumPadding = 0.3;
this.YAxis.MinimumPadding = 0;
```
Comments: With this coding fixed this problem Set padding first, then increase MaxY by same %. ``` // set x max, min this.XAxis.AbsoluteMaximum = dataPoints.Last().X; this.XAxis.AbsoluteMinimum = dataPoints.First().X; // set y pading this.YAxis.MaximumPadding = 0.3; this.YAxis.MinimumPadding = 0; // set y max, min this.YAxis.AbsoluteMaximum = MaxY * (this.YAxis.MaximumPadding+1); this.YAxis.AbsoluteMinimum = 0; ```

Viewing all articles
Browse latest Browse all 2061

Trending Articles