fix: Stacked charts with numerical columns (#26264)

This commit is contained in:
Michael S. Molina
2023-12-13 17:10:51 -03:00
committed by GitHub
parent 334e15997f
commit 429e2a33c3
4 changed files with 14 additions and 8 deletions

View File

@@ -508,11 +508,14 @@ export function sanitizeHtml(text: string): string {
return format.encodeHTML(text);
}
export function getAxisType(dataType?: GenericDataType): AxisType {
export function getAxisType(
stack: StackType,
dataType?: GenericDataType,
): AxisType {
if (dataType === GenericDataType.TEMPORAL) {
return AxisType.time;
}
if (dataType === GenericDataType.NUMERIC) {
if (dataType === GenericDataType.NUMERIC && !stack) {
return AxisType.value;
}
return AxisType.category;