Updated Statistics
This commit is contained in:
parent
af43a19875
commit
3eb9dd231c
@ -4,7 +4,7 @@
|
||||
"system": {
|
||||
"onStartup": {
|
||||
"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",
|
||||
"type": "script"
|
||||
@ -3132,6 +3132,17 @@
|
||||
"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": {
|
||||
"name": "Jam Area"
|
||||
},
|
||||
@ -7496,7 +7507,7 @@
|
||||
"props.currentTabIndex": {
|
||||
"onChange": {
|
||||
"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": {
|
||||
@ -9373,7 +9384,7 @@
|
||||
},
|
||||
"props": {
|
||||
"dismissOnSelect": false,
|
||||
"formattedValue": "Oct 19, 2025 7:02 PM",
|
||||
"formattedValue": "Oct 19, 2025 7:44 PM",
|
||||
"formattedValues": {
|
||||
"date": "Mar 26, 2021",
|
||||
"datetime": "Mar 26, 2021 12:00 AM",
|
||||
@ -9391,9 +9402,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1760914943671
|
||||
1760917456306
|
||||
],
|
||||
"$ts": 1760886143000
|
||||
"$ts": 1760888655000
|
||||
}
|
||||
},
|
||||
"type": "ia.input.date-time-input"
|
||||
@ -9544,7 +9555,7 @@
|
||||
},
|
||||
"props": {
|
||||
"dismissOnSelect": false,
|
||||
"formattedValue": "Oct 20, 2025 3:02 AM",
|
||||
"formattedValue": "Oct 20, 2025 3:44 AM",
|
||||
"formattedValues": {
|
||||
"date": "Mar 29, 2021",
|
||||
"datetime": "Mar 29, 2021 1:37 PM",
|
||||
@ -9562,9 +9573,9 @@
|
||||
"$": [
|
||||
"ts",
|
||||
192,
|
||||
1760914943671
|
||||
1760917456964
|
||||
],
|
||||
"$ts": 1760914943000
|
||||
"$ts": 1760917456000
|
||||
}
|
||||
},
|
||||
"type": "ia.input.date-time-input"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user