@@ -240,7 +240,7 @@ pub enum LabelOption<T>
240240 Font ( T , f64 ) ,
241241 /// Sets the color of the label text. The passed string can be a color name
242242 /// (e.g. "black" works), or an HTML color specifier (e.g. "#FFFFFF" is white)
243- TextColor ( T ) ,
243+ TextColorOpt ( ColorType < T > ) ,
244244 /// Rotates the label by a certain number of degrees
245245 Rotate ( f64 ) ,
246246 /// Sets the horizontal alignment of the label text (default is left alignment). See AlignType.
@@ -278,7 +278,7 @@ impl<'l> OneWayOwned for LabelOption<&'l str>
278278 {
279279 TextOffset ( v1, v2) => TextOffset ( v1, v2) ,
280280 Font ( v1, v2) => Font ( v1. into ( ) , v2) ,
281- TextColor ( v) => TextColor ( v. into ( ) ) ,
281+ TextColorOpt ( v) => TextColorOpt ( v. to_one_way_owned ( ) ) ,
282282 Rotate ( v) => Rotate ( v) ,
283283 TextAlign ( v) => TextAlign ( v) ,
284284 MarkerSymbol ( v) => MarkerSymbol ( v) ,
@@ -288,6 +288,13 @@ impl<'l> OneWayOwned for LabelOption<&'l str>
288288 }
289289}
290290
291+ #[ allow( non_snake_case) ]
292+ /// TODO
293+ pub fn TextColor < ' l , T : IntoColor < & ' l str > > ( c : T ) -> LabelOption < & ' l str >
294+ {
295+ TextColorOpt ( c. into ( ) )
296+ }
297+
291298/// An enumeration of axis tick options
292299#[ derive( Copy , Clone , Debug , PartialOrd , PartialEq ) ]
293300pub enum TickOption < T >
0 commit comments