Mercurial > gemma
comparison 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 |
comparison
equal
deleted
inserted
replaced
3926:3ebde6dd336f | 3927:03f37e64701c |
---|---|
106 import { startOfYear, endOfYear } from "date-fns"; | 106 import { startOfYear, endOfYear } from "date-fns"; |
107 import svg2pdf from "svg2pdf.js"; | 107 import svg2pdf from "svg2pdf.js"; |
108 import { pdfgen, templateLoader } from "@/lib/mixins"; | 108 import { pdfgen, templateLoader } from "@/lib/mixins"; |
109 import { HTTP } from "@/lib/http"; | 109 import { HTTP } from "@/lib/http"; |
110 import { displayError } from "@/lib/errors"; | 110 import { displayError } from "@/lib/errors"; |
111 import { defaultDiagramTemplate } from "@/lib/DefaultDiagramTemplate"; | |
111 | 112 |
112 export default { | 113 export default { |
113 mixins: [pdfgen, templateLoader], | 114 mixins: [pdfgen, templateLoader], |
114 components: { | 115 components: { |
115 DiagramLegend: () => import("@/components/DiagramLegend") | 116 DiagramLegend: () => import("@/components/DiagramLegend") |
122 form: { | 123 form: { |
123 template: null, | 124 template: null, |
124 form: null | 125 form: null |
125 }, | 126 }, |
126 templates: [], | 127 templates: [], |
127 defaultTemplate: { | 128 defaultTemplate: defaultDiagramTemplate, |
128 name: "Default", | |
129 properties: { | |
130 paperSize: "a4" | |
131 }, | |
132 elements: [ | |
133 { | |
134 type: "diagram", | |
135 position: "topleft", | |
136 offset: { x: 15, y: 50 }, | |
137 width: 240, | |
138 height: 100 | |
139 }, | |
140 { | |
141 type: "diagramlegend", | |
142 position: "topleft", | |
143 offset: { x: 42, y: 172 }, | |
144 colot: "black" | |
145 }, | |
146 { | |
147 type: "diagramtitle", | |
148 position: "topleft", | |
149 offset: { x: 50, y: 26 }, | |
150 fontsize: 22, | |
151 color: "steelblue" | |
152 } | |
153 ] | |
154 }, | |
155 pdf: { | 129 pdf: { |
156 doc: null, | 130 doc: null, |
157 width: 420, | 131 width: 420, |
158 height: 297 | 132 height: 297 |
159 } | 133 } |