Class ChartColor
Represents an ARGB (alpha, red, green, blue) color.
Inheritance
Implements
Namespace: Syncfusion.OfficeChart
Assembly: Syncfusion.OfficeChart.Portable.dll
Syntax
public class ChartColor : Object, IDisposable
Constructors
ChartColor(Color)
Initializes a new instance of the ChartColor class with the specified Color instance.
Declaration
public ChartColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | Color value to initialize. |
ChartColor(ColorType, Int32)
Initializes a new instance of the ChartColor class with the specified ColorType instance and color value.
Declaration
public ChartColor(ColorType colorType, int colorValue)
Parameters
Type | Name | Description |
---|---|---|
ColorType | colorType | Represents type of Color. |
System.Int32 | colorValue | Represents color value. |
ChartColor(ColorType, Int32, Double)
Initializes a new instance of the ChartColor class with the specified ColorType instance, color value and tint value.
Declaration
public ChartColor(ColorType colorType, int colorValue, double tint)
Parameters
Type | Name | Description |
---|---|---|
ColorType | colorType | Represents color type. |
System.Int32 | colorValue | Represents color value. |
System.Double | tint | Represents tint value. |
ChartColor(OfficeKnownColors)
Initializes a new instance of the ChartColor class with the specified OfficeKnownColors instance.
Declaration
public ChartColor(OfficeKnownColors color)
Parameters
Type | Name | Description |
---|---|---|
OfficeKnownColors | color | Color value to initialize. |
Properties
ColorType
Gets or sets the type of the stored color.
Declaration
public ColorType ColorType { get; set; }
Property Value
Type | Description |
---|---|
ColorType |
Tint
Gets or sets Tint value.
Declaration
public double Tint { get; set; }
Property Value
Type | Description |
---|---|
System.Double |
Value
Gets color value (it can be index, rgb color, etc.)
Declaration
public int Value { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
add_AfterChange(ChartColor.AfterChangeHandler)
Declaration
public void add_AfterChange(ChartColor.AfterChangeHandler value)
Parameters
Type | Name | Description |
---|---|---|
ChartColor.AfterChangeHandler | value |
Dispose()
Declaration
public void Dispose()
Equals(Object)
Determines whether the specified color objects are equal or not.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The object to compare with the current |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified Object is equal to the current Object; otherwise, false. |
GetHashCode()
Returns the HashCode for the instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer hash code. |
remove_AfterChange(ChartColor.AfterChangeHandler)
Declaration
public void remove_AfterChange(ChartColor.AfterChangeHandler value)
Parameters
Type | Name | Description |
---|---|---|
ChartColor.AfterChangeHandler | value |
SetIndexed(OfficeKnownColors)
Sets the indexed color with the specified OfficeKnownColors instance.
Declaration
public void SetIndexed(OfficeKnownColors value)
Parameters
Type | Name | Description |
---|---|---|
OfficeKnownColors | value | Color index to set. |
SetIndexed(OfficeKnownColors, Boolean)
Sets the indexed color with the specified OfficeKnownColors value and event action.
Declaration
public void SetIndexed(OfficeKnownColors value, bool raiseEvent)
Parameters
Type | Name | Description |
---|---|---|
OfficeKnownColors | value | Color index to set. |
System.Boolean | raiseEvent | Determines whether to call AfterChange event |
SetIndexedNoEvent(OfficeKnownColors)
Sets indexed color without calling AfterChange event.
Declaration
public void SetIndexedNoEvent(OfficeKnownColors value)
Parameters
Type | Name | Description |
---|---|---|
OfficeKnownColors | value | Color index to set. |
Events
AfterChange
Represents an event called after color change.
Declaration
public event ChartColor.AfterChangeHandler AfterChange
Event Type
Type | Description |
---|---|
ChartColor.AfterChangeHandler |
Operators
Equality(ChartColor, ChartColor)
Checks whether two ChartColor instances have the same data.
Declaration
public static bool operator ==(ChartColor first, ChartColor second)
Parameters
Type | Name | Description |
---|---|---|
ChartColor | first | First color object to check. |
ChartColor | second | Second color object to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if they have the same data.Otherwise False |
Implicit(Color to ChartColor)
Converts the specified Color to ChartColor instance.
Declaration
public static implicit operator ChartColor(Color color)
Parameters
Type | Name | Description |
---|---|---|
Color | color | Color value to convert. |
Returns
Type | Description |
---|---|
ChartColor | Returns Converted ChartColor instance. |
Inequality(ChartColor, ChartColor)
Checks whether two ChartColor instances have different data.
Declaration
public static bool operator !=(ChartColor first, ChartColor second)
Parameters
Type | Name | Description |
---|---|---|
ChartColor | first | First color object to check. |
ChartColor | second | Second color object to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if they have different data. Otherwise False |