feat(explore): Denormalize form data in echarts, world map and nvd3 bar and line charts (#20313)

* feat(explore): Apply denormalize form data function to echarts and world map

* Denormalize form data in mixed timeseries

* Add dist bar chart
This commit is contained in:
Kamil Gabryjelski
2022-06-09 11:54:09 +02:00
committed by GitHub
parent d04357c47b
commit 354a89950c
18 changed files with 112 additions and 4 deletions

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { t } from '@superset-ui/core';
import { ensureIsArray, t } from '@superset-ui/core';
import {
D3_FORMAT_DOCS,
D3_FORMAT_OPTIONS,
@@ -136,5 +136,16 @@ const config: ControlPanelConfig = {
),
},
},
denormalizeFormData: formData => {
const groupby =
formData.standardizedFormData.standardizedState.columns.filter(
col => !ensureIsArray(formData.columns).includes(col),
);
return {
...formData,
metrics: formData.standardizedFormData.standardizedState.metrics,
groupby,
};
},
};
export default config;