adapt static method
Adapts the json payload to be compatible with targetType.
force defaults to true for backward compatibility with the old adapter:
lossy-but-useful conversions such as cartesian -> pie/hierarchy/financial
are allowed. Pass force: false to permit only same-shape targets.
Implementation
static Map<String, dynamic> adapt(
Map<String, dynamic> json,
ChartType targetType, {
bool force = true,
}) => registry.switchChartTypeForSeriesShape(
json,
targetType: targetType,
force: force,
);