Compare commits
No commits in common. "de5d256c9622af173b5c316478112338ec1e8483" and "352d107e3599f8bba92caca0f8b7ff436fb44ee2" have entirely different histories.
de5d256c96
...
352d107e35
|
@ -10,7 +10,6 @@ use crate::group_data::GroupDataModel;
|
||||||
|
|
||||||
const BACKGROUND_1: RGBColor = RGBColor(31, 23, 49);
|
const BACKGROUND_1: RGBColor = RGBColor(31, 23, 49);
|
||||||
const BACKGROUND_2: RGBColor = RGBColor(42, 32, 65);
|
const BACKGROUND_2: RGBColor = RGBColor(42, 32, 65);
|
||||||
const BACKGROUND_3: RGBColor = RGBColor(10, 8, 16);
|
|
||||||
const FOREGROUND: RGBColor = RGBColor(242, 239, 255);
|
const FOREGROUND: RGBColor = RGBColor(242, 239, 255);
|
||||||
const ACCENT_1: RGBColor = RGBColor(210, 184, 58);
|
const ACCENT_1: RGBColor = RGBColor(210, 184, 58);
|
||||||
|
|
||||||
|
@ -78,7 +77,7 @@ impl UserCountChart {
|
||||||
.label_style(text_style(20))
|
.label_style(text_style(20))
|
||||||
.axis_style(&BACKGROUND_1)
|
.axis_style(&BACKGROUND_1)
|
||||||
.light_line_style(&BACKGROUND_1)
|
.light_line_style(&BACKGROUND_1)
|
||||||
.bold_line_style(&BACKGROUND_3)
|
.bold_line_style(&BACKGROUND_2)
|
||||||
.draw()?;
|
.draw()?;
|
||||||
|
|
||||||
chart
|
chart
|
||||||
|
|
|
@ -48,13 +48,12 @@ impl GroupDataModel {
|
||||||
amount: u64,
|
amount: u64,
|
||||||
name: &str,
|
name: &str,
|
||||||
) -> Result<Vec<Self>> {
|
) -> Result<Vec<Self>> {
|
||||||
let mut groups = GroupDataEntity::find()
|
let groups = GroupDataEntity::find()
|
||||||
.order_by_desc(GroupDataColumn::SnapshotId)
|
.order_by_asc(GroupDataColumn::SnapshotId)
|
||||||
.filter(GroupDataColumn::Name.eq(name))
|
.filter(GroupDataColumn::Name.eq(name))
|
||||||
.limit(amount)
|
.limit(amount)
|
||||||
.all(db)
|
.all(db)
|
||||||
.await?;
|
.await?;
|
||||||
groups.reverse();
|
|
||||||
|
|
||||||
Ok(groups)
|
Ok(groups)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue