From 98a75a4e4f7587a67a27f09bb7e96488ab337a4b Mon Sep 17 00:00:00 2001 From: vchapuis Date: Fri, 1 Mar 2024 10:01:53 +0800 Subject: [PATCH] Add basic traits to SeriesLabelPosition and ShapeStyle --- plotters/src/chart/series.rs | 1 + plotters/src/style/shape.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plotters/src/chart/series.rs b/plotters/src/chart/series.rs index 3583f0fa..997f30d0 100644 --- a/plotters/src/chart/series.rs +++ b/plotters/src/chart/series.rs @@ -72,6 +72,7 @@ Useful to specify the position of the series label. See [`ChartContext::configure_series_labels()`] for more information and examples. */ +#[derive(Debug, Clone, PartialEq)] pub enum SeriesLabelPosition { /// Places the series label at the upper left UpperLeft, diff --git a/plotters/src/style/shape.rs b/plotters/src/style/shape.rs index 389cc75c..97ac6b6e 100644 --- a/plotters/src/style/shape.rs +++ b/plotters/src/style/shape.rs @@ -2,7 +2,7 @@ use super::color::{Color, RGBAColor}; use plotters_backend::{BackendColor, BackendStyle}; /// Style for any shape -#[derive(Copy, Clone)] +#[derive(Copy, Clone, Debug, PartialEq)] pub struct ShapeStyle { /// Specification of the color. pub color: RGBAColor,