Skip to content

Commit

Permalink
feat: support serialize and deserialize for theme
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Aug 3, 2024
1 parent 8bc9512 commit c0900c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "charts-rs"
version = "0.3.14"
version = "0.3.15"
authors = ["Tree Xie <tree.xie@outlook.com>"]
edition = "2021"
categories = ["multimedia::images"]
Expand Down
3 changes: 2 additions & 1 deletion src/charts/theme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use super::util::Box;
use ahash::AHashMap;
use arc_swap::ArcSwap;
use once_cell::sync::Lazy;
use serde::{Deserialize, Serialize};
use std::sync::Arc;

pub static DEFAULT_WIDTH: f32 = 600.0;
Expand All @@ -29,7 +30,7 @@ pub static THEME_GRAFANA: &str = "grafana";

static LIGHT_THEME_NAME: &str = "light";

#[derive(Clone, Debug, Default)]
#[derive(Clone, Debug, Default, Serialize, Deserialize)]

pub struct Theme {
pub is_light: bool,
Expand Down

0 comments on commit c0900c4

Please sign in to comment.