Updated Statistics

This commit is contained in:
gigi.mamaladze 2025-10-20 03:44:37 +04:00
parent af43a19875
commit 3eb9dd231c

View File

@ -4,7 +4,7 @@
"system": { "system": {
"onStartup": { "onStartup": {
"config": { "config": {
"script": "\t# Resolve the dropdown once\n\tdropdown \u003d self.getChild(\"root\").getChild(\"Aggregation Mode\").getChild(\"Aggregation Mode DropDown\")\n\t\n\t# Base options\n\toptions \u003d [\n\t {\"value\": \"Count\", \"label\": \"Count\"},\n\t {\"value\": \"Percentage\", \"label\": \"Percentage\"}\n\t]\n\tcurrent_tab_index \u003d self.getChild(\"root\").getChild(\"Statistics\").props.currentTabIndex\n\t\n\t# Add \"Rate\" only when the value is truthy (e.g., 1)\n\tif (current_tab_index \u003d\u003d 1):\n\t options.append({\"value\": \"Rate\", \"label\": \"Rate\"})\n\t\n\t# Apply options\n\tdropdown.props.options \u003d options" "script": "\t# Resolve the dropdown once\n\tdropdown \u003d self.getChild(\"root\").getChild(\"Aggregation Mode\").getChild(\"Aggregation Mode DropDown\")\n\t\n\t# Base options\n\toptions \u003d [\n\t {\"value\": \"Count\", \"label\": \"Count\"},\n\t {\"value\": \"Percentage\", \"label\": \"Percentage\"}\n\t]\n\tcurrent_tab_index \u003d self.getChild(\"root\").getChild(\"Statistics\").props.currentTabIndex\n\t\n\t# Add \"Rate\" only when the value is truthy (e.g., 1)\n\tif (current_tab_index \u003d\u003d 1):\n\t options.append({\"value\": \"Rate\", \"label\": \"Rate\"})\n\t\n\t# Apply options\n\tdropdown.props.options \u003d options\n\t\n\tself.getChild(\"root\").getChild(\"Aggregation Mode\").getChild(\"Aggregation Mode DropDown\").props.value \u003d \"Count\""
}, },
"scope": "G", "scope": "G",
"type": "script" "type": "script"
@ -3132,6 +3132,17 @@
"type": "ia.chart.xy" "type": "ia.chart.xy"
} }
], ],
"events": {
"system": {
"onStartup": {
"config": {
"script": "\n\tself.parent.parent.getChild(\"Aggregation Mode\").getChild(\"Aggregation Mode DropDown\").props.value \u003d \"Count\""
},
"scope": "G",
"type": "script"
}
}
},
"meta": { "meta": {
"name": "Jam Area" "name": "Jam Area"
}, },
@ -7496,7 +7507,7 @@
"props.currentTabIndex": { "props.currentTabIndex": {
"onChange": { "onChange": {
"enabled": null, "enabled": null,
"script": "\t# Resolve the dropdown once\n\tdropdown \u003d self.parent.getChild(\"Aggregation Mode\").getChild(\"Aggregation Mode DropDown\")\n\t\n\t# Base options\n\toptions \u003d [\n\t {\"value\": \"Count\", \"label\": \"Count\"},\n\t {\"value\": \"Percentage\", \"label\": \"Percentage\"}\n\t]\n\t\n\t# Add \"Rate\" only when the value is truthy (e.g., 1)\n\tif currentValue is not None and getattr(currentValue, \"value\", None):\n\t options.append({\"value\": \"Rate\", \"label\": \"Rate\"})\n\t\n\t# Apply options\n\tdropdown.props.options \u003d options" "script": "\t# Resolve the dropdown once\n\tdropdown \u003d self.parent.getChild(\"Aggregation Mode\").getChild(\"Aggregation Mode DropDown\")\n\t\n\t# Define options\n\toptions_rate \u003d [\n\t {\"value\": \"Count\", \"label\": \"Count\"},\n\t {\"value\": \"Percentage\", \"label\": \"Percentage\"},\n\t {\"value\": \"Rate\", \"label\": \"Rate\"}\n\t]\n\toptions_no_rate \u003d [\n\t {\"value\": \"Count\", \"label\": \"Count\"},\n\t {\"value\": \"Percentage\", \"label\": \"Percentage\"}\n\t]\n\t\n\t# Read current value safely (accepts 1/True for \"Rate\" enabled)\n\tval \u003d getattr(currentValue, \"value\", None)\n\tif (val \u003d\u003d 0):\n\t\tdropdown.props.options \u003d options_no_rate\n\t\tdropdown.props.value \u003d \"Count\"\n\telif (val \u003d\u003d 1):\n\t\tdropdown.props.options \u003d options_rate\n\n\n\t\t"
} }
}, },
"props.tabs": { "props.tabs": {
@ -9373,7 +9384,7 @@
}, },
"props": { "props": {
"dismissOnSelect": false, "dismissOnSelect": false,
"formattedValue": "Oct 19, 2025 7:02 PM", "formattedValue": "Oct 19, 2025 7:44 PM",
"formattedValues": { "formattedValues": {
"date": "Mar 26, 2021", "date": "Mar 26, 2021",
"datetime": "Mar 26, 2021 12:00 AM", "datetime": "Mar 26, 2021 12:00 AM",
@ -9391,9 +9402,9 @@
"$": [ "$": [
"ts", "ts",
192, 192,
1760914943671 1760917456306
], ],
"$ts": 1760886143000 "$ts": 1760888655000
} }
}, },
"type": "ia.input.date-time-input" "type": "ia.input.date-time-input"
@ -9544,7 +9555,7 @@
}, },
"props": { "props": {
"dismissOnSelect": false, "dismissOnSelect": false,
"formattedValue": "Oct 20, 2025 3:02 AM", "formattedValue": "Oct 20, 2025 3:44 AM",
"formattedValues": { "formattedValues": {
"date": "Mar 29, 2021", "date": "Mar 29, 2021",
"datetime": "Mar 29, 2021 1:37 PM", "datetime": "Mar 29, 2021 1:37 PM",
@ -9562,9 +9573,9 @@
"$": [ "$": [
"ts", "ts",
192, 192,
1760914943671 1760917456964
], ],
"$ts": 1760914943000 "$ts": 1760917456000
} }
}, },
"type": "ia.input.date-time-input" "type": "ia.input.date-time-input"