Add charts view with pie, bar, and line charts
Pie chart shows expense breakdown by category with color-coded slices. Bar chart shows income vs expense for the last 6 months. Line chart shows cumulative daily net trend. All charts render via plotters BitMapBackend to GDK MemoryTexture for display. Month navigation shared across all three charts.
This commit is contained in:
@@ -2,6 +2,7 @@ use adw::prelude::*;
|
||||
use outlay_core::db::Database;
|
||||
use std::rc::Rc;
|
||||
|
||||
use crate::charts_view::ChartsView;
|
||||
use crate::history_view::HistoryView;
|
||||
use crate::log_view::LogView;
|
||||
|
||||
@@ -48,8 +49,12 @@ impl MainWindow {
|
||||
.build();
|
||||
content_stack.add_named(&history_scroll, Some("history"));
|
||||
|
||||
// Charts view
|
||||
let charts_view = ChartsView::new(db.clone());
|
||||
content_stack.add_named(&charts_view.container, Some("charts"));
|
||||
|
||||
// Remaining pages are placeholders for now
|
||||
for item in &SIDEBAR_ITEMS[2..] {
|
||||
for item in &SIDEBAR_ITEMS[3..] {
|
||||
let page = adw::StatusPage::builder()
|
||||
.title(item.label)
|
||||
.icon_name(item.icon)
|
||||
|
||||
Reference in New Issue
Block a user