Skip to content

@shbernal/ts-pptx


@shbernal/ts-pptx / index / asChartType

Function: asChartType()

asChartType(name): ChartType

Defined in: src/enums.ts:496

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" | "bar" | "bar3D" | "bubble" | "bubble3D" | "doughnut" | "pie" | "radar" | "scatter" | "stock" | "surface" | "waterfall" | "funnel" | "treemap" | "sunburst" | "histogram" | "pareto" | "boxWhisker" | "regionMap"

Returns

ChartType