{"record":{"id":"ee7ef50d106e1c28","repo":"PHPOffice/PhpSpreadsheet","slug":"invalid-datatype-for-chart-data-series-values","errorCode":null,"errorMessage":"Invalid datatype for chart data series values","messagePattern":"Invalid datatype for chart data series values","errorType":"exception","errorClass":"PhpOffice\\PhpSpreadsheet\\Chart\\Exception","httpStatus":null,"severity":"error","filePath":"src/PhpSpreadsheet/Chart/DataSeriesValues.php","lineNumber":133,"sourceCode":"        return $this->dataType;\n    }\n\n    /**\n     * Set Series Data Type.\n     *\n     * @param string $dataType Datatype of this data series\n     *                                Typical values are:\n     *                                    DataSeriesValues::DATASERIES_TYPE_STRING\n     *                                        Normally used for axis point values\n     *                                    DataSeriesValues::DATASERIES_TYPE_NUMBER\n     *                                        Normally used for chart data values\n     *\n     * @return $this\n     */\n    public function setDataType(string $dataType): static\n    {\n        if (!in_array($dataType, self::DATA_TYPE_VALUES)) {\n            throw new Exception('Invalid datatype for chart data series values');\n        }\n        $this->dataType = $dataType;\n\n        return $this;\n    }\n\n    /**\n     * Get Series Data Source (formula).\n     */\n    public function getDataSource(): ?string\n    {\n        return $this->dataSource;\n    }\n\n    /**\n     * Set Series Data Source (formula).\n     *\n     * @return $this","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/PHPOffice/PhpSpreadsheet/blob/65b080eef4d9fd11a5796135ab145883e5c3d6a6/src/PhpSpreadsheet/Chart/DataSeriesValues.php#L115-L151","documentation":"Error \"Invalid datatype for chart data series values\" thrown in PHPOffice/PhpSpreadsheet.","triggerScenarios":"Thrown at src/PhpSpreadsheet/Chart/DataSeriesValues.php:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"65b080eef4d9fd11a5796135ab145883e5c3d6a6","analyzedAt":"2026-08-17T05:40:41.646Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}