@openbkn/workshop 0.2.2-rc.5 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +83 -13
  2. package/component.d.ts +10 -0
  3. package/dist/ActionConfirm-DJ91X3ml.js +236 -0
  4. package/dist/ActionFailure-ZgPt_3B-.js +37 -0
  5. package/dist/AgentChat-CRYai8ge.js +1062 -0
  6. package/dist/AppFormModal-D73ucaHK.js +4282 -0
  7. package/dist/AppListPage-D87piiOw.js +1364 -0
  8. package/dist/AskDrawer-BUMYsRnt.js +38 -0
  9. package/dist/ComputedView-CgYrDbx1.js +3221 -0
  10. package/dist/ConclusionApply-sjGfoEBY.js +153 -0
  11. package/dist/CypherEditor-lus6FA5L.js +485 -0
  12. package/dist/LandingList-6JI6864C.js +230 -0
  13. package/dist/MenuUnfoldOutlined-Cdg24l2h.js +27 -0
  14. package/dist/ModelTrial-ClHFGTpQ.js +359 -0
  15. package/dist/PageRenderer-DBd_g6mN.js +85480 -0
  16. package/dist/README-DjRyTQSR.js +76 -0
  17. package/dist/ScenarioApply-DtW_hh47.js +590 -0
  18. package/dist/SimulateForm-C-i08Jjd.js +153 -0
  19. package/dist/Subgraph-CnrkH9AN.js +32586 -0
  20. package/dist/WorkshopLabPage-DiVXQL9e.js +11364 -0
  21. package/dist/WorkshopRunPage-6hjRUf64.js +253 -0
  22. package/dist/abnfDiagram-WEYOIA3C-beRNhN3c.js +87 -0
  23. package/dist/action-type-tool.service-B2B74fKC.js +1060 -0
  24. package/dist/actionButton-DA5CNEzx.js +94 -0
  25. package/dist/actionButton.en-US-qjeqA7hs.js +94 -0
  26. package/dist/agentChat-EoDznd58.js +116 -0
  27. package/dist/agentChat.en-US-B6-pFd9Y.js +116 -0
  28. package/dist/alertList-DqditwM8.js +84 -0
  29. package/dist/alertList.en-US-BAXAgltP.js +84 -0
  30. package/dist/architectureDiagram-ZHVYKT53-DY2l1qxx.js +4779 -0
  31. package/dist/asOfSlider-QPvHWUMV.js +83 -0
  32. package/dist/asOfSlider.en-US-BI4jVfSn.js +83 -0
  33. package/dist/bkn-agent-execution.service-DVh-SHyl.js +205 -0
  34. package/dist/blockDiagram-RJAE7QA3-DR0mjN2h.js +1435 -0
  35. package/dist/c4Diagram-XDPPPE54-DH5zsGug.js +1518 -0
  36. package/dist/channel-B034hcOF.js +5 -0
  37. package/dist/china-C6m7zXIv.js +9 -0
  38. package/dist/chunk-2E7WHVMD-Ba3svxgx.js +664 -0
  39. package/dist/chunk-2Q5K7J3B-rT4eU6_y.js +15 -0
  40. package/dist/chunk-4EMNKR2T-C1kQZYHK.js +262 -0
  41. package/dist/chunk-55XCU76K-dcpLOktb.js +68 -0
  42. package/dist/chunk-5VM5RSS4-BdpQuzmO.js +19 -0
  43. package/dist/chunk-JWPE2WC7-CDBrSjU7.js +8 -0
  44. package/dist/chunk-VQ5W62QI-BiVKc40w.js +19 -0
  45. package/dist/chunk-XXDRQBXY-CPYrcdVW.js +8 -0
  46. package/dist/chunk-ZCHMQSOR-BG8OLpvb.js +451 -0
  47. package/dist/classDiagram-v2-4MYWR3UA-DqbpQpwI.js +1564 -0
  48. package/dist/component.d-DFoMKuUv.js +179 -0
  49. package/dist/cose-bilkent-JH36ORCC-CdXk4sPf.js +2609 -0
  50. package/dist/customComponents-DasaZ6pq.js +4 -0
  51. package/dist/customComponents.en-US-CkabuCXg.js +79 -0
  52. package/dist/customParseFormat-C0uLEpdq.js +182 -0
  53. package/dist/cynefin-EF2NZ3EQ-D7MVnMHu.js +21746 -0
  54. package/dist/cynefinDiagram-WF24UDRP-BYT_KpDL.js +299 -0
  55. package/dist/cytoscape.esm-BCV9V6aO.js +18760 -0
  56. package/dist/d3-scale-DA8IHmf0.js +1841 -0
  57. package/dist/dagre-NK4GIZVX-l-ghPdM8.js +2154 -0
  58. package/dist/dateRange-BbkLMg8L.js +79 -0
  59. package/dist/dateRange.en-US-CV12Q02G.js +79 -0
  60. package/dist/dayjs.min-DZ-YV8Mv.js +284 -0
  61. package/dist/diagram-CBK3MWTC-Bt3HiwvA.js +542 -0
  62. package/dist/diagram-I5XIIV2D-DcbqfBjx.js +150 -0
  63. package/dist/diagram-ODIL2UCW-9PC1n3n5.js +346 -0
  64. package/dist/diagram-PFBEJUXE-DGhr2kc7.js +478 -0
  65. package/dist/diagram-RJA3I4VV-DwzpOjZ_.js +219 -0
  66. package/dist/diagram-TYUNFSNR-B3Bd3TDU.js +2583 -0
  67. package/dist/dropdownFilter-DOi_8-ZT.js +76 -0
  68. package/dist/dropdownFilter.en-US-BiXpvXtF.js +76 -0
  69. package/dist/ebnfDiagram-V4P3TTPT-E5NN2oKc.js +109 -0
  70. package/dist/elk-QONTBCTQ-dFjcujl_.js +49170 -0
  71. package/dist/erDiagram-KYQIGQAA-BMrasBzB.js +1061 -0
  72. package/dist/eventList-CnsAwfDS.js +115 -0
  73. package/dist/eventList.en-US-Cof3rCLq.js +115 -0
  74. package/dist/eventReport-XS-HegnH.js +76 -0
  75. package/dist/eventReport.en-US-DTx4vzWT.js +76 -0
  76. package/dist/flowDiagram-IUGLLWBU-BGIBH0q0.js +1769 -0
  77. package/dist/ganttChart-DEeSvTJA.js +77 -0
  78. package/dist/ganttChart.en-US-SwRKrnoD.js +77 -0
  79. package/dist/ganttDiagram-R7GPNTJY-C0tb1Lpp.js +1741 -0
  80. package/dist/generateCypher-Ch9_lQa6.js +399 -0
  81. package/dist/gitGraphDiagram-PDYL7XHY-DBqcOa-c.js +815 -0
  82. package/dist/graph-CKJmgLki.js +1541 -0
  83. package/dist/index-BA-GzCXt.js +441 -0
  84. package/dist/infoDiagram-MVDRKAX5-Bwuki4JA.js +24 -0
  85. package/dist/ishikawaDiagram-HPEHV2GE-Dz4d6ygx.js +622 -0
  86. package/dist/journeyDiagram-BOSHW7O7-C99m34Bb.js +834 -0
  87. package/dist/kanban-definition-FNSA4HC5-mdqjODsT.js +724 -0
  88. package/dist/katex-BsrBVQKd.js +11314 -0
  89. package/dist/manifest-BjV1PJ6u.js +41 -0
  90. package/dist/mermaid.core-yQghUlIz.js +17642 -0
  91. package/dist/metricCards-CSb-_cT2.js +104 -0
  92. package/dist/metricCards.en-US-BLLhRsQU.js +104 -0
  93. package/dist/mindmap-definition-6OY57UG3-BZhO2wX4.js +834 -0
  94. package/dist/modelTrial-Bvb-RhGt.js +137 -0
  95. package/dist/modelTrial.en-US-DYcuor-G.js +137 -0
  96. package/dist/models-DekiCOuZ.js +6 -0
  97. package/dist/object-metric-numeric-vs3BeDkH.js +42 -0
  98. package/dist/object-metric.service-flZgBMRX.js +233 -0
  99. package/dist/objectDetail-SQUbp4Py.js +117 -0
  100. package/dist/objectDetail.en-US-DW3mlONM.js +117 -0
  101. package/dist/objectList-D99wPtJH.js +97 -0
  102. package/dist/objectList.en-US-PBBNyVLW.js +97 -0
  103. package/dist/objectTable-0jsFFMN3.js +127 -0
  104. package/dist/objectTable.en-US-yWEs8qc_.js +127 -0
  105. package/dist/pegDiagram-ECIUJNBX-BDa5RfZt.js +95 -0
  106. package/dist/pieDiagram-GNMPY74T-DNVtzXPv.js +165 -0
  107. package/dist/pivotTable-CHmQw18-.js +102 -0
  108. package/dist/pivotTable.en-US-B4uv4P08.js +102 -0
  109. package/dist/prompt-DYrjlEFr.js +373 -0
  110. package/dist/quadrantDiagram-D57K4MC3-vK0f2OvQ.js +1023 -0
  111. package/dist/railroadDiagram-Y72NRBL7-j6ZrTmRp.js +77 -0
  112. package/dist/regionMap-Cme-JyV_.js +128 -0
  113. package/dist/regionMap.en-US-Bwr2_p32.js +128 -0
  114. package/dist/requirementDiagram-EQYSW5RA-DgfEyljA.js +886 -0
  115. package/dist/sankeyDiagram-SY24JHO5-CImx-IX0.js +1160 -0
  116. package/dist/scenarioBar-BV43p7n-.js +122 -0
  117. package/dist/scenarioBar.en-US-5KqMQ2Bg.js +122 -0
  118. package/dist/scheduleGantt-CTYO-zYP.js +180 -0
  119. package/dist/scheduleGantt.en-US-hE7mvVUW.js +180 -0
  120. package/dist/searchBox-Ca7w0f_6.js +67 -0
  121. package/dist/searchBox.en-US-ArS_XBvB.js +67 -0
  122. package/dist/segmentedFilter-MhjVcWo0.js +80 -0
  123. package/dist/segmentedFilter.en-US-BxNrQO5T.js +80 -0
  124. package/dist/sequenceDiagram-BLEHNHQU-nWmjd1ci.js +2969 -0
  125. package/dist/sizeCapture-INFHLROL-D3jlbt7h.js +46 -0
  126. package/dist/stageChain-BxBafwjD.js +74 -0
  127. package/dist/stageChain.en-US-CP0G27n8.js +74 -0
  128. package/dist/stateDiagram-v2-A6IESKWZ-DG1ZetEu.js +1514 -0
  129. package/dist/subgraph-7n4SwliR.js +71 -0
  130. package/dist/subgraph.en-US-BNvY18IW.js +71 -0
  131. package/dist/swimlanes-B3ENRKFQ-cCmJE8AU.js +4991 -0
  132. package/dist/swimlanesDiagram-AYQRV4AK-CtuhyguU.js +14 -0
  133. package/dist/taskInbox-DGWYeI2b.js +118 -0
  134. package/dist/taskInbox.en-US-B-OzDmVl.js +118 -0
  135. package/dist/text-BqSVQKS6.js +78 -0
  136. package/dist/text.en-US-BhAxy_LE.js +78 -0
  137. package/dist/timeline-definition-JXYKGLGB-Cc-INsOv.js +1057 -0
  138. package/dist/trendChart-BjEeRS5_.js +135 -0
  139. package/dist/trendChart.en-US-BBGqWUKM.js +135 -0
  140. package/dist/useLabData-Df-jEHKs.js +20470 -0
  141. package/dist/usecaseDiagram-WPOLBNNX-r8wVjopm.js +7920 -0
  142. package/dist/vennDiagram-Q3Y3IDCW-BZiOcgrj.js +1579 -0
  143. package/dist/wardleyDiagram-IVAIDKWA-16jd07C_.js +675 -0
  144. package/dist/workshop-app-DnHNjBqy.js +86038 -0
  145. package/dist/workshop-app.css +1 -0
  146. package/dist/workshop-app.js +4 -0
  147. package/dist/world-Djau1JyJ.js +9 -0
  148. package/dist/xychartDiagram-4URNHDU4-C8DwWQNh.js +1460 -0
  149. package/dist-cli/workshop.js +341 -218
  150. package/example/host.js +109 -0
  151. package/example/index.html +93 -0
  152. package/example/server.mjs +237 -0
  153. package/index.d.ts +48 -0
  154. package/lib/validate.js +47 -1
  155. package/package.json +17 -5
  156. package/runtime/frame-runtime.js +13 -1
  157. package/workshop-component.js +32 -12
  158. package/workshop.js +2 -0
@@ -0,0 +1,135 @@
1
+ const n = `# 图表(trendChart)
2
+
3
+ 柱状图、折线图或饼图:按时间看数量或金额的变化,或按类别比较大小;点一个周期或类别,整页只看它。用来回答“最近几个月走势如何”“哪几类最多”。
4
+
5
+ ## 适用与不适用
6
+
7
+ - 适用:
8
+ - 横轴为时间:按日、周、月或季度,看一类对象每个周期的数量、金额,可几个系列并列。例如每月新增订单、每周完工工单。
9
+ - 横轴为类别:按某个属性的取值比较,可画成柱、线或饼。例如各缺陷类型的数量、各产线的产量。
10
+ - 系列改用知识网络里定义好的“对象指标”,由平台按全部对象计算。
11
+ - 不适用:
12
+ - 要看每组的具体数字和占比:用透视表(\`pivotTable\`)。
13
+ - 要在地图上按省份或国家着色:用地图(\`regionMap\`)。
14
+ - 只要几个当前总数:用指标卡组(\`metricCards\`)。
15
+ - 要按开始、结束日期画计划条:用甘特图(\`ganttChart\`)。
16
+
17
+ ## 本体契约
18
+
19
+ | 角色 | 对象类要求 | 必要的属性 | 关系 | 必填 |
20
+ | --- | --- | --- | --- | --- |
21
+ | 被统计对象 | 要统计的一类对象,作为页面的数据源 | 标识属性;横轴为时间时,每个系列一个日期属性;横轴为类别时,一个类别属性;求和、平均、最大、最小时一个数字属性 | — | 是(用对象指标时,数据源仍用来限定对象类与筛选) |
22
+ | 拆分属性 | 同一对象类 | 一个取值有限的属性,或“判断状态”计算列 | — | 否 |
23
+ | 对象指标 | 知识网络里已发布的对象指标 | 指标本身的口径与粒度在知识网络里定义 | 指标挂在对象类上 | 否 |
24
+
25
+ 页面内统计时,对象整表读入浏览器再统计;用对象指标时,数值由平台计算,口径以知识网络里的定义为准。
26
+
27
+ ## 组件内置的判断
28
+
29
+ 与行业无关,组件自己做:
30
+
31
+ | 判断 | 规则 |
32
+ | --- | --- |
33
+ | 时间周期 | 横轴为时间时,显示以页面基准日期所在周期为最后一个的若干周期(默认按月);基准日期之后的日期不计入 |
34
+ | 空周期 | 没有对象的周期记为 0 |
35
+ | 类别取值 | 横轴为类别时,取第一个系列数值最大的若干个类别(默认 8 个),空值不计;也可按类别自身排序,例如年份 |
36
+ | 拆分 | 按拆分属性把每个系列分成几部分:取出现最多的几个值,其余合并成一个“其他”,合计最多 6 部分;拆分属性是“判断状态”列时,按它的取值顺序与颜色 |
37
+ | 柱子方向 | 横轴为类别且全是柱时,类别名较长(约超过四个汉字)自动改为横向条形,名字过长截断,悬停看全名 |
38
+ | 选中高亮 | 已选中的周期或类别正常显示,其余变淡 |
39
+
40
+ 什么算“缺陷”“完工”由数据源与指标决定,图表只按取值统计。
41
+
42
+ ## 扩展点
43
+
44
+ ### 对象指标
45
+
46
+ - **用途**:让系列显示知识网络里统一口径的指标,而不是页面自己数,例如“准时交付率”“月度缺陷数”。
47
+ - **在哪里配**:系列里的“数值来源”。
48
+ - **接什么**:知识网络里已发布的对象指标。
49
+ - **输入**:指标本身;横轴为类别时的类别属性与最多显示类别数;页面的筛选。
50
+ - **输出**:每个周期或类别一个数,按指标定义的格式显示。
51
+ - **失败与超时**:当前环境不提供对象指标时显示“当前环境不提供对象指标”;取数有问题时显示原因,悬停可看明细。
52
+ - **结果怎样显示**:一张图的系列要么都用对象指标,要么都不用;横轴为时间时周期粒度跟随指标,各指标须相同,且不能配统计粒度;不能按属性拆分;横轴为类别时由平台取前若干个类别。标题处可看指标说明。
53
+
54
+ ### 逻辑属性与拆分
55
+
56
+ - **用途**:让类别、拆分用业务状态,例如按“风险等级”分色堆叠,按“交付状态”画饼。
57
+ - **在哪里配**:类别属性、按属性拆分系列。
58
+ - **接什么**:知识网络里的属性或逻辑属性,或页面里的“判断状态”计算列;判断写在属性里,图表只按取值分组。
59
+ - **输入**:每个对象的属性值。
60
+ - **输出**:每个取值一部分,颜色取该取值的颜色;没有指定颜色的按主题色板依次着色。
61
+ - **失败与超时**:数据源读取失败时显示“读取失败”。
62
+ - **结果怎样显示**:柱堆叠、线分色,或饼的各块。
63
+
64
+ ### 点击后的动作
65
+
66
+ - **用途**:点一个点(周期或类别)时问 Agent。
67
+ - **在哪里配**:链接页的“点击后的动作”,最多 8 项,每项最多 5 个动作;触发点为“点”。图表只能问 Agent,不能执行行动或推演。
68
+ - **接什么**:问 Agent。
69
+ - **输入**:问题可用 \`{count}\`、\`{category}\`、\`{period}\`、\`{value}\`、\`{series}\`;随问题带上这一点对应的对象(用对象指标时没有)。
70
+ - **输出**:问题发给分析 Agent。
71
+ - **失败与超时**:与其他组件的提问相同。
72
+ - **结果怎样显示**:点击后在 Agent 对话里出现问题。
73
+
74
+ ## 交互与联动
75
+
76
+ - **写入**:“点击写入”一个筛选。横轴为时间时写入该周期的日期区间,按第一个系列的日期属性生效;横轴为类别时写入该类别的取值。再点已选中的周期或类别,清除筛选。
77
+ - **读取**:跟随页面的共享筛选和基准日期;默认不跟随自己写入的筛选,所以点选后其他周期、类别仍在,只是变淡。
78
+ - **数据范围**:用对象指标的图表,横轴为类别且没有点击写入、也没有点击后的动作时,点一个类别会列出参与的对象;指标不提供参与对象时,标题处提示“此指标不提供参与对象”。
79
+ - **约束**:横轴为时间只能写日期区间筛选,横轴为类别只能写取值筛选,写错类型配置会报错。
80
+
81
+ ## 场景配方
82
+
83
+ ### 工单月度趋势:新增与完成
84
+
85
+ | 角色 | 对应 |
86
+ | --- | --- |
87
+ | 被统计对象 | 生产工单 |
88
+ | 系列 1 | 新增:日期属性为“创建日期”,计数,柱 |
89
+ | 系列 2 | 完工:日期属性为“完工日期”,计数,线 |
90
+ | 拆分属性 | (可选)“产线” |
91
+
92
+ **知识网络中要有:** 工单上的创建日期、完工日期;可选的“产线”。
93
+
94
+ **扩展点挂什么:** 点击写入一个日期区间筛选,对象表读同一筛选,只看该月的工单;点击后的动作加一项“问 Agent:{period} 新增 {value} 单,原因是什么?”。
95
+
96
+ **检查项:** 横轴最后一个月是基准日期所在月;点某一月,其他月变淡,对象表只剩该月工单;再点同一月,恢复。
97
+
98
+ ### 缺陷类型分布:哪几类最多
99
+
100
+ | 角色 | 对应 |
101
+ | --- | --- |
102
+ | 被统计对象 | 质检缺陷记录 |
103
+ | 类别属性 | “缺陷类型”(逻辑属性或属性) |
104
+ | 系列 | 缺陷数,计数,饼 |
105
+
106
+ **知识网络中要有:** 缺陷记录对象类,缺陷类型取值规范。
107
+
108
+ **扩展点挂什么:** 横轴选“类别”,类别属性选“缺陷类型”,最多显示类别数按需要设置;点击写入一个取值筛选。
109
+
110
+ **检查项:** 饼的各块相加等于总数(受“最多显示类别数”限制);点一块,别的组件只看该类型。
111
+
112
+ ## 给 AI 的指引
113
+
114
+ 1. 先问用户:看什么(横轴是时间还是类别);统计什么(数量、金额);是否分几个系列或拆分;要不要对象指标;点一下要联动什么。
115
+ 2. 横轴为时间时,每个系列都要有日期属性,“显示周期数”必填(3 到 36);用对象指标时不写统计粒度。
116
+ 3. 饼图只能用于横轴为类别、且只有一个系列的图。
117
+ 4. 横轴为时间时,“点击写入”的变量必须是日期区间筛选;横轴为类别必须是取值筛选。变量类型对不上,配置会报错。
118
+ 5. 业务状态用知识网络的逻辑属性,不要在图表里拼条件。
119
+ 6. 常见错误:
120
+ - 一张图里一部分系列用对象指标、一部分不用:不允许。
121
+ - 用对象指标的图里配了按属性拆分系列:不允许。
122
+ - 横向条形只在横轴为类别且全是柱时才可用。
123
+ - 多个系列用不同日期属性,却期望点击写入对每个系列都生效:筛选只按第一个系列的日期属性写入。
124
+ - 系列超过 4 个,或周期数、类别数超出范围。
125
+
126
+ ## 限制
127
+
128
+ - 系列 1 到 4 个;时间横轴显示 3 到 36 个周期;类别横轴显示 2 到 50 个类别(默认 8)。
129
+ - 拆分最多 6 部分(判断状态列按其自身取值)。
130
+ - 页面内统计时,对象类数据源最多读入 5000 个对象,Cypher 数据源最多 10000 行(查询没写 LIMIT 时 1000 行),超过时上方提示,统计只覆盖已读取部分。
131
+ - 点击后的动作最多 8 项,每项最多 5 个动作。
132
+ `;
133
+ export {
134
+ n as default
135
+ };
@@ -0,0 +1,135 @@
1
+ const e = `# Chart (trendChart)
2
+
3
+ A bar, line or pie chart: see how counts or amounts change over time, or compare sizes across categories; clicking a period or a category makes the whole page look at it only. Use it to answer "how has it gone over the last months" and "which few classes are biggest".
4
+
5
+ ## When to use it and when not
6
+
7
+ - Use it when:
8
+ - The x axis is time: per day, week, month or quarter, the count or amount of one object type in each period, with several series side by side. For example: new orders per month, finished work orders per week.
9
+ - The x axis is a category: compare by the values of a property, drawn as bars, lines or a pie. For example: the count per defect type, the output per line.
10
+ - A series should show an "object metric" defined in the knowledge network, which the platform computes over all objects.
11
+ - Do not use it:
12
+ - To see exact figures and shares per group: use the pivot table (\`pivotTable\`).
13
+ - To color provinces or countries on a map: use the map (\`regionMap\`).
14
+ - To show only a few current totals: use the metric cards (\`metricCards\`).
15
+ - To draw plan bars between start and end dates: use the Gantt chart (\`ganttChart\`).
16
+
17
+ ## Ontology contract
18
+
19
+ | Role | Object type | Required properties | Relations | Required |
20
+ | --- | --- | --- | --- | --- |
21
+ | Counted object | The type of object to count, as the page's data source | The key property; on a time axis, one date property per series; on a category axis, one category property; for sum, average, greatest or least, one number property | — | Yes (with object metrics the data source still fixes the object type and the filters) |
22
+ | Split property | The same object type | A property with a limited set of values, or a status computed column | — | No |
23
+ | Object metric | An object metric already published in the knowledge network | The metric's definition and granularity are in the knowledge network | The metric hangs on an object type | No |
24
+
25
+ With counting on the page, objects are read into the browser whole and counted there; with object metrics the platform computes the numbers, and the definition in the knowledge network decides.
26
+
27
+ ## Built-in checks
28
+
29
+ Independent of industry, the component does these itself:
30
+
31
+ | Check | Rule |
32
+ | --- | --- |
33
+ | Time periods | On a time axis it shows several periods ending with the one the page's base date falls in (months by default); dates after the base date are not counted |
34
+ | Empty periods | A period with no objects counts as 0 |
35
+ | Category values | On a category axis it takes the categories with the largest value of the first series (8 by default), blanks not counted; it can also order by the category itself, such as years |
36
+ | Splitting | Splits each series by the split property: the most frequent values, the rest merged into one "other" part, 6 parts at most; when the split property is a status column, its own value order and colors are used |
37
+ | Bar direction | On a category axis with all bars, category names longer than about four Chinese characters turn the chart into horizontal bars, long names are cut, and hovering shows the whole name |
38
+ | Selection highlight | The selected period or category stays normal; the others fade |
39
+
40
+ What counts as a "defect" or as "finished" is decided by the data source and the metric; the chart only counts by values.
41
+
42
+ ## Extension points
43
+
44
+ ### Object metrics
45
+
46
+ - **What for**: let a series show a metric with one definition in the knowledge network instead of counting on the page, such as "on-time delivery rate" or "defects per month".
47
+ - **Where**: "Value source" in a series.
48
+ - **What it connects to**: object metrics already published in the knowledge network.
49
+ - **Input**: the metric itself; on a category axis the category property and the most categories to show; the page's filters.
50
+ - **Output**: one number per period or category, shown in the format the metric defines.
51
+ - **Failure and timeout**: when the environment does not offer object metrics it says so; when fetching fails it shows the reason, with details on hover.
52
+ - **How results are shown**: all series of a chart either use object metrics or none do; on a time axis the period granularity follows the metrics, which must all be the same, and no granularity is set; it cannot be split by a property; on a category axis the platform takes the first few categories. The title carries the metric's notes.
53
+
54
+ ### Logical properties and splitting
55
+
56
+ - **What for**: use business states for categories and splits, such as stacking colors by "risk level" or a pie by "delivery status".
57
+ - **Where**: the category property and "Split series by property".
58
+ - **What it connects to**: properties or logical properties of the knowledge network, or a status computed column on the page; the judgement is written in the property and the chart only groups by value.
59
+ - **Input**: each object's property values.
60
+ - **Output**: one part per value, in that value's color; values with no set color take the theme palette in turn.
61
+ - **Failure and timeout**: when the data source fails to read the chart shows "read failed".
62
+ - **How results are shown**: stacked bars, colored lines, or the slices of a pie.
63
+
64
+ ### Actions on click
65
+
66
+ - **What for**: ask the Agent when a point (a period or a category) is clicked.
67
+ - **Where**: "Actions on click" on the link tab, up to 8 items with up to 5 steps each; the trigger is the point. The chart can only ask the Agent; it cannot run actions or simulations.
68
+ - **What it connects to**: asking the Agent.
69
+ - **Input**: a question may use \`{count}\`, \`{category}\`, \`{period}\`, \`{value}\` and \`{series}\`; the objects behind the point go with the question (none for object metrics).
70
+ - **Output**: the question goes to the analysis Agent.
71
+ - **Failure and timeout**: same as asking from other components.
72
+ - **How results are shown**: the question appears in the Agent chat after the click.
73
+
74
+ ## Interaction and links
75
+
76
+ - **Writes**: "Click writes" sets a filter. On a time axis it writes the period's date range, applied through the first series' date property; on a category axis it writes the category's value. Clicking the selected period or category again clears the filter.
77
+ - **Reads**: follows the page's shared filters and base date; by default it does not follow the filter it writes itself, so after a click the other periods and categories stay, only faded.
78
+ - **Listing objects**: for a chart with object metrics on a category axis, with no "Click writes" and no action on click, clicking a category lists the objects that took part; when the metric does not offer them, the title says so.
79
+ - **Constraints**: a time axis can only write a date range filter, a category axis only a value filter; the wrong kind is rejected.
80
+
81
+ ## Recipes
82
+
83
+ ### Monthly work orders: new and finished
84
+
85
+ | Role | Maps to |
86
+ | --- | --- |
87
+ | Counted object | Production work order |
88
+ | Series 1 | New: date property "created date", count, bar |
89
+ | Series 2 | Finished: date property "finish date", count, line |
90
+ | Split property | (optional) "line" |
91
+
92
+ **The knowledge network needs:** created date and finish date on work orders; optionally "line".
93
+
94
+ **What goes on the extension points:** "Click writes" a date range filter, and the object table reads the same filter to show only that month's work orders; add one action on click: ask the Agent "{period} had {value} new orders; why?".
95
+
96
+ **To check:** the last month on the axis is the one the base date falls in; click a month, the others fade and the object table keeps only that month's work orders; click it again to restore.
97
+
98
+ ### Defect types: which few are biggest
99
+
100
+ | Role | Maps to |
101
+ | --- | --- |
102
+ | Counted object | Inspection defect record |
103
+ | Category property | "defect type" (logical property or property) |
104
+ | Series | Defect count, count, pie |
105
+
106
+ **The knowledge network needs:** the defect record object type, with a controlled set of defect type values.
107
+
108
+ **What goes on the extension points:** x axis "category", category property "defect type", most categories as needed; "Click writes" a value filter.
109
+
110
+ **To check:** the slices add up to the total (limited by "Most categories shown"); click a slice and other components look at that type only.
111
+
112
+ ## Guidance for AI
113
+
114
+ 1. Ask the user first: what to look at (time or category on the x axis); what to count (quantity, amount); whether to have several series or a split; whether to use an object metric; what a click should drive.
115
+ 2. On a time axis every series needs a date property and "Periods shown" is required (3 to 36); with object metrics do not set a granularity.
116
+ 3. A pie only works on a category axis with a single series.
117
+ 4. On a time axis, "Click writes" must be a date range filter; on a category axis it must be a value filter. A variable of the wrong kind is rejected.
118
+ 5. Put business states in logical properties of the knowledge network; do not assemble conditions in the chart.
119
+ 6. Common mistakes:
120
+ - Some series of a chart using object metrics and some not: not allowed.
121
+ - Splitting by a property in a chart that uses object metrics: not allowed.
122
+ - Horizontal bars work only on a category axis with all series drawn as bars.
123
+ - Several series with different date properties while expecting "Click writes" to apply to each: the filter is written by the first series' date property only.
124
+ - More than 4 series, or the number of periods or categories out of range.
125
+
126
+ ## Limits
127
+
128
+ - 1 to 4 series; a time axis shows 3 to 36 periods; a category axis shows 2 to 50 categories (default 8).
129
+ - At most 6 parts in a split (a status column uses its own values).
130
+ - With counting on the page, at most 5000 objects are read per object type data source, and at most 10,000 rows per Cypher data source (1,000 when its query sets no LIMIT); beyond that a note shows above and the figures cover only what was read.
131
+ - Actions on click: up to 8 items with up to 5 steps each.
132
+ `;
133
+ export {
134
+ e as default
135
+ };