Skip to content

Commit 1bd8afb

Browse files
committed
优化api
1 parent 76c014f commit 1bd8afb

File tree

5 files changed

+16
-22
lines changed

5 files changed

+16
-22
lines changed

src/common/overlay/Pie.js

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,6 @@ import {Graph} from './Graph';
4949
* }
5050
* }
5151
* ]
52-
* sectorHoverStyle - {Object} 饼图扇形 hover 状态时的样式,sectorHoverAble 为 true 时有效。
53-
* sectorHoverAble - {Object} 是否允许饼图扇形使用 hover 状态,默认允许。同时设置 sectorHoverAble 和 sectorClickAble 为 false,可以直接屏蔽饼图扇形对专题图层事件的响应。
54-
* sectorClickAble - {Object} 是否允许饼图扇形被点击,默认允许。同时设置 sectorHoverAble 和 sectorClickAble 为 false,可以直接屏蔽饼图扇形对专题图层事件的响应。
5552
* @extends {SuperMap.Feature.Theme.Graph}
5653
*/
5754
export class Pie extends Graph {
@@ -198,17 +195,14 @@ export class Pie extends Graph {
198195
* @property {Array.<number>} decimalNumber - 数据值数组 dataValues 元素值小数位数,数据的小数位处理参数,取值范围:[0, 16]。如果不设置此参数,在取数据值时不对数据做小数位处理。
199196
* @property {boolean} [useBackground=false] - 是否使用图表背景框。
200197
* @property {SuperMap.Feature.ShapeParameters.Rectangle.style} backgroundStyle - 背景样式。
201-
* @property {Array.<number>} [backgroundRadius=[0, 0, 0, 0]] - 背景框矩形圆角半径,可以用数组分别指定四个角的圆角半径,设:左上、右上、右下、左下角的半径依次为 r1、r2、r3、r4 ,则 backgroundRadius 为 [r1、r2、r3、r4 ]。
198+
* @property {Array.<number>} [backgroundRadius=[0, 0, 0, 0]] - 背景框矩形圆角半径,可以用数组分别指定四个角的圆角半径,设:左上、右上、右下、左下角的半径依次为 r1、r2、r3、r4 则 backgroundRadius 为 [r1、r2、r3、r4 ]。
202199
* @property {SuperMap.Feature.ShapeParameters.Sector.style} sectorStyle - 饼图中扇形的基础 style,此参数控制饼图扇形基础样式,优先级低于 sectorStyleByFields 和 sectorStyleByCodomain。
203200
* @property {Array.<SuperMap.Feature.ShapeParameters.Sector.style>} sectorStyleByFields - 按专题字段 themeFields(<SuperMap.Layer.Graph.themeFields>)为饼图扇形赋 style,此参数按字段控制饼图扇形样式,优先级低于 sectorStyleByCodomain,高于 sectorStyle。此参数中的 style 与 themeFields 中的字段一一对应 。例如: themeFields(<SuperMap.Layer.Graph.themeFields>) 为 ["POP_1992", "POP_1995", "POP_1999"],
204201
* sectorStyleByFields 为[style1, style2, style3],则在图表中,字段 POP_1992 对应的饼图扇形使用 style1,字段 POP_1995 对应的饼图扇形使用 style2 ,字段 POP_1999 对应的饼图扇形使用 style3。
205202
* @property {Array.<Object>} sectorStyleByCodomain - 按饼图扇形代表的数据值所在值域范围控制饼图扇形样式,优先级高于 sectorStyle 和 sectorStyleByFields。
206-
* @param {SuperMap.Feature.Vector} data - 用户数据。
207-
* @param {SuperMap.Layer.Graph} layer - 此专题要素所在图层。
208-
* @param {Array.<string>} fields - data 中的参与此图表生成的字段名称。
209-
* @param {Object} setting - 图表配置对象。
210-
* @param {SuperMap.LonLat} [lonlat] - 专题要素地理位置。默认为 data 指代的地理要素 Bounds 中心。
211-
*
203+
* @property {Object} [sectorHoverStyle] 饼图扇形 hover 状态时的样式,sectorHoverAble 为 true 时有效。
204+
* @property {boolean} [sectorHoverAble=true] 是否允许饼图扇形使用 hover 状态。同时设置 sectorHoverAble 和 sectorClickAble 为 false,可以直接屏蔽饼图扇形对专题图层事件的响应。
205+
* @property {boolean} [sectorClickAble=true] 是否允许饼图扇形被点击。同时设置 sectorHoverAble 和 sectorClickAble 为 false,可以直接屏蔽饼图扇形对专题图层事件的响应。
212206
*/
213207

214208
SuperMap.Feature.Theme.Pie = Pie;

src/common/overlay/Point.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ import {Graph} from './Graph';
4848
* }
4949
* }
5050
* ]
51-
* pointHoverStyle - {Object} 图形点 hover 状态时的样式,pointHoverAble 为 true 时有效。
52-
* pointHoverAble - {Object} 是否允许图形点使用 hover 状态,默认允许。同时设置 pointHoverAble 和 pointClickAble 为 false,可以直接屏蔽图形点对专题图层事件的响应。
53-
* pointClickAble - {Object} 是否允许图形点被点击,默认允许。同时设置 pointHoverAble 和 pointClickAble 为 false,可以直接屏蔽图形点对专题图层事件的响应。
5451
*@extends {SuperMap.Feature.Theme.Graph}
5552
5653
*/
@@ -265,5 +262,8 @@ export class Point extends Graph {
265262
* 此参数中的 style 与 themeFields 中的字段一一对应 。例如: themeFields(<SuperMap.Layer.Graph.themeFields>) 为 ["POP_1992", "POP_1995", "POP_1999"],
266263
* pointStyleByFields 为[style1, style2, style3],则在图表中,字段 POP_1992 对应的图形点使用 style1,字段 POP_1995 对应的图形点使用 style2 ,字段 POP_1999 对应的图形点使用 style3。
267264
* @property {Array.<Object>} pointStyleByCodomain - 按图形点代表的数据值所在值域范围控制图形点样式,优先级高于 pointStyle 和 pointStyleByFields。
265+
* @property {Object} [pointHoverStyle] - 图形点 hover 状态时的样式,pointHoverAble 为 true 时有效。
266+
* @property {Object} [pointHoverAble=true] - 是否允许图形点使用 hover 状态。同时设置 pointHoverAble 和 pointClickAble 为 false,可以直接屏蔽图形点对专题图层事件的响应。
267+
* @property {Object} [pointClickAble=true] - 是否允许图形点被点击。同时设置 pointHoverAble 和 pointClickAble 为 false,可以直接屏蔽图形点对专题图层事件的响应。
268268
*/
269269
SuperMap.Feature.Theme.Point = Point;

src/common/overlay/RankSymbol.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class RankSymbol extends Graph {
2525
/**
2626
* @member SuperMap.Feature.Theme.RankSymbol.prototype.setting -{Object}
2727
* @description 符号配置对象,该对象控制着图表的可视化显示。
28-
* 下面是此配置对象的 5 个基础可设属性:
28+
* 下面是此配置对象的 5 个基础可设属性:<br>
2929
* @param {Array.<number>} codomain - 值域,长度为 2 的一维数组,第一个元素表示值域下限,第二个元素表示值域上限。
3030
* @param {number} [XOffset] - 专题要素(图表)在 X 方向上的偏移值,单位像素。
3131
* @param {number} [YOffset] - 专题要素(图表)在 Y 方向上的偏移值,单位像素。

src/common/overlay/Ring.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export class Ring extends Graph {
206206
* @property {Array.<number>} [backgroundRadius=[0, 0, 0, 0]] - 背景框矩形圆角半径,可以用数组分别指定四个角的圆角半径,设:左上、右上、右下、左下角的半径依次为 r1、r2、r3、r4 ,则 backgroundRadius 为 [r1、r2、r3、r4 ]。
207207
* @property {number} [innerRingRadius=0] - 环状图内环半径,取值范围大于 0,小于外环半径(外环半径:数据视图框长和宽中较小值的二分之一)。
208208
* @property {SuperMap.Feature.ShapeParameters.Sector.style} [sectorStyle] - 环状图中扇形的基础 style,此参数控制环状图扇形基础样式,优先级低于 sectorStyleByFields 和 sectorStyleByCodomain。
209-
* @property {Array.<SuperMap.Feature.ShapeParameters.Sector.style>} [sectorStyleByFields] - 按专题字段 themeFields(<SuperMap.Layer.Graph.themeFields|L.supermap.graphThemeLayer.themeFields|ol.source.Graph.themeFields|mapboxgl.supermap.GraphThemeLayer.themeFields>)为环状图扇形赋 style,此参数按字段控制环状图扇形样式,优先级低于 sectorStyleByCodomain,高于 sectorStyle。此数组中的元素是样式对象。此参数中的 style 与 themeFields 中的字段一一对应 。例如: themeFields(<SuperMap.Layer.Graph.themeFields>) 为 ["POP_1992", "POP_1995", "POP_1999"],sectorStyleByFields 为[style1, style2, style3],则在图表中,字段 POP_1992 对应的环状图扇形使用 style1,字段 POP_1995 对应的环状图扇形使用 style2 ,字段 POP_1999 对应的环状图扇形使用 style3。
209+
* @property {Array.<SuperMap.Feature.ShapeParameters.Sector.style>} [sectorStyleByFields] - 按专题字段 themeFields({@link SuperMap.Layer.Graph.themeFields}|{@link L.supermap.graphThemeLayer.themeFields}|{@link ol.source.Graph.themeFields}|{@link mapboxgl.supermap.GraphThemeLayer.themeFields})为环状图扇形赋 style,此参数按字段控制环状图扇形样式,优先级低于 sectorStyleByCodomain,高于 sectorStyle。此数组中的元素是样式对象。此参数中的 style 与 themeFields 中的字段一一对应 。例如: themeFields(<SuperMap.Layer.Graph.themeFields>) 为 ["POP_1992", "POP_1995", "POP_1999"],sectorStyleByFields 为[style1, style2, style3],则在图表中,字段 POP_1992 对应的环状图扇形使用 style1,字段 POP_1995 对应的环状图扇形使用 style2 ,字段 POP_1999 对应的环状图扇形使用 style3。
210210
* @property {Array.<SuperMap.Feature.ShapeParameters.Sector.style>} [sectorStyleByCodomain] - 按环状图扇形代表的数据值所在值域范围控制环状图扇形样式,优先级高于 sectorStyle 和 sectorStyleByFields。
211211
212212
*/

src/common/overlay/ThemeVector.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ import {LonLat} from '../commontypes/LonLat';
2626
* @classdesc 矢量专题要素类。
2727
* @category Visualization Theme
2828
* @extends SuperMap.Feature.Theme
29-
* @param {SuperMap.Feature.Vector} data - 用户数据,矢量专题要素的类型为矢量数据 feature。
29+
* @param {SuperMap.Feature.Vector} data - 用户数据,的类型为矢量数据 feature。
3030
* @param {SuperMap.Layer} layer - 此专题要素所在图层。
3131
* @param {Object} style - 样式。
3232
* @param {Object} options - 创建专题要素时的可选参数。
33-
* @param {number} [nodesClipPixel=2] - 节点抽稀像素距离, 单位:像素。
34-
* @param {boolean} [isHoverAble=true] - 图形是否可 hover。
35-
* @param {boolean} [isMultiHover=true] - 是否使用多图形高亮,isHoverAble 为 true 时生效。
36-
* @param {boolean} [isClickAble=true] - 图形是否可点击。
37-
* @param {Object} highlightStyle - 高亮样式。
33+
* @param {number} [options.nodesClipPixel=2] - 节点抽稀像素距离, 单位:像素。
34+
* @param {boolean} [options.isHoverAble=true] - 图形是否可 hover。
35+
* @param {boolean} [options.isMultiHover=true] - 是否使用多图形高亮,isHoverAble 为 true 时生效。
36+
* @param {boolean} [options.isClickAble=true] - 图形是否可点击。
37+
* @param {Object} [options.highlightStyle] - 高亮样式。
3838
*/
3939
export class ThemeVector extends Theme {
4040

@@ -79,7 +79,7 @@ export class ThemeVector extends Theme {
7979
this.isClickAble = true;
8080

8181
/**
82-
* @member {Object} - SuperMap.Feature.Theme.Vector.prototype.highlightStyle
82+
* @member {Object} - [SuperMap.Feature.Theme.Vector.prototype.highlightStyle]
8383
* @description 高亮样式。
8484
*/
8585
this.highlightStyle = null;

0 commit comments

Comments
 (0)