{"uuid":"2a7d6aa8-5e94-11f1-afe7-2bdee3bcf553","page":{"id":515334880,"data":{"appState":"[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"appMaxWidth\",\"1200px\",\"appStyles\",\"\",\"appTesting\",null,\"appThemeId\",null,\"appThemeModeId\",null,\"appThemeName\",null,\"createdAt\",null,\"customComponentCollections\",[],\"customDocumentTitle\",\"\",\"customDocumentTitleEnabled\",false,\"customShortcuts\",[],\"experimentalFeatures\",[\"^ \",\"disableMultiplayerEditing\",false,\"multiplayerEditingEnabled\",false,\"sourceControlTemplateDehydration\",false],\"folders\",[\"~#iL\",[]],\"formAppSettings\",[\"^ \",\"customRedirectUrl\",\"\"],\"inAppRetoolPillAppearance\",\"NO_OVERRIDE\",\"instrumentationEnabled\",false,\"internationalizationSettings\",[\"^ \",\"internationalizationEnabled\",false,\"internationalizationFiles\",[]],\"isFetching\",false,\"isFormApp\",false,\"isGlobalWidget\",false,\"isMobileApp\",false,\"loadingIndicatorsDisabled\",false,\"markdownLinkBehavior\",\"auto\",\"mobileAppSettings\",[\"^ \",\"displaySetting\",[\"^ \",\"landscapeMode\",false,\"tabletMode\",false],\"mobileOfflineModeBannerMode\",\"default\",\"mobileOfflineModeDelaySync\",false,\"mobileOfflineModeEnabled\",false],\"mobileOfflineAssets\",[],\"multiScreenMobileApp\",false,\"notificationsSettings\",[\"^ \",\"globalQueryShowFailureToast\",true,\"globalQueryShowSuccessToast\",false,\"globalQueryToastDuration\",4.5,\"globalToastPosition\",\"bottomRight\"],\"pageCodeFolders\",[\"^ \"],\"pageLoadValueOverrides\",[\"^A\",[]],\"persistUrlParams\",false,\"plugins\",[\"~#iOM\",[\"page1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"page1\",\"uuid\",\"d1cef152-6276-4f9c-b7ca-842461428ae3\",\"_comment\",null,\"type\",\"screen\",\"subtype\",\"Screen\",\"namespace\",null,\"resourceName\",null,\"resourceDisplayName\",null,\"template\",[\"~#iM\",[\"title\",\"Page 1\",\"browserTitle\",\"\",\"urlSlug\",\"\",\"_order\",0,\"_searchParams\",[\"^A\",[]],\"_hashParams\",[\"^A\",[]],\"_customShortcuts\",[\"^A\",[]]]],\"style\",null,\"position2\",null,\"mobilePosition2\",null,\"mobileAppPosition\",null,\"tabIndex\",null,\"container\",\"\",\"^7\",\"~m1780412588600\",\"updatedAt\",\"~m1780412588600\",\"folder\",\"\",\"presetName\",null,\"screen\",null,\"boxId\",null,\"subBoxIds\",null]]],\"$main\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"$main\",\"^16\",null,\"^17\",null,\"^18\",\"frame\",\"^19\",\"Frame\",\"^1:\",null,\"^1;\",null,\"^1<\",null,\"^1=\",[\"^1>\",[\"type\",\"main\",\"padding\",\"8px 12px\",\"enableFullBleed\",false,\"isHiddenOnDesktop\",false,\"isHiddenOnMobile\",false]],\"^1?\",[\"^1>\",[]],\"^1@\",null,\"^1A\",null,\"^1B\",null,\"^1C\",null,\"^1D\",\"\",\"^7\",\"~m1780412588600\",\"^1E\",\"~m1780412588600\",\"^1F\",\"\",\"^1G\",null,\"^1H\",\"page1\",\"^1I\",null,\"^1J\",null]]],\"plotlyJsonChart1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"plotlyJsonChart1\",\"^16\",\"0e823a5b-5e45-4749-8ef1-1859645e7573\",\"^17\",null,\"^18\",\"widget\",\"^19\",\"ChartWidget2\",\"^1:\",null,\"^1;\",null,\"^1<\",null,\"^1=\",[\"^1>\",[\"plotlyLayoutJson\",\"{\\n  \\\"barmode\\\": \\\"stack\\\",\\n  \\\"title\\\": \\\"Members by career level per year (stacked) + per-segment trendlines\\\",\\n  \\\"xaxis\\\": {\\n    \\\"title\\\": \\\"Year\\\"\\n  },\\n  \\\"yaxis\\\": {\\n    \\\"title\\\": \\\"Member count\\\"\\n  },\\n  \\\"margin\\\": {\\n    \\\"l\\\": 50,\\n    \\\"r\\\": 20,\\n    \\\"t\\\": 40,\\n    \\\"b\\\": 40\\n  },\\n  \\\"legend\\\": {\\n    \\\"orientation\\\": \\\"h\\\",\\n    \\\"itemclick\\\": false,\\n    \\\"itemdoubleclick\\\": false\\n  }\\n}\",\"plotlyDataJson\",\"{{ getChartData.value }}\",\"showPan\",false,\"_seriesHidden\",[\"^1>\",[]],\"yAxis2Title\",\"\",\"_seriesColorInputMode\",[\"^1>\",[]],\"_seriesHoverTemplate\",[\"^1>\",[]],\"sankeyLinkColorArrayDropDown\",[],\"yAxisGrid\",false,\"xAxisRangeMax\",null,\"sankeyLinkHoverTemplateMode\",\"manual\",\"_seriesTextTemplateMode\",[\"^1>\",[]],\"_seriesGroupBy\",[\"^1>\",[]],\"_seriesFilteredGroups\",[\"^1>\",[]],\"heatmapShowScale\",false,\"yAxisRangeMax\",null,\"_seriesName\",[\"^1>\",[]],\"labelDataMode\",\"manual\",\"sunburstDataBranchValues\",\"total\",\"_seriesIncreasingBorderColor\",[\"^1>\",[]],\"showToolbarAddOn\",false,\"_seriesIds\",[\"^A\",[]],\"_seriesGroupByStyles\",[\"^1>\",[]],\"barGap\",0,\"showToImage\",false,\"_seriesHiddenMode\",[\"^1>\",[]],\"_seriesHoverTemplateMode\",[\"^1>\",[]],\"sankeyLinkColorInputMode\",\"colorArray\",\"sankeyDatasource\",null,\"_seriesFilteredGroupsMode\",[\"^1>\",[]],\"_seriesYAxis\",[\"^1>\",[]],\"datasource\",null,\"gradientColorArray\",null,\"_seriesShowMarkers\",[\"^1>\",[]],\"yAxisRangeMode\",\"auto\",\"_seriesAggregationType\",[\"^1>\",[]],\"_seriesDecreasingBorderColor\",[\"^1>\",[]],\"xAxisRangeMode\",\"auto\",\"textTemplate\",\"\",\"_seriesMarkerBorderColor\",[\"^1>\",[]],\"colorArrayDropDown\",[],\"sankeyDatasourceMode\",\"manual\",\"_seriesMarkerSymbol\",[\"^1>\",[]],\"datasourceMode\",\"manual\",\"yAxis2RangeMode\",\"auto\",\"yAxis2ShowLine\",false,\"showSecondYAxis\",false,\"showBoxSelect\",false,\"colorInputMode\",\"colorArray\",\"barGroupGap\",0,\"hidden\",false,\"textTemplateMode\",\"manual\",\"_seriesMarkerBorderWidth\",[\"^1>\",[]],\"data\",null,\"xAxisShowLine\",false,\"_seriesGroupByDropdownType\",[\"^1>\",[]],\"yAxisShowLine\",false,\"clearOnEmptyData\",false,\"_seriesColorArray\",[\"^1>\",[]],\"showZoomSelect\",false,\"yAxis2TickFormat\",\"\",\"_seriesXData\",[\"^1>\",[]],\"xAxisTickFormat\",\"\",\"_seriesYData\",[\"^1>\",[]],\"_seriesWaterfallBase\",[\"^1>\",[]],\"yAxis2RangeMin\",null,\"_seriesZData\",[\"^1>\",[]],\"margin\",\"4px 8px\",\"_seriesIncreasingColor\",[\"^1>\",[]],\"xAxisRangeMin\",null,\"yAxisTickFormat\",\"\",\"sankeyLinkColorArray\",[],\"showInEditor\",false,\"yAxis2TickFormatMode\",\"d3String\",\"yAxisRangeMin\",null,\"_seriesXDataMode\",[\"^1>\",[]],\"sunburstDataLeafOpacity\",0,\"lineColor\",\"\",\"xAxisTickFormatMode\",\"d3String\",\"_seriesYDataMode\",[\"^1>\",[]],\"yAxisScale\",\"auto\",\"textTemplatePosition\",\"inside\",\"_seriesType\",[\"^1>\",[]],\"_seriesZDataMode\",[\"^1>\",[]],\"xAxisScale\",\"auto\",\"sankeyAllowDuplicateNodesAtDifferentSteps\",false,\"yAxis2ShowTickLabels\",false,\"_seriesWaterfallMeasures\",[\"^1>\",[]],\"yAxisTickFormatMode\",\"d3String\",\"_seriesMarkerSize\",[\"^1>\",[]],\"yAxis2Scale\",\"auto\",\"lineWidth\",0,\"xAxisShowTickLabels\",false,\"_seriesDecreasingColor\",[\"^1>\",[]],\"yAxisShowTickLabels\",false,\"_seriesMarkerColor\",[\"^1>\",[]],\"_seriesLineUnderFillMode\",[\"^1>\",[]],\"_seriesWaterfallMeasuresMode\",[\"^1>\",[]],\"yAxis2ZeroLine\",false,\"parentData\",[],\"showZoomIn\",false,\"xAxisZeroLine\",false,\"sankeyNodeHoverTemplate\",\"\",\"legendPosition\",\"right\",\"barMode\",\"stack\",\"yAxisZeroLine\",false,\"colorArray\",[],\"pieDataHole\",0,\"yAxis2Sort\",\"none\",\"hoverTemplate\",\"\",\"_seriesLineShape\",[\"^1>\",[]],\"xAxisSort\",\"none\",\"showResetView\",false,\"series\",null,\"yAxisTitleStandoff\",0,\"parentDataMode\",\"manual\",\"chartType\",\"plotlyJson\",\"_seriesConnectorLineColor\",[\"^1>\",[]],\"yAxisSort\",\"none\",\"xAxisTitleStandoff\",0,\"sankeyNodeHoverTemplateMode\",\"manual\",\"title\",\"Career levels\",\"yAxisLineWidth\",0,\"stackedBarTotalsDataLabelPosition\",\"bottom\",\"yAxis2\",null,\"xAxis\",null,\"_seriesHoverTemplateArray\",[\"^1>\",[]],\"hoverTemplateMode\",\"manual\",\"_seriesLineColor\",[\"^1>\",[]],\"events\",[\"^A\",[[\"^1>\",[\"method\",\"run\",\"params\",[\"^1>\",[\"src\",\"const data = arguments[0].self.plotlyDataJson;\\nconst trace = data[arguments[0].i];\\nif (!trace || !trace.name) return;\\nconst level = trace.name;\\nlet hidden = tmp_hiddenLevels.value || [];\\nhidden = hidden.includes(level) ? hidden.filter(l => l !== level) : [...hidden, level];\\n// Just update state — getChartData (a debounced Function) recomputes reactively.\\ntmp_hiddenLevels.setValue(hidden);\\n\"]],\"targetId\",null,\"pluginId\",\"\",\"waitType\",\"debounce\",\"event\",\"legendClick\",\"type\",\"script\",\"id\",\"a1b2c3d4\",\"waitMs\",\"0\"]]]],\"xAxisLineWidth\",0,\"showLassoSelect\",false,\"yAxis2TitleStandoff\",0,\"yAxis2LineWidth\",0,\"yAxis\",null,\"_seriesDatasource\",[\"^1>\",[]],\"valueData\",[],\"toolbar\",[\"^ \"],\"_seriesGradientColorArray\",[\"^1>\",[]],\"_seriesLineWidth\",[\"^1>\",[]],\"_seriesLineDash\",[\"^1>\",[]],\"_seriesColorArrayDropDown\",[\"^1>\",[]],\"sankeyLinkHoverTemplate\",\"\",\"_seriesTextTemplate\",[\"^1>\",[]],\"barOrientation\",\"v\",\"_seriesDataLabelPosition\",[\"^1>\",[]],\"rangeSlider\",false,\"_seriesDatasourceMode\",[\"^1>\",[]],\"labelData\",[],\"showZoomOut\",false,\"valueDataMode\",\"manual\",\"showAutoscale\",false,\"yAxisTitle\",\"\",\"yAxis2Grid\",false,\"selectedPoints\",\"[]\",\"xAxisTitle\",\"\",\"maintainSpaceWhenHidden\",false,\"yAxis2RangeMax\",null,\"sankeyLinkGradientColorArray\",null,\"xAxisGrid\",false]],\"^1?\",[\"^1>\",[]],\"^1@\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^18\",\"grid\",\"^1D\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"\",\"row\",0,\"col\",0,\"height\",32,\"width\",12,\"tabNum\",0,\"stackPosition\",null]]],\"^1A\",null,\"^1B\",null,\"^1C\",null,\"^1D\",\"\",\"^7\",\"~m1780412606217\",\"^1E\",\"~m1780437280828\",\"^1F\",\"\",\"^1G\",null,\"^1H\",\"page1\",\"^1I\",null,\"^1J\",null]]],\"tmp_hiddenLevels\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"tmp_hiddenLevels\",\"^16\",\"aaaa1111-bbbb-4222-8ccc-3333dddd4444\",\"^17\",null,\"^18\",\"state\",\"^19\",\"State\",\"^1:\",null,\"^1;\",null,\"^1<\",null,\"^1=\",[\"^1>\",[\"value\",[\"^A\",[]]]],\"^1?\",null,\"^1@\",null,\"^1A\",null,\"^1B\",null,\"^1C\",null,\"^1D\",\"\",\"^7\",\"2026-06-02T16:30:00.000Z\",\"^1E\",\"2026-06-02T16:30:00.000Z\",\"^1F\",\"\",\"^1G\",null,\"^1H\",\"page1\",\"^1I\",null,\"^1J\",null]]],\"getChartData\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"getChartData\",\"^16\",\"eeee5555-ffff-4666-aaaa-7777bbbb8888\",\"^17\",null,\"^18\",\"function\",\"^19\",\"Function\",\"^1:\",null,\"^1;\",null,\"^1<\",null,\"^1=\",[\"^1>\",[\"funcBody\",\"// Mock columnar data: member counts per career level per year.\\nconst years  = [2019, 2020, 2021, 2022, 2023, 2024];\\nconst levels = [\\\"Junior\\\", \\\"Mid\\\", \\\"Senior\\\", \\\"Lead\\\"];\\nconst counts = {\\n  Junior: [40, 44, 49, 47, 52, 58],\\n  Mid:    [25, 28, 30, 34, 33, 38],\\n  Senior: [12, 14, 15, 18, 20, 22],\\n  Lead:   [ 4,  5,  6,  6,  8,  9],\\n};\\n\\n// Component refs inside a Function's funcBody MUST go through {{ }} interpolation\\n// (they aren't in lexical scope like in a query/event handler) — this is also\\n// what registers the dependency that makes the debounced Function recompute.\\nconst hidden = {{ tmp_hiddenLevels.value }} || [];\\nconst visible = levels.filter(l => !hidden.includes(l));\\n\\n// Least-squares linear regression -> fitted y for each x.\\nfunction regress(xs, ys) {\\n  const n = xs.length;\\n  const mx = xs.reduce((a, b) => a + b, 0) / n;\\n  const my = ys.reduce((a, b) => a + b, 0) / n;\\n  let num = 0, den = 0;\\n  for (let i = 0; i < n; i++) { num += (xs[i] - mx) * (ys[i] - my); den += (xs[i] - mx) ** 2; }\\n  const m = den === 0 ? 0 : num / den;\\n  const b = my - m * mx;\\n  return xs.map(x => m * x + b);\\n}\\n\\nconst data = [];\\n\\n// One stacked BAR trace per level.\\nlevels.forEach(level => {\\n  data.push({\\n    x: years,\\n    y: counts[level],\\n    name: level,\\n    type: \\\"bar\\\",\\n    visible: hidden.includes(level) ? \\\"legendonly\\\" : true,\\n  });\\n});\\n\\n// One TRENDLINE per visible level, drawn through each segment's CENTER:\\n// center_y(year) = (sum of visible levels stacked below) + thisValue/2.\\nvisible.forEach((level, idx) => {\\n  const centerY = years.map((_, yi) => {\\n    let base = 0;\\n    for (let k = 0; k < idx; k++) base += counts[visible[k]][yi];\\n    return base + counts[level][yi] / 2;\\n  });\\n  const trend = regress(years, centerY);\\n  data.push({\\n    x: years,\\n    y: trend,\\n    name: level + \\\" trend\\\",\\n    type: \\\"scatter\\\",\\n    mode: \\\"lines\\\",\\n    line: { width: 3, dash: \\\"dot\\\" },\\n    showlegend: false,\\n  });\\n});\\n\\nreturn data;\\n\",\"value\",\"\",\"runBehavior\",\"debounced\"]],\"^1?\",[\"^1>\",[]],\"^1@\",null,\"^1A\",null,\"^1B\",null,\"^1C\",null,\"^1D\",\"\",\"^7\",\"2026-06-02T16:30:00.000Z\",\"^1E\",\"2026-06-02T16:30:00.000Z\",\"^1F\",\"\",\"^1G\",null,\"^1H\",\"page1\",\"^1I\",null,\"^1J\",null]]]]],\"preloadedAppJavaScript\",null,\"preloadedAppJSLinks\",[],\"queryStatusVisibility\",false,\"responsiveLayoutDisabled\",false,\"rootScreen\",\"page1\",\"savePlatform\",\"web\",\"shortlink\",null,\"testEntities\",[],\"tests\",[],\"urlFragmentDefinitions\",[\"^A\",[]],\"version\",\"4.1.0\",\"serializedLayout\",null,\"agentEvals\",[\"^ \"]]]]"},"changesRecord":[],"changesRecordV2":[{"data":{"op":"update","ids":["plotlyJsonChart1"],"tag":"plugin"},"type":"diff","version":1}],"checksum":null,"multiplayerSessionId":"33a66cfe-069c-4b36-b20c-f0948456b9c3","appTestingSaveId":null,"subflows":null,"isCopilotGenerated":false,"createdAt":"2026-06-02T21:54:41.784Z","updatedAt":"2026-06-02T21:54:41.784Z","pageId":5228049,"userId":736220},"modules":{}}