message: fix: chart export fails when buildQuery not present
diff: @@ -198,7 +198,12 @@ export const shouldUseLegacyApi = formData => {
  return useLegacyApi || false;
  };
  -export const buildV1ChartDataPayload = ({ formData, force }) => {
  +export const buildV1ChartDataPayload = ({
  + formData,
  + force,
  + resultFormat,
  + resultType,
  +}) => {
  const buildQuery =
  getChartBuildQueryRegistry().get(formData.viz_type) ??
  (buildQueryformData =>
  @@ -210,6 +215,8 @@ export const buildV1ChartDataPayload = ({ formData, force }) => {
  return buildQuery({
  ...formData,
  force,
  + result_format: resultFormat,
  + result_type: resultType,
  });
  };
  @@ -260,13 +267,12 @@ export const exportChart = ({
  payload = formData;
  } else {
  url = '/api/v1/chart/data';
  - const buildQuery = getChartBuildQueryRegistry().get(formData.viz_type);
  - payload = buildQuery({
  - ...formData,
  + payload = buildV1ChartDataPayload({
  + formData,
  force,
  + resultFormat,
  + resultType,
  });
  - payload.result_type = resultType;
  - payload.result_format = resultFormat;
  }
  postForm(url, payload);
  };
  