import {ColorBrewer} from 'gisplay-es6-webpack/src/Gisplay/Helpers/ColorBrewer.js'
ColorBrewer
This class will contain all ColorBrewer color schemes and methods to query said color schemes. These queries can be: by their type(Diverging, Qualitative and Sequential), name(Spectral, RdYlGn, etc etc) and number of classes(3,4...).
Static Method Summary
Static Public Methods | ||
public static |
This is just an alias for the method getColorSchemesByName(name). |
|
public static |
byNameAndNumber(name: string, numberOfClasses: number): Array<RGB> For the given color scheme name and number of classes returns the RGB colors associated with them. |
|
public static |
Returns all ColorSchemes that contain the number of class given as input. |
|
public static |
getAllColorSchemesByNumberOfClasses(numberOfClasses: number): Object Returns an object of color schemes with only those the objects for the specified number of classes. |
|
public static |
getAllColorSchemesByNumberOfClassesAsArray(numberOfClasses: number): Array<Object> this method was deprecated. Use byNumber(n) or getAllColorSchemesByNumberOfClasses(n) instead.
|
|
public static |
getChangeMapDefaults(dataNature: string , numClasses: number ): Array<number> Returns the default color for Change Maps taking in consideration the given number of classes and nature of data currently being used. |
|
public static |
getChorochromaticDefaults(dataNature: string , numClasses: number ): Array<number> Returns the default color for Chorocromatic Maps taking in consideration the given number of classes and nature of data currently being used. |
|
public static |
getChoroplethDefaults(dataNature: string , numClasses: number ): Array<number> Returns the default color for Choropleth Maps taking in consideration the given number of classes and nature of data currently being used. |
|
public static |
Returns the ColorBrewer object of type of color schemes. |
|
public static |
getColorScheme(type: string, name: string, numOfClasses: number): Array<RGB> Returns an array with numOfClasses elements that are the colors for the given type of color scheme and it's name. |
|
public static |
getColorSchemesByName(name: string): Object Return an object with multiple color schemes for each number of classes associated with the color scheme given as input. |
|
public static |
Given the color scheme name and the number of classes returns an Array of colors associated with the given name and number of classes. |
|
public static |
Given the color scheme name and the number of classes returns an Array of colors associated with the given name and number of classes. |
|
public static |
getDefautls(mapName: *, numClasses: *, dataNature: *): * ######################## DEFAULTS ####################################### |
|
public static |
Returns all the ColorBrewer diverging color schemes. |
|
public static |
getDotMapDefaults(dataNature: string , numClasses: number ): Array<number> Returns the default color for Dot Maps taking in consideration the given number of classes and nature of data currently being used. |
|
public static |
getProportionalSymbolsDefaults(dataNature: string , numClasses: number ): Array<number> Returns the default color for Proportional Symbols Maps taking in consideration the given number of classes and nature of data currently being used. |
|
public static |
Returns all the ColorBrewer qualitative color schemes. |
|
public static |
Returns all the ColorBrewer the sequential color schemes. |
Static Public Methods
public static byName(name: string): Object source
This is just an alias for the method getColorSchemesByName(name).
Params:
Name | Type | Attribute | Description |
name | string |
Return:
Object | an object with multiple color schemes for each number of classes associated with the color scheme given as input. |
public static byNameAndNumber(name: string, numberOfClasses: number): Array<RGB> source
For the given color scheme name and number of classes returns the RGB colors associated with them.
public static byNumber(numberOfClasses: number): Object source
Returns all ColorSchemes that contain the number of class given as input.
Params:
Name | Type | Attribute | Description |
numberOfClasses | number | number of classes to search for. |
public static getAllColorSchemesByNumberOfClasses(numberOfClasses: number): Object source
Returns an object of color schemes with only those the objects for the specified number of classes.
Params:
Name | Type | Attribute | Description |
numberOfClasses | number |
Return:
Object | an object of color schemes with only those the objects for the specified number of classes. |
public static getAllColorSchemesByNumberOfClassesAsArray(numberOfClasses: number): Array<Object> source
Params:
Name | Type | Attribute | Description |
numberOfClasses | number |
public static getChangeMapDefaults(dataNature: string , numClasses: number ): Array<number> source
Returns the default color for Change Maps taking in consideration the given number of classes and nature of data currently being used.
Params:
Name | Type | Attribute | Description |
dataNature | string | The type of data. |
|
numClasses | number | The number of classes. |
Return:
Array<number> | the default color for the given number of classes and nature of data currently being used. |
public static getChorochromaticDefaults(dataNature: string , numClasses: number ): Array<number> source
Returns the default color for Chorocromatic Maps taking in consideration the given number of classes and nature of data currently being used.
Params:
Name | Type | Attribute | Description |
dataNature | string | The type of data. |
|
numClasses | number | The number of classes. |
Return:
Array<number> | the default color for the given number of classes and nature of data currently being used. |
public static getChoroplethDefaults(dataNature: string , numClasses: number ): Array<number> source
Returns the default color for Choropleth Maps taking in consideration the given number of classes and nature of data currently being used.
Params:
Name | Type | Attribute | Description |
dataNature | string | The type of data. |
|
numClasses | number | The number of classes. |
Return:
Array<number> | the default color for the given number of classes and nature of data currently being used. |
public static getColorBrewerVariable(): Object source
Returns the ColorBrewer object of type of color schemes.
public static getColorScheme(type: string, name: string, numOfClasses: number): Array<RGB> source
Returns an array with numOfClasses elements that are the colors for the given type of color scheme and it's name.
public static getColorSchemesByName(name: string): Object source
Return an object with multiple color schemes for each number of classes associated with the color scheme given as input.
Params:
Name | Type | Attribute | Description |
name | string |
Return:
Object | an object with multiple color schemes for each number of classes associated with the color scheme given as input. |
public static getColors(name: string, numberOfClasses: number): Array<Array<number>> source
Given the color scheme name and the number of classes returns an Array of colors associated with the given name and number of classes.
public static getColorsHex(name: string, numberOfClasses: number): Array<Array<string>> source
Given the color scheme name and the number of classes returns an Array of colors associated with the given name and number of classes.
public static getDefautls(mapName: *, numClasses: *, dataNature: *): * source
######################## DEFAULTS #######################################
Params:
Name | Type | Attribute | Description |
mapName | * | ||
numClasses | * | ||
dataNature | * |
Return:
* |
public static getDivergingColorSchemes(): Object source
Returns all the ColorBrewer diverging color schemes.
public static getDotMapDefaults(dataNature: string , numClasses: number ): Array<number> source
Returns the default color for Dot Maps taking in consideration the given number of classes and nature of data currently being used.
Params:
Name | Type | Attribute | Description |
dataNature | string | The type of data. |
|
numClasses | number | The number of classes. |
Return:
Array<number> | the default color for the given number of classes and nature of data currently being used. |
public static getProportionalSymbolsDefaults(dataNature: string , numClasses: number ): Array<number> source
Returns the default color for Proportional Symbols Maps taking in consideration the given number of classes and nature of data currently being used.
Params:
Name | Type | Attribute | Description |
dataNature | string | The type of data. |
|
numClasses | number | The number of classes. |
Return:
Array<number> | the default color for the given number of classes and nature of data currently being used. |