"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPieChartConfig = void 0;
const savedCharts_1 = require("../../../../../../types/savedCharts");
const getPieChartConfig = ({ queryTool, metricQuery, }) => {
    const { dimensions } = queryTool.queryConfig;
    const { metrics } = metricQuery;
    const { chartConfig } = queryTool;
    const config = {
        groupFieldIds: dimensions,
        metricId: (chartConfig?.yAxisMetrics?.[0] || metrics[0]),
    };
    return {
        type: savedCharts_1.ChartType.PIE,
        config,
    };
};
exports.getPieChartConfig = getPieChartConfig;
//# sourceMappingURL=pie.js.map