Add an option for point circle rendering.
This commit is contained in:
parent
c432b410ee
commit
f1a685f13b
|
@ -27,6 +27,7 @@ impl UserCountChart {
|
||||||
&self,
|
&self,
|
||||||
parent: &PathBuf,
|
parent: &PathBuf,
|
||||||
group_name: &str,
|
group_name: &str,
|
||||||
|
render_point_circles: bool,
|
||||||
) -> Result<PathBuf> {
|
) -> Result<PathBuf> {
|
||||||
let parent = parent.join("charts/user-count");
|
let parent = parent.join("charts/user-count");
|
||||||
create_dir_all(&parent).await?;
|
create_dir_all(&parent).await?;
|
||||||
|
@ -102,7 +103,15 @@ impl UserCountChart {
|
||||||
&ACCENT_1,
|
&ACCENT_1,
|
||||||
&|(x, y), size, style| {
|
&|(x, y), size, style| {
|
||||||
EmptyElement::at((x, y))
|
EmptyElement::at((x, y))
|
||||||
+ Circle::new((0, 0), size, style.filled())
|
+ Circle::new(
|
||||||
|
(0, 0),
|
||||||
|
size,
|
||||||
|
if render_point_circles {
|
||||||
|
style.filled()
|
||||||
|
} else {
|
||||||
|
TRANSPARENT.filled()
|
||||||
|
},
|
||||||
|
)
|
||||||
+ Text::new(
|
+ Text::new(
|
||||||
{
|
{
|
||||||
if (x - 1) % 2 != 0 {
|
if (x - 1) % 2 != 0 {
|
||||||
|
|
|
@ -115,7 +115,7 @@ pub async fn run() -> Result<()> {
|
||||||
groups: GroupDataModel::get_n_most_recent(&db, 30, &group.name)
|
groups: GroupDataModel::get_n_most_recent(&db, 30, &group.name)
|
||||||
.await?,
|
.await?,
|
||||||
}
|
}
|
||||||
.render(&output, &group.name)
|
.render(&output, &group.name, true)
|
||||||
.await?;
|
.await?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue