多维表格

chart类型为NXSuperList的样式

当chartType设置为NXChartType.NXSuperList时,card显示如下图效果:
superList
相关属性如下:

{ "type":"NXCubeCard", "style":{ "superList": { "autoPageScroll": true, "rows": { ... }, "header": { ... }, "columns": [{ ... }] }, "type": "NXSuperList" } }

autoPageScroll

手指滑动时,是否自动翻页。

rows

superList中各行的样式属性。相关属性如下:

{ "rows": { "oddColor": "#FAFAFA", "evenColor": "#FFFFFF", "rowHeight": 32 } }

"oddColor":奇数行的填充色。
"evenColor":偶数行的填充色。
"rowHeight":行的高度。

superList中表格头部的样式属性。相关属性如下:

{ "header": { "headerHeight": "42", "backgroundColor": "#ebecf0", "textStyle": { ... } } }

"headerHeight":表格头部的高度。
"backgroundColor":表格头部的背景色。
"textStyle":表格头部的文本样式。具体属性见textStyle

column

superList中各列的样式属性。相关属性如下:

{ "isMajorColumn":true, "valueSource": "", "name": "", "padding": { ... }, "valueFormat": { ... }, "range": { ... }, "textStyle": { ... }, "alignment": "NXAlignmentCenter", "showChart": false, "showText": true, "chartWidth": 100, "chart": { ... }, "multiValueSource": [], "expandGran": [ "granKey0", "granKey1" ] }
  • "isMajorColumn":定义是否是主列,主列必须有一个。
  • "valueSource":该属性对主列有用,设置主列的数据来源。数据源为structure中granularity的key。
  • "name":列的名称。
  • "padding":列内单元格的内边距。
  • "valueFormat":列内数据的格式化。详情见valueFormats
  • "range":根据数据范围,将列内数据划分区域。详情见colorRange
  • "textStyle":列内单元格的文本样式。详情见textStyle
  • "alignment":列内单元格的排列对齐方式。可选项有:"NXAlignmentLeft"(靠左对齐),"NXAlignmentCenter"(水平居中对齐),"NXAlignmentRight"(靠右对齐),"NXAlignmentTop"(顶部对齐),"NXAlignmentMiddle"(垂直居中对齐),"NXAlignmentBottom"(底部对齐)
  • "showChart":是否显示图表。
  • "showText":是否显示文字。
  • "chartWidth":图表的宽度。
  • "chart":如果"showChart"为true,那么应该设置图表的样式。具体属性见:chart
  • "multiValueSource":该列要显示的图形粒度列表。属性可以为空,程序自动将主列作为作为图形粒度;设置为一个数据源时,表示图表为单系列;设置为多个数据源时,表示图表为多系列。注意,此时设置的属性应该与chart中设置的图形粒度一致。
  • "expandGran":主列可展开的粒度key集合。

results matching ""

    No results matching ""