Files
cc-1c-skills/tests/skills/cases/form-compile/chart-settings.json
T
Nick Shirokov 1333e09ff8 feat(form-decompile,form-compile): Chart design-time Settings из ring-3 (Фаза 2 кластера Chart-Settings)
Реквизит-диаграмма несёт <Settings xsi:type="d4p1:Chart"> — встроенный конфиг
(~110-130 версионно-вариативных полей: тип/серии/легенда/заголовок/шкалы/цвета/
оси, глубокая вложенность с повторяющимися именами). Корпус 8.3.24: 5 форм.

Подход (с пользователем): ГЕНЕРИК-движок. Ключ chart на реквизите; рекурсивный
захват/эмит поддерева d4p1, ключи = локальные имена тегов, порядок ключей =
порядок эмиссии → раундтрип ЛЮБОЙ версии/набора полей бит-в-бит (платформа
добавляет поля, не переставляет). Структуры распознаются по форме узла
(line {width,gap,style} / border {width,style} / font {kind} / ML / области
{left,right,top,bottom} / серии-массивы); малые name-set'ы: ML-поля, серии,
attrs-узлы (gaugeQualityBands). Расширяемость: любое из ~127 свойств — по
каноничному имени.

Авторинг с нуля: декомпиль рабочей диаграммы как шаблон + правка ядра
(chartType/серии/легенда/цвета). Default-fill через merge НЕ делаем — конфликт
с байт-точностью неполных форм (см. docs/form-dsl-spec.md).

Результат: 4 из 5 форм корпуса — байт-в-байт (включая версионно-вариативные).
5-я (точки/оси realPointData/realDataItems с типизир. значениями xsi:type,
xsi:nil, ML с префиксом d4p1:) → честный fail-ring3 (редкий вариант, не
поддержан генериком). Снят fail-ring3 для d4p1:Chart (GanttChart — Фаза 3).
Заодно фикс: d5p1:Dendrogram отсутствовал в specialTypeNs (ps1+py).

Декомпилятор ps1-only (генерик-рекурсия); компилятор зеркало py (ps1==py
байт-в-байт). Кейс chart-settings (полная диаграмма из эталона
ПроверкаКонтрагента) сертифицирован загрузкой в 1С. Регресс 42/42.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-10 16:01:15 +03:00

357 lines
11 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"name": "Форма с design-time диаграммой (d4p1:Chart Settings)",
"preRun": [
{
"script": "meta-compile/scripts/meta-compile",
"input": {
"type": "DataProcessor",
"name": "Диаграмма"
},
"args": {
"-JsonPath": "{inputFile}",
"-OutputDir": "{workDir}"
}
},
{
"script": "form-add/scripts/form-add",
"args": {
"-ObjectPath": "{workDir}/DataProcessors/Диаграмма.xml",
"-FormName": "Форма"
}
}
],
"params": {
"outputPath": "DataProcessors/Диаграмма/Forms/Форма/Ext/Form.xml"
},
"validatePath": "DataProcessors/Диаграмма/Forms/Форма/Ext/Form.xml",
"input": {
"title": "Диаграмма",
"elements": [
{
"chart": "Диаграмма",
"path": "Диаграмма",
"titleLocation": "none"
}
],
"attributes": [
{
"name": "Объект",
"type": "DataProcessorObject.Диаграмма",
"main": true
},
{
"name": "Диаграмма",
"type": "d5p1:Chart",
"chart": {
"seriesCurId": "7",
"pointsCurId": "0",
"isSeriesDesign": true,
"realSeriesCount": "4",
"realSeriesData": [
{
"id": "2",
"color": "auto",
"line": {
"width": 2,
"gap": false,
"style": "Solid"
},
"marker": "Auto",
"text": "Серия 1",
"strIsChanged": false,
"isExpand": false,
"isIndicator": false,
"colorPriority": false
},
{
"id": "3",
"color": "auto",
"line": {
"width": 2,
"gap": false,
"style": "Solid"
},
"marker": "Auto",
"text": "Серия 2",
"strIsChanged": false,
"isExpand": false,
"isIndicator": false,
"colorPriority": false
},
{
"id": "4",
"color": "auto",
"line": {
"width": 2,
"gap": false,
"style": "Solid"
},
"marker": "Auto",
"text": "Серия 3",
"strIsChanged": false,
"isExpand": false,
"isIndicator": false,
"colorPriority": false
},
{
"id": "6",
"color": "auto",
"line": {
"width": 2,
"gap": false,
"style": "Solid"
},
"marker": "Auto",
"text": "Серия 4",
"strIsChanged": false,
"isExpand": false,
"isIndicator": false,
"colorPriority": false
}
],
"realExSeriesData": [
{
"id": "1",
"color": "auto",
"line": {
"width": 2,
"gap": false,
"style": "Solid"
},
"marker": "Auto",
"text": "Сводная",
"strIsChanged": false,
"isExpand": false,
"isIndicator": false,
"colorPriority": false
}
],
"isPointsDesign": true,
"realPointCount": "0",
"curSeries": "-1",
"curPoint": "0",
"chartType": "Line",
"circleLabelType": "None",
"labelsDelimiter": ", ",
"labelsLocation": "Edge",
"lbFormat": "",
"lbpFormat": "",
"labelsColor": "style:FormTextColor",
"labelsFont": {
"kind": "AutoFont"
},
"transparentLabelsBkg": true,
"labelsBkgColor": "auto",
"labelsBorder": {
"width": 1,
"style": "WithoutBorder"
},
"labelsBorderColor": "auto",
"circleExpandMode": "None",
"chart3Dcrd": "SouthWest",
"title": "",
"isShowTitle": false,
"isShowLegend": true,
"ttlBorder": {
"width": 0,
"style": "WithoutBorder"
},
"ttlBorderColor": "style:BorderColor",
"lgBorder": {
"width": 0,
"style": "WithoutBorder"
},
"lgBorderColor": "style:BorderColor",
"chBorder": {
"width": 0,
"style": "WithoutBorder"
},
"chBorderColor": "style:BorderColor",
"transparent": false,
"bkgColor": "style:FieldBackColor",
"isTrnspTtl": false,
"ttlColor": "style:FieldBackColor",
"isTrnspLeg": false,
"legColor": "style:FieldBackColor",
"isTrnspCh": false,
"chColor": "style:FieldBackColor",
"ttlTxtColor": "style:FormTextColor",
"legTxtColor": "style:FormTextColor",
"chTxtColor": "style:FormTextColor",
"ttlFont": {
"kind": "AutoFont"
},
"legFont": {
"kind": "AutoFont"
},
"chFont": {
"kind": "AutoFont"
},
"isShowScale": true,
"isShowScaleVL": true,
"isShowSeriesScale": true,
"isShowPointsScale": true,
"isShowValuesScale": true,
"vsFormat": "ЧС=6; ЧГ=3,0",
"xLabelsOrientation": "Auto",
"scaleLine": {
"width": 1,
"gap": false,
"style": "Dotted"
},
"scaleColor": "auto",
"isAutoSeriesName": true,
"isAutoPointName": true,
"maxMode": "NotDefined",
"maxSeries": "4",
"maxSeriesPrc": "30",
"spaceMode": "Half",
"baseVal": "0",
"isOutline": false,
"realPiePoint": "0",
"realStockSeries": "0",
"isLight": true,
"isGradient": false,
"isTransposition": false,
"hideBaseVal": false,
"dataTable": false,
"dtVerLines": true,
"dtHorLines": true,
"dtHAlign": "Right",
"dtFormat": "",
"dtKeys": true,
"paletteKind": "Auto",
"animation": "Auto",
"rebuildTime": "2099248",
"isTransposed": false,
"autoTransposition": false,
"legendScrollEnable": false,
"surfaceColor": "#A90000",
"radarScaleType": "Circle",
"gaugeValuesPresentation": "Needle",
"gaugeQualityBands": {
"useTextStr": false,
"useTooltipStr": false
},
"beginGaugeAngle": "0",
"endGaugeAngle": "180",
"gaugeThickness": "5",
"gaugeLabelsLocation": "InsideScale",
"gaugeLabelsArcDirection": false,
"gaugeBushThickness": "4",
"gaugeBushColor": "#A9A9A9",
"autoMaxValue": true,
"userMaxValue": "0",
"autoMinValue": true,
"userMinValue": "0",
"elementsIsInit": false,
"titleIsInit": true,
"legendIsInit": true,
"chartIsInit": true,
"elementsChart": {
"left": "0",
"right": "0.17",
"top": "0",
"bottom": "0"
},
"elementsLegend": {
"left": "0.14968152866242038",
"right": "0.06210191082802548",
"top": "0.9615384615384616",
"bottom": "0"
},
"elementsTitle": {
"left": "0.83",
"right": "0",
"top": "0",
"bottom": "0.92"
},
"borderColor": "style:BorderColor",
"border": {
"width": 1,
"style": "WithoutBorder"
},
"dataSourceDescription": "",
"isDataSourceMode": false,
"isRandomizedNewValues": true,
"splineMode": "SmoothCurve",
"splineStrain": "95",
"translucencePercent": "0",
"funnelNeckHeightPercent": "10",
"funnelNeckWidthPercent": "10",
"funnelGapSumPercent": "3",
"multiStageLinkLine": {
"width": 1,
"gap": false,
"style": "Solid"
},
"multiStageLinkColor": "#000000",
"valuesAxis": "",
"pointsAxis": "",
"pointsScale": {
"titleArea": {
"font": {
"kind": "AutoFont"
},
"textColor": "auto",
"backColor": "auto",
"border": {
"width": 1,
"style": "WithoutBorder"
},
"borderColor": "auto"
},
"gridLinesShowMode": "Show",
"gridLine": {
"width": 1,
"gap": false,
"style": "Dotted"
},
"labelColor": "#B4B4B4"
},
"valuesScale": {
"showTitle": "DontShow",
"titleArea": {
"font": {
"kind": "AutoFont"
},
"textColor": "auto",
"backColor": "auto",
"border": {
"width": 1,
"style": "WithoutBorder"
},
"borderColor": "auto"
},
"labelFormat": "ЧС=6; ЧГ=3,0"
},
"seriesScale": {
"titleArea": {
"font": {
"kind": "AutoFont"
},
"textColor": "auto",
"backColor": "auto",
"border": {
"width": 1,
"style": "WithoutBorder"
},
"borderColor": "auto"
},
"gridLine": {
"width": 1,
"gap": false,
"style": "Dotted"
},
"showInChart": "DontShow"
},
"legendPlacement": "Bottom",
"titleAreaPlacement": "None",
"valuesToolTipShowMode": "ShowOnHover",
"pointsDropLinesShowMode": "DontShow",
"valuesDropLinesShowMode": "DontShow"
}
}
]
}
}