P26:标签按"标签列"1:1 落到记录、窗口、元素、文本四处(规范 §35)
- XChartColumnMath 补标签半边(LabelCount / LabelSlotOf / DefinitionOfLabelSlot / SizedLabels),
记录的标签长度只由这一处定;TryAddRecord 在 labels 长度≠标签列数时整条拒收
- 导入按标签字段个数校验并点名行号;记录行少到连时间戳都没有时点名拒绝(不再抛异常)
- 数据窗口:一个显示序两个读者(标签列在前),格子身份 CellRef{IsLabel,Slot},
标签格走 TrySetLabel 的字符串分支,「+标签」走 SetDimensions 这唯一定长路径
- 新标签元素 ChartToolLabels + XChartLabelConfig:13 旋钮全自动置脏、位置/折法同散点、
文本走池且多余槽位必须擦、锚点与对齐出自同一张表(anchorMin/Max 不写)
- 面板把"要几个标签列、表里有几个"与数值维、记录数一起印(§25.1 第三半 RequiredLabelColumns)
- 探针先红的两个真缺陷:SizedLabels(null,n) 补 null 不是空串;锚点表漏 MiddleRight 与 Center 重合
- 雷达 AddSeries 带系列名,两个 SetDimensions 重载都声明 series 标签列(否则新门口整条拒收)
- 判据:探针 492/0、label_gate 15 claim/15 臂全红、dirty_gate 149/149、slot_reset PASS、
编译门三臂+3 对照绿(source present 点名四个新文件)、p4_control 78 支各红在点名断言
(同一棵树指纹 478727e6748c67cddda40995874b20968e9eae3706f2a21c24726d3412059747)
This commit is contained in:
@@ -229,9 +229,15 @@ namespace XericUI.XChart.Editor
|
||||
// 位置是唯一权威——再多两个手填的格子,就会出现"位置与数字各说一套",
|
||||
// 而"上移之后绘制顺序到底变没变"这个问题就没人回答得了。
|
||||
|
||||
// 这个元素要几个数值维、几条记录,表里现在各有多少——**三个数一起印**(§25.1)。
|
||||
// 这个元素要几个数值维、几条记录、几个标签列,表里现在各有多少——**三个数一起印**(§25.1)。
|
||||
// "加了工具但什么都没显示"最常见的原因就是形状不够,而画面上两者长得一模一样。
|
||||
if (config.RequiredNumericDimensions > 0)
|
||||
// 标签列也归进来:标签元素读的是"某一列在每一行上的那一格",表里没这一列时它一条都不画,
|
||||
// 而这一支在画面上和"没数据"同形——只印数值维和记录数就会漏掉这一半。
|
||||
int needDims = config.RequiredNumericDimensions;
|
||||
int needRecords = config.RequiredRecordCount;
|
||||
int needLabels = config.RequiredLabelColumns;
|
||||
|
||||
if (needDims > 0 || needRecords > 0 || needLabels > 0)
|
||||
{
|
||||
int haveDims = chart != null && chart.DataModel != null
|
||||
? chart.DataModel.NumericDimensionCount
|
||||
@@ -239,18 +245,27 @@ namespace XericUI.XChart.Editor
|
||||
int haveRecords = chart != null && chart.DataModel != null
|
||||
? chart.DataModel.RecordCount
|
||||
: 0;
|
||||
int needDims = config.RequiredNumericDimensions;
|
||||
int needRecords = config.RequiredRecordCount;
|
||||
int haveLabels = chart != null && chart.DataModel != null
|
||||
? chart.DataModel.LabelDimensionCount
|
||||
: 0;
|
||||
|
||||
string dimsPart = "需要 " + needDims + " 个数值维,表现在有 " + haveDims + " 个";
|
||||
string recordsPart = needRecords > 0
|
||||
? ";需要 " + needRecords + " 条记录,表现在有 " + haveRecords + " 条"
|
||||
: string.Empty;
|
||||
bool shortOfShape = haveDims < needDims || haveRecords < needRecords;
|
||||
block.Body.Add(MakeReadonly(dimsPart + recordsPart
|
||||
string labelsPart = needLabels > 0
|
||||
? ";需要 " + needLabels + " 个标签列,表现在有 " + haveLabels + " 个"
|
||||
: string.Empty;
|
||||
|
||||
bool shortOfShape = haveDims < needDims
|
||||
|| haveRecords < needRecords
|
||||
|| haveLabels < needLabels;
|
||||
|
||||
block.Body.Add(MakeReadonly(dimsPart + recordsPart + labelsPart
|
||||
+ (shortOfShape
|
||||
? " ⇒ 画不出来(报表里 dims=" + haveDims + "/" + needDims
|
||||
+ " records=" + haveRecords + ")"
|
||||
+ " records=" + haveRecords
|
||||
+ " labels=" + haveLabels + "/" + needLabels + ")"
|
||||
: string.Empty)));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user