# GraffitiGridPercentScale
Class
## Methods
| Name | Parameters | Return Type | Description |
| --- | :---: | :---: | --- |
| Constructor | Values() as Pair | (None) | Creates a new instance of the class. |
| Attributes | Hidden | toJSON | |
## Properties
| Name | Type | Default Value | Description |
| --- | :---: | :---: | --- |
| Values() | Pair | Nil | The Pair values of the scale applied to column row values. |
## Examples
### Creation of a Scale
This class allows the application of value-based coloring for Grid columns whose Formatter is FormatTypes.Percent. Levels must be provided in lowest-to-highest order, and negative values are supported.
Values are provided as a Xojo Pair object where the Pair.Left is the double or integer value while the right is the color for numbers that fall within that range.
```
var percentScale as new GraffitiGridPercentScale( Array( new Pair( 25, color.Red ), _
new Pair( 50, color.Orange ), _
new Pair( 75, color.Blue ), _
new Pair( 100, color.Green ) ) )
var percentHeader as new GraffitiGridColumn( "perc", "%" )
percentHeader.Formatter = GraffitiGrid.FormatTypes.Percent
percentHeader.PercentScale = percentScale
me.AddColumn( percentHeader )
```
\