rustfmt
This commit is contained in:
parent
1d1574a1ed
commit
98aac84e71
@ -56,9 +56,7 @@ impl ChartManager {
|
|||||||
(filtered_data, rect_data, area)
|
(filtered_data, rect_data, area)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_step(&self) -> f64 {
|
pub fn get_step(&self) -> f64 { (self.max_x - self.min_x).abs() / (self.num_interval as f64) }
|
||||||
(self.max_x - self.min_x).abs() / (self.num_interval as f64)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn do_update_front(&self, resolution: usize, num_interval: usize) -> bool {
|
pub fn do_update_front(&self, resolution: usize, num_interval: usize) -> bool {
|
||||||
(self.resolution != resolution) | (num_interval != self.num_interval)
|
(self.resolution != resolution) | (num_interval != self.num_interval)
|
||||||
|
|||||||
@ -3,7 +3,7 @@ use crate::misc::{digits_precision, test_func, Cache};
|
|||||||
use eframe::{egui, epi};
|
use eframe::{egui, epi};
|
||||||
use egui::plot::{Line, Plot, Value, Values};
|
use egui::plot::{Line, Plot, Value, Values};
|
||||||
use egui::widgets::plot::{Bar, BarChart};
|
use egui::widgets::plot::{Bar, BarChart};
|
||||||
use egui::{Color32};
|
use egui::Color32;
|
||||||
|
|
||||||
pub struct MathApp {
|
pub struct MathApp {
|
||||||
func_str: String,
|
func_str: String,
|
||||||
@ -134,7 +134,9 @@ impl epi::App for MathApp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
let bar_chart = BarChart::new(bars).color(Color32::BLUE).width(chart_manager.get_step());
|
let bar_chart = BarChart::new(bars)
|
||||||
|
.color(Color32::BLUE)
|
||||||
|
.width(chart_manager.get_step());
|
||||||
|
|
||||||
Plot::new("plot")
|
Plot::new("plot")
|
||||||
.view_aspect(1.0)
|
.view_aspect(1.0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user