# Class: UniqueTheme

## UniqueTheme()

#### new UniqueTheme()

唯一值专题图

Source:
  - UniqueTheme.js, line 14

### Methods

#### (async, static) append(uniqueThemeInfo) → {int}

添加项

##### Parameters:

Name | Type | Description
--- | --- | ---
`uniqueThemeInfo` | Object | 单值专题图信息 (Object---UniqueThemeInfo)

Source:
  - UniqueTheme.js, line 170

##### Returns:

成功返回添加后专题图项索引

Type
  int

#### (async, static) clear() → {boolean}

清空所有的项

Source:
  - UniqueTheme.js, line 236

##### Returns:

true-成功 ；false-失败

Type
  boolean

#### (async, static) createObj() → {Promise.<UniqueTheme>}

创建一个新的UniqueTheme对象

Source:
  - UniqueTheme.js, line 37

##### Returns:

Type
  Promise.<UniqueTheme>

#### (async, static) getAllOtherDataItemInfoSource() → {int}

获取专题图类型

Source:
  - UniqueTheme.js, line 134

##### Returns:

专题图类型 例: 1--AllOtherDataItemInfoSource.DefaultThemeInfo

Type
  int

#### (async, static) getCount() → {int}

获取单值专题图项数目

Source:
  - UniqueTheme.js, line 119

##### Returns:

单值专题图项数目

Type
  int

#### (async, static) getDefaultInfo() → {Object}

获取缺省专题绘制信息

Source:
  - UniqueTheme.js, line 54

##### Returns:

专题绘制信息 (Object---ThemeInfo)

Type
  Object

#### (async, static) getExpression() → {String}

获取唯一字段表达式

Source:
  - UniqueTheme.js, line 89

##### Returns:

Type
  String

#### (async, static) getItem(index) → {promise.<UniqueThemeInfo>}

获取项信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 单值专题图项索引

Source:
  - UniqueTheme.js, line 273

##### Returns:

成功返回项的信息

Type
  promise.<UniqueThemeInfo>

#### (async, static) indexOf(value) → {int}

寻找值为value的项索引

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | String | 单值专题图项的值

Source:
  - UniqueTheme.js, line 221

##### Returns:

成功返回索引

Type
  int

#### (async, static) removeByIndex(index) → {boolean}

删除项（删除之后的语义是图元用未分类字段的颜色）

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 单值专题图项索引

Source:
  - UniqueTheme.js, line 189

##### Returns:

true-成功 ；false-失败

Type
  boolean

#### (async, static) removeByValue(value) → {boolean}

移除值为value的项

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | String | 单值专题图项的值

Source:
  - UniqueTheme.js, line 205

##### Returns:

true-成功 ；false-失败

Type
  boolean

#### (async, static) setAllOtherDataItemInfoSource(allOtherDataItemInfoSource) → {Promise.<Void>}

设置专题图类型

##### Parameters:

Name | Type | Description
--- | --- | ---
`allOtherDataItemInfoSource` | int | 专题图类型 例: 1--AllOtherDataItemInfoSource.DefaultThemeInfo

Source:
  - UniqueTheme.js, line 152

##### Returns:

Type
  Promise.<Void>

#### (async, static) setDefaultInfo(themeInfo) → {Promise.<Void>}

设置缺省专题绘制信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`themeInfo` | Object | 专题绘制信息 (Object---ThemeInfo)

Source:
  - UniqueTheme.js, line 75

##### Returns:

Type
  Promise.<Void>

#### (async, static) setExpression(expression) → {Promise.<Void>}

设置唯一字段表达式

##### Parameters:

Name | Type | Description
--- | --- | ---
`expression` | String | 唯一字段表达式

Source:
  - UniqueTheme.js, line 105

##### Returns:

Type
  Promise.<Void>

#### (async, static) setItem(index, uniqueThemeInfo) → {boolean}

设置项信息

##### Parameters:

Name | Type | Description
--- | --- | ---
`index` | int | 单值专题图项索引
`uniqueThemeInfo` | Object | 单值专题图项信息 （Object -- UniqueThemeInfo ）

Source:
  - UniqueTheme.js, line 253

##### Returns:

true-成功 ；false-失败

Type
  boolean