Click or drag to resize
NChartBrushScale Class
The NChartBrushScale class provides scale that transforms values into brushes like a step mapping function. The scale contains array of reference values and array of brushes. It returns brush for given value according to these arrays:
brushs[n]
  values[n - 1]
...
brushs[4]
  values[3]
brushs[3]
  values[2]
brushs[2]
  values[1]
brushs[1]
  values[0]
brushs[0]
This is equivalent to the following pseudo code:
if value <= values[0] return brushes[0];
if value > values[i] and value <= values[i + 1] return brush[i + 1];
if value > values[last] return brush[last]
So the array of brushes should contain n elements and array of values should contain n - 1. Values should be sorted (NChartBrushScale does not sort them automatically). If they are not, it can lead to strange results. If brush index goes out of range, null is returned.
Inheritance Hierarchy
SystemObject
  NChart3D_UWPNChartBrushScale

Namespace:  NChart3D_UWP
Assembly:  NChart3D_UWP (in NChart3D_UWP.dll)
Syntax
public sealed class NChartBrushScale : IClosable

The NChartBrushScale type exposes the following members.

Constructors
  NameDescription
Public methodNChartBrushScale
Initializes a new instance of the NChartBrushScale class
Top
Properties
  NameDescription
Public propertyBrushes
Array of brushes.
Public propertyGradientSharpness
Sharpness of gradient, [0;1]. 0 means very smooth color transition, 1 means very sharp one. The default value is 0.2. This value has effect if IsGradient flag is set to true only.
Public propertyIsGradient
Flag determining if scale can return gradient colors. The default value is true. The gradient scale assumes that the array of brushes contains instances of NChartSolidColorBrush and linearly interpolates colors that correspond to the neighbor values.
Public propertyValues
Array of values.
Top
Methods
  NameDescription
Public methodBrushForValue
Get value for brush.
Public methodClose
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)
Top
See Also