feat(plugin-chart-echarts): add support for generic axis to mixed chart (#20097)

* feat(plugin-chart-echarts): add support for generic axis to mixed chart

* fix tests + add new tests

* address review comments

* simplify control panel

* fix types and tests
This commit is contained in:
Ville Brofeldt
2022-05-19 13:51:52 +03:00
committed by GitHub
parent b2a7fadba9
commit d5c5e58583
12 changed files with 267 additions and 105 deletions

View File

@@ -239,3 +239,15 @@ export const currentSeries = {
name: '',
legend: '',
};
export function getAxisType(
dataType?: GenericDataType,
): 'time' | 'value' | 'category' {
if (dataType === GenericDataType.TEMPORAL) {
return 'time';
}
if (dataType === GenericDataType.NUMERIC) {
return 'value';
}
return 'category';
}