{"record":{"id":"7f3caeb3673869d0","repo":"ppy/osu","slug":"at-least-one-value-expected","errorCode":null,"errorMessage":"At least one value expected!","messagePattern":"At least one value expected!","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"warning","filePath":"osu.Game/Overlays/Profile/Sections/Historical/ProfileLineChart.cs:30","lineNumber":30,"sourceCode":"        public APIUserHistoryCount[] Values\n        {\n            get => values;\n            set\n            {\n                if (value.Length == 0)\n                    throw new ArgumentException(\"At least one value expected!\", nameof(value));\n\n                graph.Values = values = value;\n\n                createRowTicks();\n                createColumnTicks();\n            }\n        }","sourceCodeStart":null,"sourceCodeEnd":null,"githubUrl":"https://github.com/ppy/osu/blob/d9c73e12adff2feaae4a3e158d36fe5883faf6ca/osu.Game/Overlays/Profile/Sections/historical/ProfileLineChart.cs#L30","documentation":"Thrown as ArgumentException by the ProfileLineChart.Values setter when the assigned array is empty. The chart needs at least one data point to compute axes and ticks, so an empty input is rejected at the boundary.","triggerScenarios":"Setting ProfileLineChart.Values to an APIUserHistoryCount[] of length 0. Happens when the user profile's historical data (e.g. play count history) returned no points.","commonSituations":"New or inactive user with no historical plays; API returned an empty history array; filtering removed all points before binding.","solutions":["Check the array is non-empty before assigning; hide/disable the chart when empty.","Gate rendering on values.Length > 0 and show an empty-state placeholder instead.","Ensure upstream filtering does not strip all data points."],"exampleFix":"// before\nchart.Values = history.ToArray();\n\n// after\nif (history.Any())\n    chart.Values = history.ToArray();\nelse\n    chart.Hide();","handlingStrategy":"validation","validationCode":"if (history.Length > 0)\n    chart.Values = history;\nelse\n    chart.Hide();","typeGuard":"bool HasData(APIUserHistoryCount[] values) => values.Length > 0;","tryCatchPattern":"try { chart.Values = values; }\ncatch (ArgumentException) { /* empty dataset: hide the chart */ }","preventionTips":["Always check Length > 0 before binding the chart.","Render an empty-state placeholder when history is empty.","Do not strip all points in upstream filtering."],"tags":["ui","chart","profile","validation","argument"],"backgroundTag":null,"analyzedSha":"d9c73e12adff2feaae4a3e158d36fe5883faf6ca","analyzedAt":"2026-08-13T14:12:54.015Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}