view client/src/lib/DefaultDiagramTemplate.js @ 5586:215e6ba9651b surveysperbottleneckid

Added property "displayName" to bottlenecks. Before displayed, bottlenecks ordered by country are now checked for doubles per country. In case a double is found the displayName is enriched with the bottleneck_id. Otherwise the displayName is equal to "name" or "objnam". Example: const testList = [ { properties: { responsible_country: "AT", name: "Bananas", bottleneck_id: "BN1" } }, { properties: { responsible_country: "DE", name: "Bananas", bottleneck_id: "BN2" } }, { properties: { responsible_country: "DE", name: "Bananas", bottleneck_id: "BN3" } } ]; is rendered to: AT Bananas DE Bananas / BN2 Bananas / BN3
author Thomas Junk <thomas.junk@intevation.de>
date Mon, 04 Apr 2022 15:12:43 +0200
parents ea36f163db44
children
line wrap: on
line source

const defaultDiagramTemplate = {
  name: "Default",
  properties: {
    paperSize: "a4"
  },
  elements: [
    {
      type: "diagramtitle",
      position: "topleft",
      offset: { x: 74, y: 25 },
      fontsize: 20,
      color: "steelblue"
    },
    {
      type: "diagram",
      position: "topleft",
      offset: { x: 24, y: 40 },
      width: 248,
      height: 119
    },
    {
      type: "diagramlegend",
      position: "topleft",
      offset: { x: 44, y: 167 },
      color: "black"
    }
  ]
};

export { defaultDiagramTemplate };