Skip to content

@shbernal/pptxgenjs


@shbernal/pptxgenjs / index / asChartType

Function: asChartType()

asChartType(name): ChartType

Defined in: core-enums.ts:568

Narrow a public CHART_NAME to the internal ChartType enum. Because CHART_NAME is derived from ChartType, every CHART_NAME value is by construction a valid enum value, so this conversion is total and safe — it is the single boundary cast that lets internal code compare against the enum (enum-to-enum) instead of enum-to-string.

Parameters

name

"area" | "line" | "pie" | "bar" | "bar3D" | "bubble" | "bubble3D" | "doughnut" | "radar" | "scatter"

Returns

ChartType