Compare commits
2 Commits
1ad530127e
...
7bf704f2bf
Author | SHA1 | Date | |
---|---|---|---|
7bf704f2bf | |||
48dfd7104c |
@ -59,6 +59,7 @@ pub fn init_camera_feed(product_options_js: JsValue) -> Result<(), String> {
|
|||||||
divisor: 0,
|
divisor: 0,
|
||||||
kJ: 0.,
|
kJ: 0.,
|
||||||
kcal: 0.,
|
kcal: 0.,
|
||||||
|
fat: 0.,
|
||||||
saturated_fat: 0.,
|
saturated_fat: 0.,
|
||||||
carbohydrate: 0.,
|
carbohydrate: 0.,
|
||||||
sugar: 0.,
|
sugar: 0.,
|
||||||
|
@ -344,7 +344,7 @@ pub fn plot_weight_loss(
|
|||||||
.configure_series_labels()
|
.configure_series_labels()
|
||||||
.background_style(WHITE.mix(0.8))
|
.background_style(WHITE.mix(0.8))
|
||||||
.border_style(BLACK)
|
.border_style(BLACK)
|
||||||
.position(SeriesLabelPosition::LowerRight)
|
.position(SeriesLabelPosition::UpperRight)
|
||||||
.draw()
|
.draw()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ pub struct Nutrition {
|
|||||||
pub divisor: u32,
|
pub divisor: u32,
|
||||||
pub kJ: f32,
|
pub kJ: f32,
|
||||||
pub kcal: f32,
|
pub kcal: f32,
|
||||||
|
pub fat: f32,
|
||||||
pub saturated_fat: f32,
|
pub saturated_fat: f32,
|
||||||
pub carbohydrate: f32,
|
pub carbohydrate: f32,
|
||||||
pub sugar: f32,
|
pub sugar: f32,
|
||||||
@ -55,6 +56,7 @@ type RowType = HList!(
|
|||||||
Option<f32>,
|
Option<f32>,
|
||||||
Option<f32>,
|
Option<f32>,
|
||||||
Option<f32>,
|
Option<f32>,
|
||||||
|
Option<f32>,
|
||||||
);
|
);
|
||||||
|
|
||||||
impl Nutrition {
|
impl Nutrition {
|
||||||
@ -81,6 +83,7 @@ impl Nutrition {
|
|||||||
divisor,
|
divisor,
|
||||||
k_j,
|
k_j,
|
||||||
kcal,
|
kcal,
|
||||||
|
fat,
|
||||||
saturated_fat,
|
saturated_fat,
|
||||||
carbohydrate,
|
carbohydrate,
|
||||||
sugar,
|
sugar,
|
||||||
@ -102,6 +105,7 @@ impl Nutrition {
|
|||||||
divisor: divisor.unwrap_or(0),
|
divisor: divisor.unwrap_or(0),
|
||||||
kJ: k_j.unwrap_or(0.),
|
kJ: k_j.unwrap_or(0.),
|
||||||
kcal: kcal.unwrap_or(0.),
|
kcal: kcal.unwrap_or(0.),
|
||||||
|
fat: fat.unwrap_or(0.),
|
||||||
saturated_fat: saturated_fat.unwrap_or(0.),
|
saturated_fat: saturated_fat.unwrap_or(0.),
|
||||||
carbohydrate: carbohydrate.unwrap_or(0.),
|
carbohydrate: carbohydrate.unwrap_or(0.),
|
||||||
sugar: sugar.unwrap_or(0.),
|
sugar: sugar.unwrap_or(0.),
|
||||||
|
Loading…
Reference in New Issue
Block a user