Mercurial > gemma
diff client/src/components/gauge/HydrologicalConditions.vue @ 3927:03f37e64701c
Factored out default template for diagrams in a single file.
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Thu, 11 Jul 2019 16:55:31 +0200 |
parents | 50a0b6d3b032 |
children | de4c557bbc47 |
line wrap: on
line diff
--- a/client/src/components/gauge/HydrologicalConditions.vue Thu Jul 11 16:25:56 2019 +0200 +++ b/client/src/components/gauge/HydrologicalConditions.vue Thu Jul 11 16:55:31 2019 +0200 @@ -108,6 +108,7 @@ import { pdfgen, templateLoader } from "@/lib/mixins"; import { HTTP } from "@/lib/http"; import { displayError } from "@/lib/errors"; +import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate"; export default { mixins: [pdfgen, templateLoader], @@ -124,34 +125,7 @@ form: null }, templates: [], - defaultTemplate: { - name: "Default", - properties: { - paperSize: "a4" - }, - elements: [ - { - type: "diagram", - position: "topleft", - offset: { x: 15, y: 50 }, - width: 240, - height: 100 - }, - { - type: "diagramlegend", - position: "topleft", - offset: { x: 42, y: 172 }, - colot: "black" - }, - { - type: "diagramtitle", - position: "topleft", - offset: { x: 50, y: 26 }, - fontsize: 22, - color: "steelblue" - } - ] - }, + defaultTemplate: defaultDiagramTemplate, pdf: { doc: null, width: 420,