@@ -324,14 +324,14 @@ private void CommonChartConfig()
324324 NumericAutomatic xTickGenerator = new ( )
325325 {
326326 LabelFormatter = logTickLabels ,
327- MinorTickGenerator = new LogMinorTickGenerator ( ) { Divisions = 10 } ,
327+ MinorTickGenerator = new LogDecadeMinorTickGenerator ( ) { TicksPerDecade = 10 } ,
328328 IntegerTicksOnly = true ,
329329 TargetTickCount = 10
330330 } ;
331331 NumericAutomatic yTickGenerator = new ( )
332332 {
333333 LabelFormatter = logTickLabels ,
334- MinorTickGenerator = new LogMinorTickGenerator ( ) { Divisions = 10 } ,
334+ MinorTickGenerator = new LogDecadeMinorTickGenerator ( ) { TicksPerDecade = 10 } ,
335335 IntegerTicksOnly = true ,
336336 TargetTickCount = 10
337337 } ;
@@ -352,9 +352,12 @@ private void CommonChartConfig()
352352
353353 private void SetChartLimitsAndRefresh ( )
354354 {
355- var top = Math . Log10 ( viewModel . YMax + ( viewModel . YMax * 0.001 ) ) ;
356- var bottom = Math . Log10 ( viewModel . YMin - ( viewModel . YMin * 0.001 ) ) ;
357- WpfPlot1 . Plot . Axes . SetLimits ( Math . Log10 ( viewModel . XMin ) , Math . Log10 ( viewModel . XMax ) , bottom , top ) ;
355+ double fudgeFactor = 0.001 ;
356+ var left = Math . Log10 ( viewModel . XMin - ( viewModel . XMin * fudgeFactor ) ) ;
357+ var right = Math . Log10 ( viewModel . XMax + ( viewModel . XMax * fudgeFactor ) ) ;
358+ var top = Math . Log10 ( viewModel . YMax + ( viewModel . YMax * fudgeFactor ) ) ;
359+ var bottom = Math . Log10 ( viewModel . YMin - ( viewModel . YMin * fudgeFactor ) ) ;
360+ WpfPlot1 . Plot . Axes . SetLimits ( left , right , bottom , top ) ;
358361 WpfPlot1 . Refresh ( ) ;
359362 }
360363
0 commit comments