@reportman/engine 0.0.0-stage → 4.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/LICENSE +373 -0
  2. package/dist/.tsbuildinfo +1 -0
  3. package/dist/data/columns.d.ts +50 -0
  4. package/dist/data/columns.d.ts.map +1 -0
  5. package/dist/data/columns.js +385 -0
  6. package/dist/data/columns.js.map +1 -0
  7. package/dist/data/databaseinfo.d.ts +41 -0
  8. package/dist/data/databaseinfo.d.ts.map +1 -0
  9. package/dist/data/databaseinfo.js +145 -0
  10. package/dist/data/databaseinfo.js.map +1 -0
  11. package/dist/data/datainfo.d.ts +82 -0
  12. package/dist/data/datainfo.d.ts.map +1 -0
  13. package/dist/data/datainfo.js +449 -0
  14. package/dist/data/datainfo.js.map +1 -0
  15. package/dist/data/errors.d.ts +8 -0
  16. package/dist/data/errors.d.ts.map +1 -0
  17. package/dist/data/errors.js +14 -0
  18. package/dist/data/errors.js.map +1 -0
  19. package/dist/data/host.d.ts +132 -0
  20. package/dist/data/host.d.ts.map +1 -0
  21. package/dist/data/host.js +108 -0
  22. package/dist/data/host.js.map +1 -0
  23. package/dist/data/op.d.ts +21 -0
  24. package/dist/data/op.d.ts.map +1 -0
  25. package/dist/data/op.js +97 -0
  26. package/dist/data/op.js.map +1 -0
  27. package/dist/data/reportdataset.d.ts +116 -0
  28. package/dist/data/reportdataset.d.ts.map +1 -0
  29. package/dist/data/reportdataset.js +396 -0
  30. package/dist/data/reportdataset.js.map +1 -0
  31. package/dist/data/transfer.d.ts +46 -0
  32. package/dist/data/transfer.d.ts.map +1 -0
  33. package/dist/data/transfer.js +100 -0
  34. package/dist/data/transfer.js.map +1 -0
  35. package/dist/data/union.d.ts +88 -0
  36. package/dist/data/union.d.ts.map +1 -0
  37. package/dist/data/union.js +733 -0
  38. package/dist/data/union.js.map +1 -0
  39. package/dist/eval/chinesetables.d.ts +5 -0
  40. package/dist/eval/chinesetables.d.ts.map +1 -0
  41. package/dist/eval/chinesetables.js +8 -0
  42. package/dist/eval/chinesetables.js.map +1 -0
  43. package/dist/eval/evaluator.d.ts +100 -0
  44. package/dist/eval/evaluator.d.ts.map +1 -0
  45. package/dist/eval/evaluator.js +667 -0
  46. package/dist/eval/evaluator.js.map +1 -0
  47. package/dist/eval/exception.d.ts +9 -0
  48. package/dist/eval/exception.d.ts.map +1 -0
  49. package/dist/eval/exception.js +15 -0
  50. package/dist/eval/exception.js.map +1 -0
  51. package/dist/eval/fields.d.ts +60 -0
  52. package/dist/eval/fields.d.ts.map +1 -0
  53. package/dist/eval/fields.js +104 -0
  54. package/dist/eval/fields.js.map +1 -0
  55. package/dist/eval/functions.d.ts +27 -0
  56. package/dist/eval/functions.d.ts.map +1 -0
  57. package/dist/eval/functions.js +810 -0
  58. package/dist/eval/functions.js.map +1 -0
  59. package/dist/eval/identifiers.d.ts +100 -0
  60. package/dist/eval/identifiers.d.ts.map +1 -0
  61. package/dist/eval/identifiers.js +195 -0
  62. package/dist/eval/identifiers.js.map +1 -0
  63. package/dist/eval/parser.d.ts +47 -0
  64. package/dist/eval/parser.d.ts.map +1 -0
  65. package/dist/eval/parser.js +336 -0
  66. package/dist/eval/parser.js.map +1 -0
  67. package/dist/index.d.ts +52 -0
  68. package/dist/index.d.ts.map +1 -0
  69. package/dist/index.js +42 -0
  70. package/dist/index.js.map +1 -0
  71. package/dist/params/param.d.ts +92 -0
  72. package/dist/params/param.d.ts.map +1 -0
  73. package/dist/params/param.js +358 -0
  74. package/dist/params/param.js.map +1 -0
  75. package/dist/params/parameters.d.ts +87 -0
  76. package/dist/params/parameters.d.ts.map +1 -0
  77. package/dist/params/parameters.js +499 -0
  78. package/dist/params/parameters.js.map +1 -0
  79. package/dist/report/barcode/barcodeitem.d.ts +76 -0
  80. package/dist/report/barcode/barcodeitem.d.ts.map +1 -0
  81. package/dist/report/barcode/barcodeitem.js +864 -0
  82. package/dist/report/barcode/barcodeitem.js.map +1 -0
  83. package/dist/report/barcode/code128.d.ts +18 -0
  84. package/dist/report/barcode/code128.d.ts.map +1 -0
  85. package/dist/report/barcode/code128.js +187 -0
  86. package/dist/report/barcode/code128.js.map +1 -0
  87. package/dist/report/barcode/netutil.d.ts +30 -0
  88. package/dist/report/barcode/netutil.d.ts.map +1 -0
  89. package/dist/report/barcode/netutil.js +65 -0
  90. package/dist/report/barcode/netutil.js.map +1 -0
  91. package/dist/report/barcode/pdf417.d.ts +17 -0
  92. package/dist/report/barcode/pdf417.d.ts.map +1 -0
  93. package/dist/report/barcode/pdf417.js +782 -0
  94. package/dist/report/barcode/pdf417.js.map +1 -0
  95. package/dist/report/barcode/pdf417tables.d.ts +11 -0
  96. package/dist/report/barcode/pdf417tables.d.ts.map +1 -0
  97. package/dist/report/barcode/pdf417tables.js +880 -0
  98. package/dist/report/barcode/pdf417tables.js.map +1 -0
  99. package/dist/report/barcode/qrcode.d.ts +14 -0
  100. package/dist/report/barcode/qrcode.d.ts.map +1 -0
  101. package/dist/report/barcode/qrcode.js +214 -0
  102. package/dist/report/barcode/qrcode.js.map +1 -0
  103. package/dist/report/barcode/zxingwidth.d.ts +4 -0
  104. package/dist/report/barcode/zxingwidth.d.ts.map +1 -0
  105. package/dist/report/barcode/zxingwidth.js +247 -0
  106. package/dist/report/barcode/zxingwidth.js.map +1 -0
  107. package/dist/report/chart/chartidens.d.ts +70 -0
  108. package/dist/report/chart/chartidens.d.ts.map +1 -0
  109. package/dist/report/chart/chartidens.js +162 -0
  110. package/dist/report/chart/chartidens.js.map +1 -0
  111. package/dist/report/chart/chartitem.d.ts +110 -0
  112. package/dist/report/chart/chartitem.d.ts.map +1 -0
  113. package/dist/report/chart/chartitem.js +403 -0
  114. package/dist/report/chart/chartitem.js.map +1 -0
  115. package/dist/report/chart/series.d.ts +65 -0
  116. package/dist/report/chart/series.d.ts.map +1 -0
  117. package/dist/report/chart/series.js +74 -0
  118. package/dist/report/chart/series.js.map +1 -0
  119. package/dist/report/chart/vectorchart.d.ts +18 -0
  120. package/dist/report/chart/vectorchart.d.ts.map +1 -0
  121. package/dist/report/chart/vectorchart.js +356 -0
  122. package/dist/report/chart/vectorchart.js.map +1 -0
  123. package/dist/report/convert.d.ts +4 -0
  124. package/dist/report/convert.d.ts.map +1 -0
  125. package/dist/report/convert.js +162 -0
  126. package/dist/report/convert.js.map +1 -0
  127. package/dist/report/errors.d.ts +13 -0
  128. package/dist/report/errors.d.ts.map +1 -0
  129. package/dist/report/errors.js +20 -0
  130. package/dist/report/errors.js.map +1 -0
  131. package/dist/report/identifiers.d.ts +91 -0
  132. package/dist/report/identifiers.d.ts.map +1 -0
  133. package/dist/report/identifiers.js +404 -0
  134. package/dist/report/identifiers.js.map +1 -0
  135. package/dist/report/imageitem.d.ts +66 -0
  136. package/dist/report/imageitem.d.ts.map +1 -0
  137. package/dist/report/imageitem.js +190 -0
  138. package/dist/report/imageitem.js.map +1 -0
  139. package/dist/report/items.d.ts +219 -0
  140. package/dist/report/items.d.ts.map +1 -0
  141. package/dist/report/items.js +1015 -0
  142. package/dist/report/items.js.map +1 -0
  143. package/dist/report/report.d.ts +221 -0
  144. package/dist/report/report.d.ts.map +1 -0
  145. package/dist/report/report.js +1974 -0
  146. package/dist/report/report.js.map +1 -0
  147. package/dist/report/run.d.ts +87 -0
  148. package/dist/report/run.d.ts.map +1 -0
  149. package/dist/report/run.js +121 -0
  150. package/dist/report/run.js.map +1 -0
  151. package/dist/report/section.d.ts +86 -0
  152. package/dist/report/section.d.ts.map +1 -0
  153. package/dist/report/section.js +325 -0
  154. package/dist/report/section.js.map +1 -0
  155. package/dist/report/subreport.d.ts +49 -0
  156. package/dist/report/subreport.d.ts.map +1 -0
  157. package/dist/report/subreport.js +220 -0
  158. package/dist/report/subreport.js.map +1 -0
  159. package/dist/util/base64.d.ts +9 -0
  160. package/dist/util/base64.d.ts.map +1 -0
  161. package/dist/util/base64.js +60 -0
  162. package/dist/util/base64.js.map +1 -0
  163. package/dist/util/chars.d.ts +45 -0
  164. package/dist/util/chars.d.ts.map +1 -0
  165. package/dist/util/chars.js +194 -0
  166. package/dist/util/chars.js.map +1 -0
  167. package/dist/util/compositeformat.d.ts +3 -0
  168. package/dist/util/compositeformat.d.ts.map +1 -0
  169. package/dist/util/compositeformat.js +99 -0
  170. package/dist/util/compositeformat.js.map +1 -0
  171. package/dist/util/culture.d.ts +84 -0
  172. package/dist/util/culture.d.ts.map +1 -0
  173. package/dist/util/culture.js +59 -0
  174. package/dist/util/culture.js.map +1 -0
  175. package/dist/util/cultures.generated.d.ts +3 -0
  176. package/dist/util/cultures.generated.d.ts.map +1 -0
  177. package/dist/util/cultures.generated.js +1043 -0
  178. package/dist/util/cultures.generated.js.map +1 -0
  179. package/dist/util/dateformat.d.ts +21 -0
  180. package/dist/util/dateformat.d.ts.map +1 -0
  181. package/dist/util/dateformat.js +439 -0
  182. package/dist/util/dateformat.js.map +1 -0
  183. package/dist/util/dateparse.d.ts +12 -0
  184. package/dist/util/dateparse.d.ts.map +1 -0
  185. package/dist/util/dateparse.js +1212 -0
  186. package/dist/util/dateparse.js.map +1 -0
  187. package/dist/util/datetime.d.ts +70 -0
  188. package/dist/util/datetime.d.ts.map +1 -0
  189. package/dist/util/datetime.js +265 -0
  190. package/dist/util/datetime.js.map +1 -0
  191. package/dist/util/decimal.d.ts +54 -0
  192. package/dist/util/decimal.d.ts.map +1 -0
  193. package/dist/util/decimal.js +365 -0
  194. package/dist/util/decimal.js.map +1 -0
  195. package/dist/util/delphidateformat.d.ts +34 -0
  196. package/dist/util/delphidateformat.d.ts.map +1 -0
  197. package/dist/util/delphidateformat.js +247 -0
  198. package/dist/util/delphidateformat.js.map +1 -0
  199. package/dist/util/delphiformatsettings.generated.d.ts +3 -0
  200. package/dist/util/delphiformatsettings.generated.d.ts.map +1 -0
  201. package/dist/util/delphiformatsettings.generated.js +15 -0
  202. package/dist/util/delphiformatsettings.generated.js.map +1 -0
  203. package/dist/util/delphitext.d.ts +40 -0
  204. package/dist/util/delphitext.d.ts.map +1 -0
  205. package/dist/util/delphitext.js +408 -0
  206. package/dist/util/delphitext.js.map +1 -0
  207. package/dist/util/doubleutil.d.ts +30 -0
  208. package/dist/util/doubleutil.d.ts.map +1 -0
  209. package/dist/util/doubleutil.js +651 -0
  210. package/dist/util/doubleutil.js.map +1 -0
  211. package/dist/util/inflate.d.ts +7 -0
  212. package/dist/util/inflate.d.ts.map +1 -0
  213. package/dist/util/inflate.js +256 -0
  214. package/dist/util/inflate.js.map +1 -0
  215. package/dist/util/netexception.d.ts +59 -0
  216. package/dist/util/netexception.d.ts.map +1 -0
  217. package/dist/util/netexception.js +94 -0
  218. package/dist/util/netexception.js.map +1 -0
  219. package/dist/util/numberformat.d.ts +14 -0
  220. package/dist/util/numberformat.d.ts.map +1 -0
  221. package/dist/util/numberformat.js +828 -0
  222. package/dist/util/numberformat.js.map +1 -0
  223. package/dist/util/numberparse.d.ts +49 -0
  224. package/dist/util/numberparse.d.ts.map +1 -0
  225. package/dist/util/numberparse.js +568 -0
  226. package/dist/util/numberparse.js.map +1 -0
  227. package/dist/util/reportmanres.en.generated.d.ts +2 -0
  228. package/dist/util/reportmanres.en.generated.d.ts.map +1 -0
  229. package/dist/util/reportmanres.en.generated.js +2082 -0
  230. package/dist/util/reportmanres.en.generated.js.map +1 -0
  231. package/dist/util/reportmanres.es.generated.d.ts +2 -0
  232. package/dist/util/reportmanres.es.generated.d.ts.map +1 -0
  233. package/dist/util/reportmanres.es.generated.js +2082 -0
  234. package/dist/util/reportmanres.es.generated.js.map +1 -0
  235. package/dist/util/translator.d.ts +29 -0
  236. package/dist/util/translator.d.ts.map +1 -0
  237. package/dist/util/translator.js +79 -0
  238. package/dist/util/translator.js.map +1 -0
  239. package/dist/variant/coercion.d.ts +9 -0
  240. package/dist/variant/coercion.d.ts.map +1 -0
  241. package/dist/variant/coercion.js +298 -0
  242. package/dist/variant/coercion.js.map +1 -0
  243. package/dist/variant/context.d.ts +30 -0
  244. package/dist/variant/context.d.ts.map +1 -0
  245. package/dist/variant/context.js +22 -0
  246. package/dist/variant/context.js.map +1 -0
  247. package/dist/variant/variant.d.ts +193 -0
  248. package/dist/variant/variant.d.ts.map +1 -0
  249. package/dist/variant/variant.js +1235 -0
  250. package/dist/variant/variant.js.map +1 -0
  251. package/package.json +35 -4
  252. package/README.md +0 -3
@@ -0,0 +1,403 @@
1
+ // Port of the runtime part of Reportman.Reporting.ChartItem (ChartItem.cs) and of VariableGraph
2
+ // (VariableGraph.cs): a chart item collects a value (and its caption and colour) on every record
3
+ // of its subreport, starts a new series when its change of serie expression says so, clears them
4
+ // on its clear expression, and draws them when it prints: with the device's own chart support
5
+ // (PrintOut.drawChart, of Report.ChartingDriver when the host sets one) or else the vector chart.
6
+ // Its identifier is a variable the GRAPHIC* report functions find to add values from expressions.
7
+ import { AutoRangeAxis } from '@reportman/lib';
8
+ import { IdenVariable } from '../../eval/identifiers.js';
9
+ import { messageOf } from '../../util/netexception.js';
10
+ import { Variant } from '../../variant/variant.js';
11
+ import { ReportException } from '../errors.js';
12
+ import { PrintItemText, SubReportEvent } from '../items.js';
13
+ import { Series, SeriesItem } from './series.js';
14
+ import { drawVectorChart } from './vectorchart.js';
15
+ /**
16
+ * VariableGraph: the variable of a chart item's identifier. It is a plain variable for the
17
+ * expressions (Null until something is assigned to it) that the GRAPHIC* functions recognise.
18
+ */
19
+ export class IdenChart extends IdenVariable {
20
+ report;
21
+ newChart;
22
+ // C# parity: created with the evaluator the report had when the item was attached to it; a
23
+ // variable does not use its evaluator.
24
+ constructor(report, chart) {
25
+ super(null);
26
+ this.report = report;
27
+ this.newChart = chart;
28
+ }
29
+ clear() {
30
+ this.newChart.clear();
31
+ }
32
+ newValue(newvalue, seriechange, valuecaption, seriecaption) {
33
+ this.newChart.newValue(newvalue, seriechange, valuecaption, seriecaption);
34
+ }
35
+ newValueXY(newvalueX, newvalue, seriechange, valuecaption, seriecaption) {
36
+ this.newChart.newValueXY(newvalueX, newvalue, seriechange, valuecaption, seriecaption);
37
+ }
38
+ newFunction(functionName, functionParams, serieCaption) {
39
+ this.newChart.newFunction(functionName, functionParams, serieCaption);
40
+ }
41
+ graphicBounds(autol, autoh, lvalue, hvalue, logaritmic, logBase, inverted) {
42
+ this.newChart.graphicBounds(autol, autoh, lvalue, hvalue, logaritmic, logBase, inverted);
43
+ }
44
+ graphicColor(newcolor) {
45
+ this.newChart.graphicColor(newcolor);
46
+ }
47
+ graphicSerieColor(newcolor) {
48
+ this.newChart.graphicSerieColor(newcolor);
49
+ }
50
+ }
51
+ /** ChartItem: a chart built from expression driven series while the subreport runs. */
52
+ export class ChartItem extends PrintItemText {
53
+ /**
54
+ * The palette of the C# item (SeriesColors). C# parity: nothing reads it; the vector chart has
55
+ * a palette of its own.
56
+ */
57
+ static SERIES_COLORS = [
58
+ 0xff0000, 0xffddff, 0x00ff00, 0x0000ff, 0xffff00, 0xff00ff, 0x00ffff, 0xaaaaaa, 0xbb0000, 0x00bb00, 0x0000bb,
59
+ 0xbbbb00, 0xbb00bb, 0x00bbbb, 0x777777, 0x773333, 0x337733, 0x333377, 0x777700, 0x770077, 0x007777,
60
+ ];
61
+ /** The accumulated series (FSeries). */
62
+ series;
63
+ idenChart;
64
+ fClearValue = Variant.null;
65
+ fSerieValue = Variant.null;
66
+ changeSerieExpression;
67
+ clearExpression;
68
+ getValueCondition;
69
+ valueExpression;
70
+ valueXExpression;
71
+ captionExpression;
72
+ serieCaption;
73
+ colorExpression;
74
+ serieColorExpression;
75
+ changeSerieBool;
76
+ chartStyle;
77
+ identifier;
78
+ clearExpressionBool;
79
+ driver;
80
+ view3d;
81
+ view3dWalls;
82
+ perspective;
83
+ elevation;
84
+ rotation;
85
+ zoom;
86
+ horzOffset;
87
+ vertOffset;
88
+ tilt;
89
+ orthogonal;
90
+ multiBar;
91
+ resolution;
92
+ showLegend;
93
+ showHint;
94
+ markStyle;
95
+ horzFontSize;
96
+ vertFontSize;
97
+ horzFontRotation;
98
+ vertFontRotation;
99
+ autoRange;
100
+ axisYInitial;
101
+ axisYFinal;
102
+ /** The colours of the series saved with the report: only preserved, they do not change the chart. */
103
+ seriesColorsText;
104
+ constructor(report, model) {
105
+ super(report, model);
106
+ this.series = new Series();
107
+ this.series.logaritmic = false;
108
+ this.changeSerieExpression = model.changeSerieExpression;
109
+ this.clearExpression = model.clearExpression;
110
+ this.getValueCondition = model.getValueCondition;
111
+ this.valueExpression = model.valueExpression;
112
+ this.valueXExpression = model.valueXExpression;
113
+ this.captionExpression = model.captionExpression;
114
+ this.serieCaption = model.serieCaption;
115
+ this.colorExpression = model.colorExpression;
116
+ this.serieColorExpression = model.serieColorExpression;
117
+ this.changeSerieBool = model.changeSerieBool;
118
+ this.chartStyle = model.chartStyle;
119
+ this.identifier = model.identifier;
120
+ this.clearExpressionBool = model.clearExpressionBool;
121
+ this.driver = model.driver;
122
+ this.view3d = model.view3d;
123
+ this.view3dWalls = model.view3dWalls;
124
+ this.perspective = model.perspective;
125
+ this.elevation = model.elevation;
126
+ this.rotation = model.rotation;
127
+ this.zoom = model.zoom;
128
+ this.horzOffset = model.horzOffset;
129
+ this.vertOffset = model.vertOffset;
130
+ this.tilt = model.tilt;
131
+ this.orthogonal = model.orthogonal;
132
+ this.multiBar = model.multiBar;
133
+ this.resolution = model.resolution;
134
+ this.showLegend = model.showLegend;
135
+ this.showHint = model.showHint;
136
+ this.markStyle = model.markStyle;
137
+ this.horzFontSize = model.horzFontSize;
138
+ this.vertFontSize = model.vertFontSize;
139
+ this.horzFontRotation = model.horzFontRotation;
140
+ this.vertFontRotation = model.vertFontRotation;
141
+ this.autoRange = model.autoRange;
142
+ this.axisYInitial = model.axisYInitial;
143
+ this.axisYFinal = model.axisYFinal;
144
+ this.seriesColorsText = model.seriesColorsText;
145
+ this.idenChart = new IdenChart(report, this);
146
+ }
147
+ get ctx() {
148
+ return this.report.evaluator.context;
149
+ }
150
+ /** Clear: no series, and the value axis bounds of the item again. */
151
+ clear() {
152
+ this.series.clear();
153
+ this.series.highValue = this.axisYFinal;
154
+ this.series.lowValue = this.axisYInitial;
155
+ this.series.autoRange = this.autoRange;
156
+ }
157
+ /** The series start empty with the report; every record adds a value when the condition holds. */
158
+ subReportChanged(newstate, newgroup) {
159
+ switch (newstate) {
160
+ case SubReportEvent.Start:
161
+ this.fClearValue = Variant.null;
162
+ this.fSerieValue = Variant.null;
163
+ this.clear();
164
+ break;
165
+ case SubReportEvent.DataChange:
166
+ // Gets a value if the condition is true
167
+ if (this.checkValueCondition())
168
+ this.getNewValue();
169
+ break;
170
+ }
171
+ super.subReportChanged(newstate, newgroup);
172
+ }
173
+ getNewValue() {
174
+ if (this.valueExpression.length === 0)
175
+ return;
176
+ this.evaluateClearExpression();
177
+ let changeserie = this.evaluateChangeSerieExpression();
178
+ let seriecaption = '';
179
+ if (changeserie)
180
+ seriecaption = this.evaluateSerieCaption().toString(this.ctx);
181
+ let newcaption = '';
182
+ if (this.captionExpression.length > 0) {
183
+ // C# parity: string newcaption = Variant, the implicit conversion (null when not a string)
184
+ newcaption = this.evaluateText(this.captionExpression).toImplicitString(this.ctx);
185
+ if (this.series.seriesItems.length === 0) {
186
+ seriecaption = this.evaluateSerieCaption().toString(this.ctx);
187
+ changeserie = true;
188
+ }
189
+ }
190
+ const newvalue = this.evaluateText(this.valueExpression);
191
+ let newdoublevalue = 0;
192
+ if (!newvalue.isNull)
193
+ newdoublevalue = newvalue.toDouble(this.ctx);
194
+ if (this.valueXExpression.length > 0) {
195
+ const newvalueX = this.evaluateText(this.valueXExpression);
196
+ this.newValueXY(newvalueX, newdoublevalue, changeserie, newcaption, seriecaption);
197
+ }
198
+ else
199
+ this.newValue(newdoublevalue, changeserie, newcaption, seriecaption);
200
+ if (this.serieColorExpression.length > 0) {
201
+ const newcolor = this.evaluateText(this.serieColorExpression).toInt(this.ctx);
202
+ if (newcolor !== 0)
203
+ this.series.seriesItems[this.series.seriesItems.length - 1].color = newcolor;
204
+ }
205
+ if (this.colorExpression.length > 0) {
206
+ const newcolor = this.evaluateText(this.colorExpression).toInt(this.ctx);
207
+ if (newcolor !== 0) {
208
+ const nitem = this.series.seriesItems[this.series.seriesItems.length - 1];
209
+ nitem.colors[nitem.colors.length - 1] = newcolor;
210
+ }
211
+ }
212
+ }
213
+ evaluateText(ntext) {
214
+ const fevaluator = this.report.evaluator;
215
+ fevaluator.expression = ntext;
216
+ fevaluator.evaluate();
217
+ return fevaluator.result;
218
+ }
219
+ /** EvaluateClearExpression: the series are cleared when the clear expression triggers. */
220
+ evaluateClearExpression() {
221
+ if (this.clearExpression.length === 0)
222
+ return;
223
+ const fevaluator = this.report.evaluator;
224
+ try {
225
+ fevaluator.expression = this.clearExpression;
226
+ fevaluator.evaluate();
227
+ const aresult = fevaluator.result;
228
+ if (this.clearExpressionBool) {
229
+ if (aresult.toBool(fevaluator.context))
230
+ this.series.seriesItems.length = 0;
231
+ }
232
+ else if (Variant.notEquals(this.fClearValue, aresult, fevaluator.context)) {
233
+ this.series.seriesItems.length = 0;
234
+ this.fClearValue = aresult;
235
+ }
236
+ }
237
+ catch (e) {
238
+ throw new ReportException(messageOf(e) + '\n' + this.name + ' Prop:ClearExpression ', this.name, 'ClearExpression');
239
+ }
240
+ }
241
+ /** EvaluateChangeSerieExpression: a new series starts when the expression says so. */
242
+ evaluateChangeSerieExpression() {
243
+ if (this.changeSerieExpression.length === 0)
244
+ return false;
245
+ let nresult = false;
246
+ const fevaluator = this.report.evaluator;
247
+ try {
248
+ fevaluator.expression = this.changeSerieExpression;
249
+ fevaluator.evaluate();
250
+ const aresult = fevaluator.result;
251
+ if (this.changeSerieBool) {
252
+ if (aresult.toBool(fevaluator.context))
253
+ nresult = true;
254
+ }
255
+ else if (Variant.notEquals(this.fSerieValue, aresult, fevaluator.context)) {
256
+ this.fSerieValue = aresult;
257
+ nresult = true;
258
+ }
259
+ }
260
+ catch (e) {
261
+ throw new ReportException(messageOf(e) + '\n' + this.name + ' Prop:ChangeSerieExpression \n' + this.printCondition, this.name, 'ChangeSerieExpression');
262
+ }
263
+ return nresult;
264
+ }
265
+ /** EvaluateSerieCaption: the caption of a new series ("" without an expression). */
266
+ evaluateSerieCaption() {
267
+ if (this.serieCaption.length === 0)
268
+ return Variant.fromString('');
269
+ const fevaluator = this.report.evaluator;
270
+ try {
271
+ fevaluator.expression = this.serieCaption;
272
+ fevaluator.evaluate();
273
+ return fevaluator.result;
274
+ }
275
+ catch (e) {
276
+ throw new ReportException(messageOf(e) + '\n' + this.name + ' Prop:SerieCaption \n' + this.printCondition, this.name, 'SerieCaption');
277
+ }
278
+ }
279
+ /** CheckValueCondition: a value is collected only when the condition holds. */
280
+ checkValueCondition() {
281
+ if (this.getValueCondition.length === 0)
282
+ return true;
283
+ const fevaluator = this.report.evaluator;
284
+ try {
285
+ fevaluator.expression = this.getValueCondition;
286
+ fevaluator.evaluate();
287
+ return fevaluator.result.toBool(fevaluator.context);
288
+ }
289
+ catch (e) {
290
+ throw new ReportException(messageOf(e) + '\n' + this.name + ' Prop:GetValueCondition \n' + this.printCondition, this.name, 'GetValueCondition');
291
+ }
292
+ }
293
+ /** GetSeries: the current series; the first one takes the appearance of the item. */
294
+ getSeries(firstserie, seriecaption) {
295
+ const s = this.series;
296
+ if (s.seriesItems.length < 1) {
297
+ const aserie = new SeriesItem();
298
+ aserie.chartStyle = this.chartStyle;
299
+ firstserie.value = true;
300
+ aserie.caption = seriecaption;
301
+ s.fontSize = this.fontSize;
302
+ s.resolution = this.resolution;
303
+ s.showLegend = this.showLegend;
304
+ s.multiBar = this.multiBar;
305
+ s.markStyle = this.markStyle;
306
+ s.horzFontRotation = this.horzFontRotation;
307
+ s.vertFontRotation = this.vertFontRotation;
308
+ s.vertFontSize = this.vertFontSize;
309
+ s.horzFontSize = this.horzFontSize;
310
+ s.showHint = this.showHint;
311
+ s.effect3D = this.view3d;
312
+ s.seriesItems.push(aserie);
313
+ return aserie;
314
+ }
315
+ return s.seriesItems[s.seriesItems.length - 1];
316
+ }
317
+ /** NewValue: a value in the current series, or in a new one. */
318
+ newValue(newvalue, seriechange, valuecaption, seriecaption) {
319
+ this.newValueXY(null, newvalue, seriechange, valuecaption, seriecaption);
320
+ }
321
+ /** GraphicBounds: the range and scale of the value axis. */
322
+ graphicBounds(autol, autoh, lvalue, hvalue, logaritmic, logBase, inverted) {
323
+ const s = this.series;
324
+ if (autol)
325
+ s.autoRange = autoh ? AutoRangeAxis.AutoBoth : AutoRangeAxis.AutoLower;
326
+ else
327
+ s.autoRange = autoh ? AutoRangeAxis.AutoUpper : AutoRangeAxis.None;
328
+ s.logaritmic = logaritmic;
329
+ s.logBase = logBase;
330
+ s.inverted = inverted;
331
+ s.lowValue = lvalue;
332
+ s.highValue = hvalue;
333
+ }
334
+ /** NewFunction: a series computed from the others (only when there is a series already). */
335
+ newFunction(functionName, functionParams, serieCaption) {
336
+ if (this.series.seriesItems.length > 0) {
337
+ const itemFunc = new SeriesItem();
338
+ itemFunc.caption = serieCaption;
339
+ itemFunc.functionName = functionName;
340
+ itemFunc.functionParams = functionParams;
341
+ this.series.seriesItems.push(itemFunc);
342
+ }
343
+ }
344
+ /** NewValueXY: an X (a number, a date, or none) and Y value, in the current series or a new one. */
345
+ newValueXY(newvalueX, newvalue, seriechange, valuecaption, seriecaption) {
346
+ const firstserie = { value: false };
347
+ let aserie = this.getSeries(firstserie, seriecaption);
348
+ if (seriechange) {
349
+ if (!firstserie.value) {
350
+ aserie = new SeriesItem();
351
+ aserie.chartStyle = this.chartStyle;
352
+ aserie.caption = seriecaption;
353
+ this.series.seriesItems.push(aserie);
354
+ }
355
+ }
356
+ aserie.values.push(newvalue);
357
+ aserie.valueCaptions.push(valuecaption);
358
+ aserie.colors.push(aserie.color);
359
+ if (newvalueX !== null) {
360
+ if (newvalueX instanceof Variant) {
361
+ if (newvalueX.isDateTime())
362
+ aserie.valuesX.push(newvalueX.toDateTime(this.ctx));
363
+ else
364
+ aserie.valuesX.push(newvalueX.toDouble(this.ctx));
365
+ }
366
+ else
367
+ aserie.valuesX.push(newvalueX);
368
+ }
369
+ }
370
+ /** GraphicColor: the colour of the last value of the current series. */
371
+ graphicColor(newcolor) {
372
+ if (this.series.seriesItems.length === 0)
373
+ return;
374
+ this.series.seriesItems[this.series.seriesItems.length - 1].setLastValueColor(newcolor);
375
+ }
376
+ /** GraphicSerieColor: the colour of the current series. */
377
+ graphicSerieColor(newcolor) {
378
+ if (this.series.seriesItems.length === 0)
379
+ return;
380
+ this.series.seriesItems[this.series.seriesItems.length - 1].color = newcolor;
381
+ }
382
+ /** DoPrint: the series drawn by the charting driver of the report, else by the device. */
383
+ doPrint(adriver, aposx, aposy, newwidth, newheight, metafile, maxExtent, partialPrint) {
384
+ super.doPrint(adriver, aposx, aposy, newwidth, newheight, metafile, maxExtent, partialPrint);
385
+ this.series.printWidth = this.printWidth;
386
+ this.series.printHeight = this.printHeight;
387
+ if (this.series.seriesItems.length === 0)
388
+ return;
389
+ const chartingDriver = this.report.chartingDriver;
390
+ if (chartingDriver !== null)
391
+ this.drawChart(chartingDriver, metafile, aposx, aposy);
392
+ else
393
+ this.drawChart(adriver, metafile, aposx, aposy);
394
+ }
395
+ /** PrintOut.DrawChart: the device's own chart support, else the vector chart (VectorChart.Draw). */
396
+ drawChart(driver, metafile, posx, posy) {
397
+ if (driver.drawChart !== undefined)
398
+ driver.drawChart(this.series, metafile, posx, posy, this);
399
+ else
400
+ drawVectorChart(this.series, metafile, posx, posy, this, this.report.culture);
401
+ }
402
+ }
403
+ //# sourceMappingURL=chartitem.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chartitem.js","sourceRoot":"","sources":["../../../src/report/chart/chartitem.ts"],"names":[],"mappings":"AAAA,gGAAgG;AAChG,iGAAiG;AACjG,iGAAiG;AACjG,8FAA8F;AAC9F,kGAAkG;AAClG,kGAAkG;AAGlG,OAAO,EAAE,aAAa,EAAmC,MAAM,gBAAgB,CAAC;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,4BA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AS,EAAE,YAAY,CAAC,CAAC;QAC7F,IAAI,CAAC,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC;QACzC,IAAI,CAAC,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC;QAE3C,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO;QACjD,MAAM,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC;QAClD,IAAI,cAAc,KAAK,IAAI;YAAE,IAAI,CAAC,SAAS,CAAC,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;;YAC/E,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACvD,CAAC;IAED,oGAAoG;IAC5F,SAAS,CAAC,MAAgB,EAAE,QAAkB,EAAE,IAAY,EAAE,IAAY;QAChF,IAAI,MAAM,CAAC,SAAS,KAAK,SAAS;YAAE,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;;YACzF,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACrF,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { AutoRangeAxis, BarType, ChartType } from '@reportman/lib';
2
+ import type { RpDateTime } from '../../util/datetime.js';
3
+ /** A chart's appearance, its value axis and the series it contains (Series). */
4
+ export declare class Series {
5
+ /** How the value axis range is computed (with LowValue and HighValue). */
6
+ autoRange: AutoRangeAxis;
7
+ /** Lower bound of the value axis when it is fixed. */
8
+ lowValue: number;
9
+ /** Upper bound of the value axis when it is fixed. */
10
+ highValue: number;
11
+ /** The value axis uses a logarithmic scale. */
12
+ logaritmic: boolean;
13
+ /** Base of the logarithmic scale. */
14
+ logBase: number;
15
+ /** The value axis is inverted. */
16
+ inverted: boolean;
17
+ /** Font size of the chart texts, in points (a C# float). */
18
+ fontSize: number;
19
+ /** Resolution of the chart, in dots per inch (a C# float). */
20
+ resolution: number;
21
+ showLegend: boolean;
22
+ horzFontRotation: number;
23
+ vertFontRotation: number;
24
+ vertFontSize: number;
25
+ horzFontSize: number;
26
+ showHint: boolean;
27
+ /** Width the chart item printed with, in twips. */
28
+ printWidth: number;
29
+ /** Height the chart item printed with, in twips. */
30
+ printHeight: number;
31
+ effect3D: boolean;
32
+ markStyle: number;
33
+ /** How several bar series are combined. */
34
+ multiBar: BarType;
35
+ /** The series of the chart. */
36
+ readonly seriesItems: SeriesItem[];
37
+ /** Removes every series. */
38
+ clear(): void;
39
+ }
40
+ /** One series of a chart: its values, the colour and caption of each one, its own caption (SeriesItem). */
41
+ export declare class SeriesItem {
42
+ /** The values (Y) of the points. */
43
+ readonly values: number[];
44
+ /** The X values of the points (a number or a date), when the chart has an X expression. */
45
+ readonly valuesX: (number | RpDateTime)[];
46
+ /** The colour of each point, -1 for the colour of the series. */
47
+ readonly colors: number[];
48
+ /**
49
+ * The caption of each point. C# parity: a caption expression whose result is not a string gives
50
+ * null (the implicit string conversion of a Variant), drawn as no caption.
51
+ */
52
+ readonly valueCaptions: (string | null)[];
53
+ /** The colour of the series, -1 for the palette colour. */
54
+ color: number;
55
+ caption: string;
56
+ maxValue: number;
57
+ minValue: number;
58
+ chartStyle: ChartType;
59
+ /** The function of a function series (GRAPHICNEWFUNCTION), null for a series of values. */
60
+ functionName: string | null;
61
+ functionParams: string | null;
62
+ /** The colour of the last point; nothing when the series has no points. */
63
+ setLastValueColor(newcolor: number): void;
64
+ }
65
+ //# sourceMappingURL=series.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series.d.ts","sourceRoot":"","sources":["../../../src/report/chart/series.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,aAAa,EAAE,O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,SAAS,CAAiB;IACtC,2FAA2F;IAC3F,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IACnC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAQ;IAErC,2EAA2E;IAC3E,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAI1C"}
@@ -0,0 +1,74 @@
1
+ // Port of Reportman.Drawing.Series (Series.cs): the data a chart item accumulates while its
2
+ // subreport runs (its series, their values, captions and colours) and the appearance and axis
3
+ // settings it is drawn with. A device with a chart support of its own (PrintOut.drawChart)
4
+ // receives a Series; the others draw it with the vector chart (vectorchart.ts).
5
+ import { AutoRangeAxis, BarType, ChartType } from '@reportman/lib';
6
+ /** A chart's appearance, its value axis and the series it contains (Series). */
7
+ export class Series {
8
+ /** How the value axis range is computed (with LowValue and HighValue). */
9
+ autoRange = AutoRangeAxis.Default;
10
+ /** Lower bound of the value axis when it is fixed. */
11
+ lowValue = 0.0;
12
+ /** Upper bound of the value axis when it is fixed. */
13
+ highValue = 0.0;
14
+ /** The value axis uses a logarithmic scale. */
15
+ logaritmic = false;
16
+ /** Base of the logarithmic scale. */
17
+ logBase = 0.0;
18
+ /** The value axis is inverted. */
19
+ inverted = false;
20
+ /** Font size of the chart texts, in points (a C# float). */
21
+ fontSize = 0;
22
+ /** Resolution of the chart, in dots per inch (a C# float). */
23
+ resolution = 100;
24
+ showLegend = false;
25
+ horzFontRotation = 0;
26
+ vertFontRotation = 0;
27
+ vertFontSize = 0;
28
+ horzFontSize = 0;
29
+ showHint = false;
30
+ /** Width the chart item printed with, in twips. */
31
+ printWidth = 0;
32
+ /** Height the chart item printed with, in twips. */
33
+ printHeight = 0;
34
+ effect3D = false;
35
+ markStyle = 0;
36
+ /** How several bar series are combined. */
37
+ multiBar = BarType.None;
38
+ /** The series of the chart. */
39
+ seriesItems = [];
40
+ /** Removes every series. */
41
+ clear() {
42
+ this.seriesItems.length = 0;
43
+ }
44
+ }
45
+ /** One series of a chart: its values, the colour and caption of each one, its own caption (SeriesItem). */
46
+ export class SeriesItem {
47
+ /** The values (Y) of the points. */
48
+ values = [];
49
+ /** The X values of the points (a number or a date), when the chart has an X expression. */
50
+ valuesX = [];
51
+ /** The colour of each point, -1 for the colour of the series. */
52
+ colors = [];
53
+ /**
54
+ * The caption of each point. C# parity: a caption expression whose result is not a string gives
55
+ * null (the implicit string conversion of a Variant), drawn as no caption.
56
+ */
57
+ valueCaptions = [];
58
+ /** The colour of the series, -1 for the palette colour. */
59
+ color = -1;
60
+ caption = '';
61
+ maxValue = -10e300;
62
+ minValue = +10e300;
63
+ chartStyle = ChartType.Bar;
64
+ /** The function of a function series (GRAPHICNEWFUNCTION), null for a series of values. */
65
+ functionName = null;
66
+ functionParams = null;
67
+ /** The colour of the last point; nothing when the series has no points. */
68
+ setLastValueColor(newcolor) {
69
+ if (this.colors.length === 0)
70
+ return;
71
+ this.colors[this.colors.length - 1] = newcolor;
72
+ }
73
+ }
74
+ //# sourceMappingURL=series.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"series.js","sourceRoot":"","sources":["../../../src/report/chart/series.ts"],"names":[],"mappings":"AAAA,4FAA4F;AAC5F,8FAA8F;AAC9F,2FAA2F;AAC3F,gFAAgF;AAEhF,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGnE,gFAAgF;AAChF,MAAM,OAAO,MAAM;IACjB,0EAA0E;IAC1E,SAAS,GAAkB,aAAa,CAAC,OAAO,CAAC;IACjD,sDAAsD;IACtD,QAAQ,GAAG,GAAG,CAAC;IACf,sDAAsD;IACtD,SAAS,GAAG,GAAG,CAAC;IAChB,+CAA+C;IAC/C,UAAU,GAAG,KAAK,CAAC;IACnB,qCAAqC;IACrC,OAAO,GAAG,GAAG,CAAC;IACd,kCAAkC;IAClC,QAAQ,GAAG,KAAK,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,GAAG,CAAC,CAAC;IACb,8DAA8D;IAC9D,UAAU,GAA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CAAC,GAAG,QAAQ,CAAC;IACjD,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import { type MetaFile } from '@reportman/metafile';
2
+ import type { CultureInfo } from '../../util/culture.js';
3
+ import type { Series } from './series.js';
4
+ /** The same palette the GDI driver uses, as Report Manager colours (BGR). */
5
+ export declare const VECTOR_CHART_SERIES_COLORS: readonly number[];
6
+ /**
7
+ * Draws the series at the given position (twips) with the size the chart item printed with
8
+ * (VectorChart.Draw).
9
+ *
10
+ * @param series The accumulated series of the chart.
11
+ * @param metafile The metafile that receives the objects, on its current page.
12
+ * @param posx Left of the chart, in twips.
13
+ * @param posy Top of the chart, in twips.
14
+ * @param chart The chart item (a text item): its font is used for the labels.
15
+ * @param culture The current culture, for the numbers of the value axis.
16
+ */
17
+ export declare function drawVectorChart(series: Series | null, metafile: MetaFile, posx: number, posy: number, chart: unknown, culture: CultureInfo): void;
18
+ //# sourceMappingURL=vectorchart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vectorchart.d.ts","sourceRoot":"","sources":["../../../src/report/chart/vectorchart.ts"],"names":[],"mappings":"AAUA,OAAO,EAUL,KAAK,QAAQ,EAEd,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,OAAO,KAAK,EAAE,MAAM,EAAc,MAAM,aAAa,CAAC;AAEtD,6EAA6E;AAC7E,eAAO,MAAM,0BAA0B,EAAE,SAAS,MAAM,EAGvD,CAAC;AA2BF;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,MAAM,GAAG,IAAI,EACrB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,OAAO,EACd,OAAO,EAAE,WAAW,GACnB,IAAI,CA+MN"}