diff --git a/app/charts/index.ts b/app/charts/index.ts index b71b4243fc..b32b1c5663 100644 --- a/app/charts/index.ts +++ b/app/charts/index.ts @@ -2,6 +2,7 @@ import { ascending, group } from "d3"; import produce from "immer"; import get from "lodash/get"; import groupBy from "lodash/groupBy"; +import sortBy from "lodash/sortBy"; import { DEFAULT_SYMBOL_LAYER_COLORS } from "@/charts/map/constants"; import { @@ -34,6 +35,8 @@ import { getCategoricalDimensions, getGeoDimensions, getTimeDimensions, + isGeoCoordinatesDimension, + isGeoShapesDimension, } from "../domain/data"; import { DimensionMetadataFragment } from "../graphql/query-hooks"; import { DataCubeMetadata } from "../graphql/types"; @@ -166,7 +169,9 @@ export const getInitialConfig = ({ fields: { x: { componentIri: findPreferredDimension( - dimensions, + sortBy(dimensions, (x) => + isGeoCoordinatesDimension(x) || isGeoShapesDimension(x) ? 1 : -1 + ), "TemporalDimension" ).iri, sorting: DEFAULT_SORTING, diff --git a/cypress/integration/filters.spec.ts b/cypress/integration/filters.spec.ts index 299d56b9c6..cbf625eb70 100644 --- a/cypress/integration/filters.spec.ts +++ b/cypress/integration/filters.spec.ts @@ -19,8 +19,7 @@ describe("Filters", () => { cy.findByText("1. production region"); cy.findByText("2. stand structure"); cy.findByText("3. evaluation type"); - cy.findByText("4. Inventory"); - cy.findByText("5. unit of evaluation"); + cy.findByText("4. unit of evaluation"); }); selectors.edition