@boldreports/javascript-reporting-extensions 8.1.8 → 9.1.8
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.
- package/barcode.reportitem.js +48 -47
- package/document.reportitem.css +28 -0
- package/extension.config.js +15 -2
- package/htmldocument.reportitem.js +481 -0
- package/images/html_design_panel_icon.svg +6 -0
- package/images/html_widget_icon.svg +5 -0
- package/images/pdf_design_panel_icon.svg +8 -0
- package/images/pdf_widget_icon.svg +7 -0
- package/images/shapes.svg +8 -0
- package/package.json +1 -1
- package/pdf.signature.reportitem.js +29 -28
- package/pdfdocument.reportitem.js +348 -0
- package/qrbarcode.reportitem.js +84 -83
- package/shape.reportitem.css +6 -0
- package/shape.reportitem.js +1358 -0
- package/signature.reportitem.js +29 -28
|
@@ -0,0 +1,1358 @@
|
|
|
1
|
+
var EJShape = (function () {
|
|
2
|
+
function EJShape(instance) {
|
|
3
|
+
this.customJSON = null;
|
|
4
|
+
this.rootElement = null;
|
|
5
|
+
this.customItemDiv = null;
|
|
6
|
+
this.instance = null;
|
|
7
|
+
this.instance = instance;
|
|
8
|
+
}
|
|
9
|
+
EJShape.prototype.initializeItem = function (args) {
|
|
10
|
+
args.isBuildInService = false;
|
|
11
|
+
args.defaultHeight = 150;
|
|
12
|
+
args.defaultWidth = 150;
|
|
13
|
+
args.minimumHeight = 15;
|
|
14
|
+
args.minimumWidth = 15;
|
|
15
|
+
};
|
|
16
|
+
EJShape.prototype.renderItem = function (customJson, target, eventData) {
|
|
17
|
+
if (eventData.eventName === 'begin') {
|
|
18
|
+
this.customJSON = customJson;
|
|
19
|
+
this.rootElement = target;
|
|
20
|
+
this.initializeShape(eventData.isTablixCell);
|
|
21
|
+
}
|
|
22
|
+
else if (eventData.eventName === 'complete') {
|
|
23
|
+
this.updateStyle(customJson.Style, eventData.isTablixCell);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
EJShape.prototype.initializeShape = function (isTablixCell) {
|
|
27
|
+
var bgColor = (this.customJSON && this.customJSON.Style && this.customJSON.Style.BackgroundColor)
|
|
28
|
+
? this.customJSON.Style.BackgroundColor : 'Transparent';
|
|
29
|
+
this.customItemDiv = ej.buildTag('div.customitem', '', {
|
|
30
|
+
'width': '100%', 'height': '100%', 'box-sizing': 'border-box', '-moz-box-sizing': 'border-box', 'background-color': bgColor,
|
|
31
|
+
'border': isTablixCell ? '1px dotted gray' : '1px none gray',
|
|
32
|
+
}, {
|
|
33
|
+
'id': this.customJSON.Name + '_customItem'
|
|
34
|
+
});
|
|
35
|
+
this.rootElement.append(this.customItemDiv);
|
|
36
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
37
|
+
};
|
|
38
|
+
EJShape.prototype.renderShape = function (target, customJson) {
|
|
39
|
+
var shapeInfo = this.getShapeInfo(customJson);
|
|
40
|
+
switch (shapeInfo.shapeType.toLowerCase()) {
|
|
41
|
+
case 'rectangle':
|
|
42
|
+
this.renderRectangle(target, shapeInfo);
|
|
43
|
+
break;
|
|
44
|
+
case 'hexagon':
|
|
45
|
+
case 'pentagon':
|
|
46
|
+
case 'octagon':
|
|
47
|
+
this.renderPolygon(target, shapeInfo);
|
|
48
|
+
break;
|
|
49
|
+
case 'triangle':
|
|
50
|
+
case 'rightangletriangle':
|
|
51
|
+
this.renderTriangle(target, shapeInfo);
|
|
52
|
+
break;
|
|
53
|
+
case 'star':
|
|
54
|
+
this.renderStar(target, shapeInfo);
|
|
55
|
+
break;
|
|
56
|
+
case 'leftarrow':
|
|
57
|
+
case 'rightarrow':
|
|
58
|
+
case 'uparrow':
|
|
59
|
+
case 'downarrow':
|
|
60
|
+
this.renderArrow(target, shapeInfo);
|
|
61
|
+
break;
|
|
62
|
+
case 'ellipse':
|
|
63
|
+
this.renderEllipse(target, shapeInfo);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
EJShape.prototype.getShapeInfo = function (customJson) {
|
|
68
|
+
var svgHeight = this.getSvgHeight(customJson);
|
|
69
|
+
var svgWidth = this.getSvgWidth(customJson);
|
|
70
|
+
var shapeType = this.getPropertyVal('ShapeType', customJson);
|
|
71
|
+
var angle = this.getPropertyVal('RotationAngle', customJson);
|
|
72
|
+
var fillColor = this.getPropertyVal('FillColor', customJson);
|
|
73
|
+
var strokeColor = this.getPropertyVal('LineColor', customJson);
|
|
74
|
+
var strokeStyle = this.getPropertyVal('LineStyle', customJson);
|
|
75
|
+
var strokeWidth = this.getPropertyVal('LineWidth', customJson);
|
|
76
|
+
var starCount = this.getPropertyVal('StarCount', customJson);
|
|
77
|
+
var starConcavity = this.getPropertyVal('Concavity', customJson);
|
|
78
|
+
var arrowWidth = this.getPropertyVal('ArrowWidth', customJson);
|
|
79
|
+
var arrowHeight = this.getPropertyVal('ArrowHeight', customJson);
|
|
80
|
+
return {
|
|
81
|
+
shapeType: shapeType ? shapeType : 'Ellipse', svgHeight: svgHeight, svgWidth: svgWidth, angle: angle ? angle : '0',
|
|
82
|
+
fillColor: fillColor ? fillColor : 'Transparent', strokeWidth: strokeWidth ? strokeWidth : '1',
|
|
83
|
+
strokeColor: strokeColor ? strokeColor : 'Black', strokeStyle: strokeStyle ? strokeStyle : 'Solid',
|
|
84
|
+
arrowWidth: arrowWidth ? arrowWidth : '50', arrowHeight: arrowHeight ? arrowHeight : '50',
|
|
85
|
+
starCount: starCount ? starCount : '5', starConcavity: starConcavity ? starConcavity : '0.5'
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
EJShape.prototype.renderEllipse = function (target, shapeInfo) {
|
|
89
|
+
var rx = shapeInfo.svgWidth / 2;
|
|
90
|
+
var ry = shapeInfo.svgHeight / 2;
|
|
91
|
+
shapeInfo.angle = parseFloat(shapeInfo.angle) % 360;
|
|
92
|
+
var angleRad = (shapeInfo.angle * Math.PI) / 180;
|
|
93
|
+
var sinValue = Math.sin(angleRad);
|
|
94
|
+
var cosValue = Math.cos(angleRad);
|
|
95
|
+
var rotatedWidth = Math.abs(shapeInfo.svgWidth * cosValue) + Math.abs(shapeInfo.svgHeight * sinValue);
|
|
96
|
+
var rotatedHeight = Math.abs(shapeInfo.svgWidth * sinValue) + Math.abs(shapeInfo.svgHeight * cosValue);
|
|
97
|
+
var ellipsePoints = [
|
|
98
|
+
{ x: -rx, y: 0 },
|
|
99
|
+
{ x: 0, y: -ry },
|
|
100
|
+
{ x: rx, y: 0 },
|
|
101
|
+
{ x: 0, y: ry }
|
|
102
|
+
];
|
|
103
|
+
var rotatedEllipsePoints = ellipsePoints.map(function (point) { return ({
|
|
104
|
+
x: point.x * cosValue - point.y * sinValue,
|
|
105
|
+
y: point.x * sinValue + point.y * cosValue
|
|
106
|
+
}); });
|
|
107
|
+
var pathData = " M " + rotatedEllipsePoints[0].x + " " + rotatedEllipsePoints[0].y + "\n A " + rx + " " + ry + " " + shapeInfo.angle + " 0 1 " + rotatedEllipsePoints[2].x + " " + rotatedEllipsePoints[2].y + "\n A " + rx + " " + ry + " " + shapeInfo.angle + " 0 1 " + rotatedEllipsePoints[0].x + " " + rotatedEllipsePoints[0].y + "\n Z";
|
|
108
|
+
var viewBox = -rotatedWidth / 2 + " " + -rotatedHeight / 2 + " " + (rotatedWidth + 2) + " " + (rotatedHeight + 2);
|
|
109
|
+
this.renderSvg(target, pathData, viewBox, shapeInfo);
|
|
110
|
+
};
|
|
111
|
+
EJShape.prototype.renderRectangle = function (target, shapeInfo) {
|
|
112
|
+
var halfWidth = shapeInfo.svgWidth / 2;
|
|
113
|
+
var halfHeight = shapeInfo.svgHeight / 2;
|
|
114
|
+
var angleRad = (parseFloat(shapeInfo.angle) % 360 * Math.PI) / 180;
|
|
115
|
+
var sinValue = Math.sin(angleRad);
|
|
116
|
+
var cosValue = Math.cos(angleRad);
|
|
117
|
+
var rotatedWidth = Math.abs(shapeInfo.svgWidth * cosValue) + Math.abs(shapeInfo.svgHeight * sinValue);
|
|
118
|
+
var rotatedHeight = Math.abs(shapeInfo.svgWidth * sinValue) + Math.abs(shapeInfo.svgHeight * cosValue);
|
|
119
|
+
var corners = [
|
|
120
|
+
{ x: -halfWidth, y: -halfHeight },
|
|
121
|
+
{ x: halfWidth, y: -halfHeight },
|
|
122
|
+
{ x: halfWidth, y: halfHeight },
|
|
123
|
+
{ x: -halfWidth, y: halfHeight }
|
|
124
|
+
];
|
|
125
|
+
var rotatedPoints = corners.map(function (corner) { return ({
|
|
126
|
+
x: corner.x * cosValue - corner.y * sinValue,
|
|
127
|
+
y: corner.x * sinValue + corner.y * cosValue
|
|
128
|
+
}); });
|
|
129
|
+
var pathData = this.getPathData(rotatedPoints);
|
|
130
|
+
var viewBox = -rotatedWidth / 2 + " " + -rotatedHeight / 2 + " " + (rotatedWidth + 2) + " " + (rotatedHeight + 2);
|
|
131
|
+
this.renderSvg(target, pathData, viewBox, shapeInfo);
|
|
132
|
+
};
|
|
133
|
+
EJShape.prototype.renderTriangle = function (target, shapeInfo) {
|
|
134
|
+
var halfWidth = shapeInfo.svgWidth / 2;
|
|
135
|
+
var halfHeight = shapeInfo.svgHeight / 2;
|
|
136
|
+
var angleRad = (parseFloat(shapeInfo.angle) % 360 * Math.PI) / 180;
|
|
137
|
+
var sinValue = Math.sin(angleRad);
|
|
138
|
+
var cosValue = Math.cos(angleRad);
|
|
139
|
+
var points = [];
|
|
140
|
+
var shapeType = shapeInfo.shapeType.toLowerCase();
|
|
141
|
+
if (shapeType === 'triangle') {
|
|
142
|
+
points = [
|
|
143
|
+
{ x: -halfWidth, y: halfHeight },
|
|
144
|
+
{ x: halfWidth, y: halfHeight },
|
|
145
|
+
{ x: 0, y: -halfHeight }
|
|
146
|
+
];
|
|
147
|
+
}
|
|
148
|
+
else if (shapeType === 'rightangletriangle') {
|
|
149
|
+
points = [
|
|
150
|
+
{ x: -halfWidth, y: halfHeight },
|
|
151
|
+
{ x: halfWidth, y: halfHeight },
|
|
152
|
+
{ x: -halfWidth, y: -halfHeight }
|
|
153
|
+
];
|
|
154
|
+
}
|
|
155
|
+
var rotatedPoints = points.map(function (corner) { return ({
|
|
156
|
+
x: corner.x * cosValue - corner.y * sinValue,
|
|
157
|
+
y: corner.x * sinValue + corner.y * cosValue
|
|
158
|
+
}); });
|
|
159
|
+
var pathData = this.getPathData(rotatedPoints);
|
|
160
|
+
var viewBox = this.getViewBox(rotatedPoints);
|
|
161
|
+
this.renderSvg(target, pathData, viewBox, shapeInfo);
|
|
162
|
+
};
|
|
163
|
+
EJShape.prototype.renderArrow = function (target, shapeInfo) {
|
|
164
|
+
var halfWidth = shapeInfo.svgWidth / 2;
|
|
165
|
+
var halfHeight = shapeInfo.svgHeight / 2;
|
|
166
|
+
var angleRad = (parseFloat(shapeInfo.angle) % 360 * Math.PI) / 180;
|
|
167
|
+
var sinValue = Math.sin(angleRad);
|
|
168
|
+
var cosValue = Math.cos(angleRad);
|
|
169
|
+
var points = [];
|
|
170
|
+
var maxArrowWidth = shapeInfo.svgWidth * 0.5;
|
|
171
|
+
var maxArrowHeight = shapeInfo.svgHeight * 0.5;
|
|
172
|
+
var arrowWidth = parseFloat(shapeInfo.arrowWidth);
|
|
173
|
+
var arrowHeight = parseFloat(shapeInfo.arrowHeight);
|
|
174
|
+
var shapeType = shapeInfo.shapeType.toLowerCase();
|
|
175
|
+
if (shapeType === 'rightarrow') {
|
|
176
|
+
arrowWidth = Math.min(arrowWidth, maxArrowHeight);
|
|
177
|
+
arrowHeight = Math.min(arrowHeight, maxArrowWidth);
|
|
178
|
+
points = [
|
|
179
|
+
{ x: -halfWidth, y: -arrowWidth / 2 },
|
|
180
|
+
{ x: halfWidth - arrowHeight, y: -arrowWidth / 2 },
|
|
181
|
+
{ x: halfWidth - arrowHeight, y: -halfHeight },
|
|
182
|
+
{ x: halfWidth, y: 0 },
|
|
183
|
+
{ x: halfWidth - arrowHeight, y: halfHeight },
|
|
184
|
+
{ x: halfWidth - arrowHeight, y: arrowWidth / 2 },
|
|
185
|
+
{ x: -halfWidth, y: arrowWidth / 2 },
|
|
186
|
+
{ x: -halfWidth, y: -arrowWidth / 2 }
|
|
187
|
+
];
|
|
188
|
+
}
|
|
189
|
+
else if (shapeType === 'leftarrow') {
|
|
190
|
+
arrowWidth = Math.min(arrowWidth, maxArrowHeight);
|
|
191
|
+
arrowHeight = Math.min(arrowHeight, maxArrowWidth);
|
|
192
|
+
points = [
|
|
193
|
+
{ x: halfWidth, y: -arrowWidth / 2 },
|
|
194
|
+
{ x: -halfWidth + arrowHeight, y: -arrowWidth / 2 },
|
|
195
|
+
{ x: -halfWidth + arrowHeight, y: -halfHeight },
|
|
196
|
+
{ x: -halfWidth, y: 0 },
|
|
197
|
+
{ x: -halfWidth + arrowHeight, y: halfHeight },
|
|
198
|
+
{ x: -halfWidth + arrowHeight, y: arrowWidth / 2 },
|
|
199
|
+
{ x: halfWidth, y: arrowWidth / 2 },
|
|
200
|
+
{ x: halfWidth, y: -arrowWidth / 2 }
|
|
201
|
+
];
|
|
202
|
+
}
|
|
203
|
+
else if (shapeType === 'uparrow') {
|
|
204
|
+
arrowWidth = Math.min(arrowWidth, maxArrowWidth);
|
|
205
|
+
arrowHeight = Math.min(arrowHeight, maxArrowHeight);
|
|
206
|
+
points = [
|
|
207
|
+
{ x: -arrowWidth / 2, y: halfHeight },
|
|
208
|
+
{ x: -arrowWidth / 2, y: -halfHeight + arrowHeight },
|
|
209
|
+
{ x: -halfWidth, y: -halfHeight + arrowHeight },
|
|
210
|
+
{ x: 0, y: -halfHeight },
|
|
211
|
+
{ x: halfWidth, y: -halfHeight + arrowHeight },
|
|
212
|
+
{ x: arrowWidth / 2, y: -halfHeight + arrowHeight },
|
|
213
|
+
{ x: arrowWidth / 2, y: halfHeight },
|
|
214
|
+
{ x: -arrowWidth / 2, y: halfHeight }
|
|
215
|
+
];
|
|
216
|
+
}
|
|
217
|
+
else if (shapeType === 'downarrow') {
|
|
218
|
+
arrowWidth = Math.min(arrowWidth, maxArrowWidth);
|
|
219
|
+
arrowHeight = Math.min(arrowHeight, maxArrowHeight);
|
|
220
|
+
points = [
|
|
221
|
+
{ x: -arrowWidth / 2, y: -halfHeight },
|
|
222
|
+
{ x: -arrowWidth / 2, y: halfHeight - arrowHeight },
|
|
223
|
+
{ x: -halfWidth, y: halfHeight - arrowHeight },
|
|
224
|
+
{ x: 0, y: halfHeight },
|
|
225
|
+
{ x: halfWidth, y: halfHeight - arrowHeight },
|
|
226
|
+
{ x: arrowWidth / 2, y: halfHeight - arrowHeight },
|
|
227
|
+
{ x: arrowWidth / 2, y: -halfHeight },
|
|
228
|
+
{ x: -arrowWidth / 2, y: -halfHeight }
|
|
229
|
+
];
|
|
230
|
+
}
|
|
231
|
+
var rotatedPoints = points.map(function (point) { return ({
|
|
232
|
+
x: point.x * cosValue - point.y * sinValue,
|
|
233
|
+
y: point.x * sinValue + point.y * cosValue
|
|
234
|
+
}); });
|
|
235
|
+
var pathData = this.getPathData(rotatedPoints);
|
|
236
|
+
var viewBox = this.getViewBox(rotatedPoints);
|
|
237
|
+
this.renderSvg(target, pathData, viewBox, shapeInfo);
|
|
238
|
+
};
|
|
239
|
+
EJShape.prototype.renderStar = function (target, shapeInfo) {
|
|
240
|
+
var halfWidth = shapeInfo.svgWidth / 2;
|
|
241
|
+
var halfHeight = shapeInfo.svgHeight / 2;
|
|
242
|
+
var angleRad = (parseFloat(shapeInfo.angle) % 360 * Math.PI) / 180;
|
|
243
|
+
var sinValue = Math.sin(angleRad);
|
|
244
|
+
var cosValue = Math.cos(angleRad);
|
|
245
|
+
var aspectRatio = shapeInfo.svgWidth / shapeInfo.svgHeight;
|
|
246
|
+
var radius = Math.min(shapeInfo.svgWidth, shapeInfo.svgHeight) * 0.45;
|
|
247
|
+
var outerRadiusX = radius * (aspectRatio > 1 ? 1 : aspectRatio);
|
|
248
|
+
var outerRadiusY = radius * (aspectRatio < 1 ? 1 : 1 / aspectRatio);
|
|
249
|
+
var concavityFactor = Math.pow(parseFloat(shapeInfo.starConcavity), 1.5);
|
|
250
|
+
var innerRadiusX = outerRadiusX * concavityFactor;
|
|
251
|
+
var innerRadiusY = outerRadiusY * concavityFactor;
|
|
252
|
+
var angleIncrement = (2 * Math.PI) / parseFloat(shapeInfo.starCount);
|
|
253
|
+
var startAngle = -Math.PI / 2;
|
|
254
|
+
var points = [];
|
|
255
|
+
for (var index = 0; index < parseFloat(shapeInfo.starCount); index++) {
|
|
256
|
+
var outerAngle = startAngle + index * angleIncrement;
|
|
257
|
+
var innerAngle = outerAngle + angleIncrement / 2;
|
|
258
|
+
points.push({
|
|
259
|
+
x: halfWidth + Math.cos(outerAngle) * outerRadiusX,
|
|
260
|
+
y: halfHeight + Math.sin(outerAngle) * outerRadiusY
|
|
261
|
+
});
|
|
262
|
+
points.push({
|
|
263
|
+
x: halfWidth + Math.cos(innerAngle) * innerRadiusX,
|
|
264
|
+
y: halfHeight + Math.sin(innerAngle) * innerRadiusY
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
var rotatedPoints = points.map(function (point) { return ({
|
|
268
|
+
x: (point.x - halfWidth) * cosValue - (point.y - halfHeight) * sinValue + halfWidth,
|
|
269
|
+
y: (point.x - halfWidth) * sinValue + (point.y - halfHeight) * cosValue + halfHeight
|
|
270
|
+
}); });
|
|
271
|
+
var pathData = this.getPathData(rotatedPoints);
|
|
272
|
+
var viewBox = this.getViewBox(rotatedPoints);
|
|
273
|
+
this.renderSvg(target, pathData, viewBox, shapeInfo);
|
|
274
|
+
};
|
|
275
|
+
EJShape.prototype.renderPolygon = function (target, shapeInfo) {
|
|
276
|
+
var maxRadiusX = shapeInfo.svgWidth / 2;
|
|
277
|
+
var maxRadiusY = shapeInfo.svgHeight / 2;
|
|
278
|
+
var angleRad = (parseFloat(shapeInfo.angle) % 360 * Math.PI) / 180;
|
|
279
|
+
var sinValue = Math.sin(angleRad);
|
|
280
|
+
var cosValue = Math.cos(angleRad);
|
|
281
|
+
var points = [];
|
|
282
|
+
var shapeType = shapeInfo.shapeType.toLowerCase();
|
|
283
|
+
if (shapeType === 'octagon') {
|
|
284
|
+
for (var index = 0; index < 8; index++) {
|
|
285
|
+
var theta = (Math.PI / 8) + (Math.PI * 2 / 8) * index;
|
|
286
|
+
points.push({
|
|
287
|
+
x: Math.round(maxRadiusX + Math.cos(theta) * maxRadiusX),
|
|
288
|
+
y: Math.round(maxRadiusY + Math.sin(theta) * maxRadiusY)
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
else if (shapeType === 'pentagon') {
|
|
293
|
+
for (var index = 0; index < 5; index++) {
|
|
294
|
+
var theta = (-Math.PI / 2) + (Math.PI * 2 / 5) * index;
|
|
295
|
+
points.push({
|
|
296
|
+
x: Math.round(maxRadiusX + Math.cos(theta) * maxRadiusX),
|
|
297
|
+
y: Math.round(maxRadiusY + Math.sin(theta) * maxRadiusY)
|
|
298
|
+
});
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
else if (shapeType === 'hexagon') {
|
|
302
|
+
for (var index = 0; index < 6; index++) {
|
|
303
|
+
var theta = (Math.PI / 3) * index;
|
|
304
|
+
points.push({
|
|
305
|
+
x: Math.round(maxRadiusX + Math.cos(theta) * maxRadiusX),
|
|
306
|
+
y: Math.round(maxRadiusY + Math.sin(theta) * maxRadiusY)
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
var rotatedPoints = points.map(function (point) { return ({
|
|
311
|
+
x: Math.round((point.x - maxRadiusX) * cosValue - (point.y - maxRadiusY) * sinValue + maxRadiusX),
|
|
312
|
+
y: Math.round((point.x - maxRadiusX) * sinValue + (point.y - maxRadiusY) * cosValue + maxRadiusY)
|
|
313
|
+
}); });
|
|
314
|
+
var pathData = this.getPathData(rotatedPoints);
|
|
315
|
+
var viewBox = this.getViewBox(rotatedPoints);
|
|
316
|
+
this.renderSvg(target, pathData, viewBox, shapeInfo);
|
|
317
|
+
};
|
|
318
|
+
EJShape.prototype.getPathData = function (points) {
|
|
319
|
+
var pathData = "M " + points[0].x + " " + points[0].y + " ";
|
|
320
|
+
for (var index = 1; index < points.length; index++) {
|
|
321
|
+
pathData += "L " + points[index].x + " " + points[index].y + " ";
|
|
322
|
+
}
|
|
323
|
+
pathData += 'Z';
|
|
324
|
+
return pathData;
|
|
325
|
+
};
|
|
326
|
+
EJShape.prototype.getViewBox = function (points) {
|
|
327
|
+
var minX = Math.round(Math.min.apply(Math, points.map(function (p) { return p.x; })));
|
|
328
|
+
var maxX = Math.round(Math.max.apply(Math, points.map(function (p) { return p.x; })));
|
|
329
|
+
var minY = Math.round(Math.min.apply(Math, points.map(function (p) { return p.y; })));
|
|
330
|
+
var maxY = Math.round(Math.max.apply(Math, points.map(function (p) { return p.y; })));
|
|
331
|
+
var viewBox = minX + " " + minY + " " + (maxX - minX) + " " + (maxY - minY);
|
|
332
|
+
return viewBox;
|
|
333
|
+
};
|
|
334
|
+
EJShape.prototype.renderSvg = function (target, pathData, viewBox, shapeInfo) {
|
|
335
|
+
var svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
336
|
+
var defs = document.createElementNS('http://www.w3.org/2000/svg', 'defs');
|
|
337
|
+
var clipPath = document.createElementNS('http://www.w3.org/2000/svg', 'clipPath');
|
|
338
|
+
var clipPathElement = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
339
|
+
var graphics = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
340
|
+
var shapePath = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
341
|
+
var targetId = target.attr('id');
|
|
342
|
+
this.setAttributes(svg, {
|
|
343
|
+
'width': shapeInfo.svgWidth + "px", 'height': shapeInfo.svgHeight + "px",
|
|
344
|
+
'viewBox': viewBox, 'id': targetId + "_svg", 'preserveAspectRatio': 'xMidYMid meet'
|
|
345
|
+
});
|
|
346
|
+
this.setAttributes(clipPathElement, { 'd': pathData });
|
|
347
|
+
this.setAttributes(clipPath, { 'id': targetId + "_clip_path", 'clipPathUnits': 'userSpaceOnUse' });
|
|
348
|
+
this.setAttributes(shapePath, {
|
|
349
|
+
'd': pathData, 'vector-effect': 'non-scaling-stroke',
|
|
350
|
+
'clip-path': "url(#" + targetId + "_clip_path)", 'id': targetId + "_shape_path", 'fill': shapeInfo.fillColor,
|
|
351
|
+
'stroke-dasharray': this.getStrokeStyle(shapeInfo.strokeStyle), 'stroke-width': "" + (parseFloat(shapeInfo.strokeWidth) + 1),
|
|
352
|
+
'stroke': shapeInfo.strokeColor
|
|
353
|
+
});
|
|
354
|
+
target.empty();
|
|
355
|
+
clipPath.appendChild(clipPathElement);
|
|
356
|
+
defs.appendChild(clipPath);
|
|
357
|
+
graphics.appendChild(shapePath);
|
|
358
|
+
$(svg).append(defs, graphics);
|
|
359
|
+
target.append(svg);
|
|
360
|
+
};
|
|
361
|
+
EJShape.prototype.getStrokeStyle = function (style) {
|
|
362
|
+
var borderStyle = '0';
|
|
363
|
+
switch (style.toLowerCase()) {
|
|
364
|
+
case 'solid':
|
|
365
|
+
borderStyle = '0';
|
|
366
|
+
break;
|
|
367
|
+
case 'dotted':
|
|
368
|
+
borderStyle = '3,3';
|
|
369
|
+
break;
|
|
370
|
+
case 'dashed':
|
|
371
|
+
borderStyle = '10,10';
|
|
372
|
+
break;
|
|
373
|
+
case 'dashdot':
|
|
374
|
+
borderStyle = '10,10,4,10';
|
|
375
|
+
break;
|
|
376
|
+
case 'dashdotdot':
|
|
377
|
+
borderStyle = '20,10,4,4,4,10';
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
return borderStyle;
|
|
381
|
+
};
|
|
382
|
+
EJShape.prototype.onPropertyChange = function (name, oldValue, newValue) {
|
|
383
|
+
var args = [];
|
|
384
|
+
for (var _i = 3; _i < arguments.length; _i++) {
|
|
385
|
+
args[_i - 3] = arguments[_i];
|
|
386
|
+
}
|
|
387
|
+
var shapeElement = this.customItemDiv.find('#' + this.customJSON.Name + '_customItem_shape_path');
|
|
388
|
+
switch (name.toLowerCase()) {
|
|
389
|
+
case 'backgroundcolor':
|
|
390
|
+
this.customItemDiv.css('background-color', newValue);
|
|
391
|
+
break;
|
|
392
|
+
case 'borderstyle':
|
|
393
|
+
if (args.length > 0) {
|
|
394
|
+
this.customItemDiv.css('border' + args[0] + '-style', newValue.toLowerCase());
|
|
395
|
+
}
|
|
396
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
397
|
+
break;
|
|
398
|
+
case 'borderwidth':
|
|
399
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
400
|
+
break;
|
|
401
|
+
case 'shapetype':
|
|
402
|
+
this.updatePropertyVal(name, newValue);
|
|
403
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
404
|
+
break;
|
|
405
|
+
case 'fillcolor':
|
|
406
|
+
if (!ej.ReportUtil.isEmptyString(newValue)) {
|
|
407
|
+
this.updatePropertyVal(name, newValue);
|
|
408
|
+
this.setAttributes(shapeElement[0], { 'fill': newValue });
|
|
409
|
+
}
|
|
410
|
+
break;
|
|
411
|
+
case 'linewidth':
|
|
412
|
+
this.updatePropertyVal(name, newValue);
|
|
413
|
+
this.setAttributes(shapeElement[0], { 'stroke-width': newValue + 1 });
|
|
414
|
+
break;
|
|
415
|
+
case 'linecolor':
|
|
416
|
+
this.updatePropertyVal(name, newValue);
|
|
417
|
+
this.setAttributes(shapeElement[0], { 'stroke': newValue });
|
|
418
|
+
break;
|
|
419
|
+
case 'linestyle':
|
|
420
|
+
this.updatePropertyVal(name, newValue);
|
|
421
|
+
this.setAttributes(shapeElement[0], { 'stroke-dasharray': this.getStrokeStyle(newValue) });
|
|
422
|
+
break;
|
|
423
|
+
case 'rotationangle':
|
|
424
|
+
this.updatePropertyVal(name, newValue);
|
|
425
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
426
|
+
break;
|
|
427
|
+
case 'starcount':
|
|
428
|
+
this.updatePropertyVal(name, newValue);
|
|
429
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
430
|
+
break;
|
|
431
|
+
case 'concavity':
|
|
432
|
+
this.updatePropertyVal(name, newValue);
|
|
433
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
434
|
+
break;
|
|
435
|
+
case 'arrowheight':
|
|
436
|
+
this.updatePropertyVal(name, newValue);
|
|
437
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
438
|
+
break;
|
|
439
|
+
case 'arrowwidth':
|
|
440
|
+
this.updatePropertyVal(name, newValue);
|
|
441
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
442
|
+
break;
|
|
443
|
+
}
|
|
444
|
+
};
|
|
445
|
+
EJShape.prototype.updatePropertyUIValue = function (name, value) {
|
|
446
|
+
};
|
|
447
|
+
EJShape.prototype.onPositionChanged = function (top, left) {
|
|
448
|
+
};
|
|
449
|
+
EJShape.prototype.onSizeChanged = function (height, width) {
|
|
450
|
+
if (!ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
|
|
451
|
+
this.customItemDiv.css({
|
|
452
|
+
width: width,
|
|
453
|
+
height: height
|
|
454
|
+
});
|
|
455
|
+
}
|
|
456
|
+
else if (ej.isNullOrUndefined(width) && !ej.isNullOrUndefined(height)) {
|
|
457
|
+
this.customItemDiv.css({
|
|
458
|
+
height: height
|
|
459
|
+
});
|
|
460
|
+
}
|
|
461
|
+
else if (ej.isNullOrUndefined(height) && !ej.isNullOrUndefined(width)) {
|
|
462
|
+
this.customItemDiv.css({
|
|
463
|
+
width: width
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
this.renderShape(this.customItemDiv, this.customJSON);
|
|
467
|
+
};
|
|
468
|
+
EJShape.prototype.getPropertyGridItems = function (baseProperties) {
|
|
469
|
+
var rdlParser = this.getRdlParser();
|
|
470
|
+
var shapeInfo = this.getShapeInfo(this.customJSON);
|
|
471
|
+
var shapeTypes = this.getShapeTypes();
|
|
472
|
+
var lineStyles = this.getLineStyles();
|
|
473
|
+
var itemProperties = [{
|
|
474
|
+
'CategoryId': 'basicsettings',
|
|
475
|
+
'DisplayName': 'categorybasicsettings',
|
|
476
|
+
'IsExpand': true,
|
|
477
|
+
'Items': [{
|
|
478
|
+
'ItemId': 'shapetype',
|
|
479
|
+
'Name': 'ShapeType',
|
|
480
|
+
'DisplayName': 'ShapeType',
|
|
481
|
+
'Value': shapeInfo.shapeType,
|
|
482
|
+
'ItemType': 'DropDown',
|
|
483
|
+
'EnableExpression': false,
|
|
484
|
+
'IsIgnoreCommon': true,
|
|
485
|
+
'ValueList': shapeTypes,
|
|
486
|
+
'DependentItems': [{
|
|
487
|
+
'EnableItems': [],
|
|
488
|
+
'DisableItems': ['basicsettings_starcount', 'basicsettings_concavity', 'basicsettings_arrowheight', 'basicsettings_arrowwidth'],
|
|
489
|
+
'Value': ['Ellipse', 'Rectangle', 'Hexagon', 'RightAngleTriangle', 'Triangle', 'Pentagon', 'Octagon']
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
'EnableItems': ['basicsettings_starcount', 'basicsettings_concavity'],
|
|
493
|
+
'DisableItems': ['basicsettings_arrowheight', 'basicsettings_arrowwidth'],
|
|
494
|
+
'Value': ['Star']
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
'EnableItems': ['basicsettings_arrowheight', 'basicsettings_arrowwidth'],
|
|
498
|
+
'DisableItems': ['basicsettings_starcount', 'basicsettings_concavity'],
|
|
499
|
+
'Value': ['LeftArrow', 'RightArrow', 'UpArrow', 'DownArrow']
|
|
500
|
+
}]
|
|
501
|
+
},
|
|
502
|
+
{
|
|
503
|
+
'ItemId': 'rotationangle',
|
|
504
|
+
'Name': 'RotationAngle',
|
|
505
|
+
'DisplayName': 'RotationAngle',
|
|
506
|
+
'Value': shapeInfo.angle,
|
|
507
|
+
'Minimum': 0,
|
|
508
|
+
'Maximum': 360,
|
|
509
|
+
'Interval': 1,
|
|
510
|
+
'DecimalPlaces': 0,
|
|
511
|
+
'EnableExpression': false,
|
|
512
|
+
'ItemType': 'Numeric',
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
'ItemId': 'starcount',
|
|
516
|
+
'Name': 'StarCount',
|
|
517
|
+
'DisplayName': 'StarCount',
|
|
518
|
+
'ParentId': 'basicsettings_shapetype',
|
|
519
|
+
'EnableExpression': false,
|
|
520
|
+
'IsIgnoreCommon': true,
|
|
521
|
+
'Value': shapeInfo.starCount,
|
|
522
|
+
'Minimum': 3,
|
|
523
|
+
'Maximum': 8,
|
|
524
|
+
'Interval': 1,
|
|
525
|
+
'DecimalPlaces': 0,
|
|
526
|
+
'ItemType': 'Numeric',
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
'ItemId': 'concavity',
|
|
530
|
+
'Name': 'Concavity',
|
|
531
|
+
'DisplayName': 'Concavity',
|
|
532
|
+
'ParentId': 'basicsettings_shapetype',
|
|
533
|
+
'EnableExpression': false,
|
|
534
|
+
'IsIgnoreCommon': true,
|
|
535
|
+
'Value': shapeInfo.starConcavity,
|
|
536
|
+
'Minimum': 0.3,
|
|
537
|
+
'Maximum': 1,
|
|
538
|
+
'Interval': 0.1,
|
|
539
|
+
'DecimalPlaces': 1,
|
|
540
|
+
'ItemType': 'Numeric'
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
'ItemId': 'arrowheight',
|
|
544
|
+
'Name': 'ArrowHeight',
|
|
545
|
+
'DisplayName': 'ArrowHeight',
|
|
546
|
+
'ParentId': 'basicsettings_shapetype',
|
|
547
|
+
'EnableExpression': false,
|
|
548
|
+
'IsIgnoreCommon': true,
|
|
549
|
+
'Value': shapeInfo.arrowHeight,
|
|
550
|
+
'Minimum': 0,
|
|
551
|
+
'Maximum': 100,
|
|
552
|
+
'Interval': 1,
|
|
553
|
+
'DecimalPlaces': 0,
|
|
554
|
+
'ItemType': 'Numeric'
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
'ItemId': 'arrowwidth',
|
|
558
|
+
'Name': 'ArrowWidth',
|
|
559
|
+
'DisplayName': 'ArrowWidth',
|
|
560
|
+
'EnableExpression': false,
|
|
561
|
+
'IsIgnoreCommon': true,
|
|
562
|
+
'ParentId': 'basicsettings_shapetype',
|
|
563
|
+
'Value': shapeInfo.arrowWidth,
|
|
564
|
+
'Minimum': 0,
|
|
565
|
+
'Maximum': 100,
|
|
566
|
+
'Interval': 1,
|
|
567
|
+
'DecimalPlaces': 0,
|
|
568
|
+
'ItemType': 'Numeric'
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
'ItemId': 'fillcolor',
|
|
572
|
+
'Name': 'FillColor',
|
|
573
|
+
'DisplayName': 'FillColor',
|
|
574
|
+
'Value': shapeInfo.fillColor,
|
|
575
|
+
'EnableExpression': false,
|
|
576
|
+
'ItemType': 'Color'
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
'ItemId': 'lineitem',
|
|
580
|
+
'Name': 'LineItem',
|
|
581
|
+
'DisplayName': 'LineStyle',
|
|
582
|
+
'ItemType': 'Border',
|
|
583
|
+
'EnableExpression': false,
|
|
584
|
+
'Items': [{
|
|
585
|
+
'ItemId': 'linestyle',
|
|
586
|
+
'Name': 'LineStyle',
|
|
587
|
+
'DisplayName': 'styletooltip',
|
|
588
|
+
'HeaderText': 'linestyle',
|
|
589
|
+
'Value': shapeInfo.strokeStyle,
|
|
590
|
+
'ItemType': 'DropDown',
|
|
591
|
+
'ValueList': lineStyles
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
'ItemId': 'linecolor',
|
|
595
|
+
'Name': 'LineColor',
|
|
596
|
+
'DisplayName': 'colortooltip',
|
|
597
|
+
'HeaderText': 'linecolor',
|
|
598
|
+
'Value': shapeInfo.strokeColor,
|
|
599
|
+
'ItemType': 'Color'
|
|
600
|
+
},
|
|
601
|
+
{
|
|
602
|
+
'ItemId': 'linewidth',
|
|
603
|
+
'Name': 'LineWidth',
|
|
604
|
+
'DisplayName': 'sizetooltip',
|
|
605
|
+
'HeaderText': 'linesize',
|
|
606
|
+
'Value': shapeInfo.strokeWidth,
|
|
607
|
+
'Minimum': ej.ReportUtil.getPropertyValue(rdlParser.isPixelUnit(), rdlParser.getRDLUnit(), 0.33),
|
|
608
|
+
'Maximum': ej.ReportUtil.getPropertyValue(rdlParser.isPixelUnit(), rdlParser.getRDLUnit(), 26.6),
|
|
609
|
+
'Interval': ej.ReportUtil.getPropertyValue(rdlParser.isPixelUnit(), rdlParser.getRDLUnit(), 0.5),
|
|
610
|
+
'decimalPlaces': ej.ReportUtil.getDecimalPlaces(rdlParser.getUnitVal()),
|
|
611
|
+
'UnitType': rdlParser.getUnitVal(),
|
|
612
|
+
'ItemType': 'Numeric'
|
|
613
|
+
}]
|
|
614
|
+
}]
|
|
615
|
+
}];
|
|
616
|
+
baseProperties.HeaderText = this.customJSON.Name;
|
|
617
|
+
baseProperties.PropertyType = 'shape';
|
|
618
|
+
baseProperties.SubType = 'shape';
|
|
619
|
+
baseProperties.IsEditHeader = true;
|
|
620
|
+
baseProperties.Items = $.merge(itemProperties, baseProperties.Items);
|
|
621
|
+
return baseProperties;
|
|
622
|
+
};
|
|
623
|
+
EJShape.prototype.updatePropertyVal = function (propertyName, value) {
|
|
624
|
+
if (this.customJSON.CustomProperties && this.customJSON.CustomProperties.length > 0) {
|
|
625
|
+
for (var index = 0; index < this.customJSON.CustomProperties.length; index++) {
|
|
626
|
+
if (this.customJSON.CustomProperties[index].Name === propertyName) {
|
|
627
|
+
this.customJSON.CustomProperties[index].Value = value;
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
};
|
|
632
|
+
EJShape.prototype.getPropertyVal = function (name, customJSON) {
|
|
633
|
+
if (customJSON.CustomProperties && customJSON.CustomProperties.length > 0) {
|
|
634
|
+
for (var index = 0; index < customJSON.CustomProperties.length; index++) {
|
|
635
|
+
if (customJSON.CustomProperties[index].Name === name) {
|
|
636
|
+
return customJSON.CustomProperties[index].Value;
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
}
|
|
640
|
+
return null;
|
|
641
|
+
};
|
|
642
|
+
EJShape.prototype.undoRedoAction = function () {
|
|
643
|
+
};
|
|
644
|
+
EJShape.prototype.getReportItemJson = function () {
|
|
645
|
+
if (this.customJSON === null) {
|
|
646
|
+
this.customJSON = new ej.ReportModel.CustomReportItem().getModel();
|
|
647
|
+
this.setPropertyVal('ShapeType', 'Ellipse');
|
|
648
|
+
this.setPropertyVal('RotationAngle', '0');
|
|
649
|
+
this.setPropertyVal('FillColor', 'Transparent');
|
|
650
|
+
this.setPropertyVal('LineWidth', '1');
|
|
651
|
+
this.setPropertyVal('LineColor', 'Black');
|
|
652
|
+
this.setPropertyVal('LineStyle', 'Solid');
|
|
653
|
+
this.setPropertyVal('StarCount', '5');
|
|
654
|
+
this.setPropertyVal('Concavity', '0.5');
|
|
655
|
+
this.setPropertyVal('ArrowHeight', '50');
|
|
656
|
+
this.setPropertyVal('ArrowWidth', '50');
|
|
657
|
+
}
|
|
658
|
+
return this.customJSON;
|
|
659
|
+
};
|
|
660
|
+
EJShape.prototype.setPropertyVal = function (name, val) {
|
|
661
|
+
if (this.customJSON.CustomProperties === null) {
|
|
662
|
+
this.customJSON.CustomProperties = [];
|
|
663
|
+
}
|
|
664
|
+
this.customJSON.CustomProperties.push(new ej.ReportModel.CustomProperty(name, val));
|
|
665
|
+
};
|
|
666
|
+
EJShape.prototype.setReportItemJson = function (reportItem) {
|
|
667
|
+
this.customJSON = reportItem;
|
|
668
|
+
};
|
|
669
|
+
EJShape.prototype.hasDesignerInstance = function (instance) {
|
|
670
|
+
return instance && instance.pluginName && instance.pluginName.toLowerCase() === 'boldreportdesigner';
|
|
671
|
+
};
|
|
672
|
+
EJShape.prototype.setAttributes = function (el, attrs) {
|
|
673
|
+
for (var key in attrs) {
|
|
674
|
+
el.setAttributeNS(null, key, attrs[key]);
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
EJShape.prototype.getSvgHeight = function (customJson) {
|
|
678
|
+
var height = 0;
|
|
679
|
+
var topBorderWidth = 0;
|
|
680
|
+
var bottomBorderWidth = 0;
|
|
681
|
+
var borderWidth = 0;
|
|
682
|
+
if (this.hasDesignerInstance(this.instance)) {
|
|
683
|
+
height = ej.ReportUtil.getPixelVal(customJson.Height.size);
|
|
684
|
+
topBorderWidth = this.getBorderWidth(customJson.Style.TopBorder, true);
|
|
685
|
+
bottomBorderWidth = this.getBorderWidth(customJson.Style.BottomBorder, true);
|
|
686
|
+
borderWidth = this.getBorderWidth(customJson.Style.Border, true);
|
|
687
|
+
}
|
|
688
|
+
else {
|
|
689
|
+
height = customJson.Height;
|
|
690
|
+
topBorderWidth = this.getBorderWidth(customJson.Border.TopBorder, false);
|
|
691
|
+
bottomBorderWidth = this.getBorderWidth(customJson.Border.BottomBorder, false);
|
|
692
|
+
borderWidth = this.getBorderWidth(customJson.Border.Default, false);
|
|
693
|
+
}
|
|
694
|
+
var totalBorderWidth = (topBorderWidth || borderWidth) + (bottomBorderWidth || borderWidth);
|
|
695
|
+
return height - Math.round(totalBorderWidth);
|
|
696
|
+
};
|
|
697
|
+
EJShape.prototype.getSvgWidth = function (customJson) {
|
|
698
|
+
var width = 0;
|
|
699
|
+
var leftBorderWidth = 0;
|
|
700
|
+
var rightBorderWidth = 0;
|
|
701
|
+
var borderWidth = 0;
|
|
702
|
+
if (this.hasDesignerInstance(this.instance)) {
|
|
703
|
+
width = ej.ReportUtil.getPixelVal(customJson.Width.size);
|
|
704
|
+
leftBorderWidth = this.getBorderWidth(customJson.Style.LeftBorder, true);
|
|
705
|
+
rightBorderWidth = this.getBorderWidth(customJson.Style.RightBorder, true);
|
|
706
|
+
borderWidth = this.getBorderWidth(customJson.Style.Border, true);
|
|
707
|
+
}
|
|
708
|
+
else {
|
|
709
|
+
width = customJson.Width;
|
|
710
|
+
leftBorderWidth = this.getBorderWidth(customJson.Border.LeftBorder, false);
|
|
711
|
+
rightBorderWidth = this.getBorderWidth(customJson.Border.RightBorder, false);
|
|
712
|
+
borderWidth = this.getBorderWidth(customJson.Border.Default, false);
|
|
713
|
+
}
|
|
714
|
+
var totalBorderWidth = (leftBorderWidth || borderWidth) + (rightBorderWidth || borderWidth);
|
|
715
|
+
return width - Math.round(totalBorderWidth);
|
|
716
|
+
};
|
|
717
|
+
EJShape.prototype.getBorderWidth = function (border, isDesigner) {
|
|
718
|
+
var borderWidth = 0;
|
|
719
|
+
if (isDesigner && border && border.Style && border.Style !== 'None' && border.Style !== 'Default' && border.Width) {
|
|
720
|
+
borderWidth = ej.ReportUtil.getPixelVal(border.Width.size);
|
|
721
|
+
}
|
|
722
|
+
else if (border && border.BorderStyle && border.BorderStyle !== 'None' && border.BorderStyle !== 'Default' && border.Thickness) {
|
|
723
|
+
borderWidth = border.Thickness;
|
|
724
|
+
}
|
|
725
|
+
return borderWidth;
|
|
726
|
+
};
|
|
727
|
+
EJShape.prototype.getRdlParser = function () {
|
|
728
|
+
return this.hasDesignerInstance(this.instance) ? this.instance.rdlParser : null;
|
|
729
|
+
};
|
|
730
|
+
EJShape.prototype.getShapeTypes = function () {
|
|
731
|
+
return [{ 'text': 'ellipse', 'value': 'Ellipse' },
|
|
732
|
+
{ 'text': 'triangle', 'value': 'Triangle' }, { 'text': 'rightangletriangle', 'value': 'RightAngleTriangle' },
|
|
733
|
+
{ 'text': 'rectangle', 'value': 'Rectangle' }, { 'text': 'hexagon', 'value': 'Hexagon' },
|
|
734
|
+
{ 'text': 'pentagon', 'value': 'Pentagon' }, { 'text': 'octagon', 'value': 'Octagon' },
|
|
735
|
+
{ 'text': 'star', 'value': 'Star' }, { 'text': 'leftarrow', 'value': 'LeftArrow' },
|
|
736
|
+
{ 'text': 'rightarrow', 'value': 'RightArrow' }, { 'text': 'uparrow', 'value': 'UpArrow' },
|
|
737
|
+
{ 'text': 'downarrow', 'value': 'DownArrow' }];
|
|
738
|
+
};
|
|
739
|
+
EJShape.prototype.getLineStyles = function () {
|
|
740
|
+
return [{ 'text': 'dashed', 'value': 'Dashed' },
|
|
741
|
+
{ 'text': 'dotted', 'value': 'Dotted' }, { 'text': 'dashdotdot', 'value': 'DashDotDot' },
|
|
742
|
+
{ 'text': 'dashdot', 'value': 'DashDot' }, { 'text': 'solid', 'value': 'Solid' }];
|
|
743
|
+
};
|
|
744
|
+
EJShape.prototype.updateStyle = function (jsonStyle, isTablixCell) {
|
|
745
|
+
if (jsonStyle && !isTablixCell) {
|
|
746
|
+
if (jsonStyle.Border && (jsonStyle.Border.Style === 'Default' || jsonStyle.Border.Style === 'None')) {
|
|
747
|
+
this.customItemDiv.css('border-style', 'none');
|
|
748
|
+
}
|
|
749
|
+
if (jsonStyle.TopBorder && (jsonStyle.TopBorder.Style === 'Default' || jsonStyle.TopBorder.Style === 'None')) {
|
|
750
|
+
this.customItemDiv.css('border-top-style', 'none');
|
|
751
|
+
}
|
|
752
|
+
if (jsonStyle.BottomBorder && (jsonStyle.BottomBorder.Style === 'Default' || jsonStyle.BottomBorder.Style === 'None')) {
|
|
753
|
+
this.customItemDiv.css('border-bottom-style', 'none');
|
|
754
|
+
}
|
|
755
|
+
if (jsonStyle.LeftBorder && (jsonStyle.LeftBorder.Style === 'Default' || jsonStyle.LeftBorder.Style === 'None')) {
|
|
756
|
+
this.customItemDiv.css('border-left-style', 'none');
|
|
757
|
+
}
|
|
758
|
+
if (jsonStyle.RightBorder && (jsonStyle.RightBorder.Style === 'Default' || jsonStyle.RightBorder.Style === 'None')) {
|
|
759
|
+
this.customItemDiv.css('border-right-style', 'none');
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
};
|
|
763
|
+
EJShape.prototype.dispose = function () {
|
|
764
|
+
this.instance = null;
|
|
765
|
+
this.customItemDiv = null;
|
|
766
|
+
this.customJSON = null;
|
|
767
|
+
this.rootElement = null;
|
|
768
|
+
};
|
|
769
|
+
EJShape.prototype.getLocale = function (text) {
|
|
770
|
+
var shapeLocale;
|
|
771
|
+
var defaultLocale = EJShape.Locale['en-US'];
|
|
772
|
+
if (this.instance && this.hasDesignerInstance(this.instance) && this.instance.model && EJShape.Locale[this.instance.model.locale]) {
|
|
773
|
+
shapeLocale = EJShape.Locale[this.instance.model.locale];
|
|
774
|
+
}
|
|
775
|
+
switch (text.toLowerCase()) {
|
|
776
|
+
case 'categorybasicsettings':
|
|
777
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.categoryName) {
|
|
778
|
+
return shapeLocale.basicSettings.categoryName;
|
|
779
|
+
}
|
|
780
|
+
return defaultLocale.basicSettings.categoryName;
|
|
781
|
+
case 'shapetype':
|
|
782
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeType) {
|
|
783
|
+
return shapeLocale.basicSettings.shapeType;
|
|
784
|
+
}
|
|
785
|
+
return defaultLocale.basicSettings.shapeType;
|
|
786
|
+
case 'rotationangle':
|
|
787
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.rotationAngle) {
|
|
788
|
+
return shapeLocale.basicSettings.rotationAngle;
|
|
789
|
+
}
|
|
790
|
+
return defaultLocale.basicSettings.rotationAngle;
|
|
791
|
+
case 'starcount':
|
|
792
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.starCount) {
|
|
793
|
+
return shapeLocale.basicSettings.starCount;
|
|
794
|
+
}
|
|
795
|
+
return defaultLocale.basicSettings.starCount;
|
|
796
|
+
case 'concavity':
|
|
797
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.concavity) {
|
|
798
|
+
return shapeLocale.basicSettings.concavity;
|
|
799
|
+
}
|
|
800
|
+
return defaultLocale.basicSettings.concavity;
|
|
801
|
+
case 'arrowheight':
|
|
802
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.arrowHeight) {
|
|
803
|
+
return shapeLocale.basicSettings.arrowHeight;
|
|
804
|
+
}
|
|
805
|
+
return defaultLocale.basicSettings.arrowHeight;
|
|
806
|
+
case 'arrowwidth':
|
|
807
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.arrowWidth) {
|
|
808
|
+
return shapeLocale.basicSettings.arrowWidth;
|
|
809
|
+
}
|
|
810
|
+
return defaultLocale.basicSettings.arrowWidth;
|
|
811
|
+
case 'linestyle':
|
|
812
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.lineStyle) {
|
|
813
|
+
return shapeLocale.basicSettings.lineStyle;
|
|
814
|
+
}
|
|
815
|
+
return defaultLocale.basicSettings.lineStyle;
|
|
816
|
+
case 'fillcolor':
|
|
817
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.fillColor) {
|
|
818
|
+
return shapeLocale.basicSettings.fillColor;
|
|
819
|
+
}
|
|
820
|
+
return defaultLocale.basicSettings.fillColor;
|
|
821
|
+
case 'ellipse':
|
|
822
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
823
|
+
&& shapeLocale.basicSettings.shapeTypes.ellipse) {
|
|
824
|
+
return shapeLocale.basicSettings.shapeTypes.ellipse;
|
|
825
|
+
}
|
|
826
|
+
return defaultLocale.basicSettings.shapeTypes.ellipse;
|
|
827
|
+
case 'triangle':
|
|
828
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
829
|
+
&& shapeLocale.basicSettings.shapeTypes.triangle) {
|
|
830
|
+
return shapeLocale.basicSettings.shapeTypes.triangle;
|
|
831
|
+
}
|
|
832
|
+
return defaultLocale.basicSettings.shapeTypes.triangle;
|
|
833
|
+
case 'rightangletriangle':
|
|
834
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
835
|
+
&& shapeLocale.basicSettings.shapeTypes.rightAngleTriangle) {
|
|
836
|
+
return shapeLocale.basicSettings.shapeTypes.rightAngleTriangle;
|
|
837
|
+
}
|
|
838
|
+
return defaultLocale.basicSettings.shapeTypes.rightAngleTriangle;
|
|
839
|
+
case 'rectangle':
|
|
840
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
841
|
+
&& shapeLocale.basicSettings.shapeTypes.rectangle) {
|
|
842
|
+
return shapeLocale.basicSettings.shapeTypes.rectangle;
|
|
843
|
+
}
|
|
844
|
+
return defaultLocale.basicSettings.shapeTypes.rectangle;
|
|
845
|
+
case 'hexagon':
|
|
846
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
847
|
+
&& shapeLocale.basicSettings.shapeTypes.hexagon) {
|
|
848
|
+
return shapeLocale.basicSettings.shapeTypes.hexagon;
|
|
849
|
+
}
|
|
850
|
+
return defaultLocale.basicSettings.shapeTypes.hexagon;
|
|
851
|
+
case 'pentagon':
|
|
852
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
853
|
+
&& shapeLocale.basicSettings.shapeTypes.pentagon) {
|
|
854
|
+
return shapeLocale.basicSettings.shapeTypes.pentagon;
|
|
855
|
+
}
|
|
856
|
+
return defaultLocale.basicSettings.shapeTypes.pentagon;
|
|
857
|
+
case 'octagon':
|
|
858
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
859
|
+
&& shapeLocale.basicSettings.shapeTypes.octagon) {
|
|
860
|
+
return shapeLocale.basicSettings.shapeTypes.octagon;
|
|
861
|
+
}
|
|
862
|
+
return defaultLocale.basicSettings.shapeTypes.octagon;
|
|
863
|
+
case 'star':
|
|
864
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
865
|
+
&& shapeLocale.basicSettings.shapeTypes.star) {
|
|
866
|
+
return shapeLocale.basicSettings.shapeTypes.star;
|
|
867
|
+
}
|
|
868
|
+
return defaultLocale.basicSettings.shapeTypes.star;
|
|
869
|
+
case 'leftarrow':
|
|
870
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
871
|
+
&& shapeLocale.basicSettings.shapeTypes.leftArrow) {
|
|
872
|
+
return shapeLocale.basicSettings.shapeTypes.leftArrow;
|
|
873
|
+
}
|
|
874
|
+
return defaultLocale.basicSettings.shapeTypes.leftArrow;
|
|
875
|
+
case 'rightarrow':
|
|
876
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
877
|
+
&& shapeLocale.basicSettings.shapeTypes.rightArrow) {
|
|
878
|
+
return shapeLocale.basicSettings.shapeTypes.rightArrow;
|
|
879
|
+
}
|
|
880
|
+
return defaultLocale.basicSettings.shapeTypes.rightArrow;
|
|
881
|
+
case 'uparrow':
|
|
882
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
883
|
+
&& shapeLocale.basicSettings.shapeTypes.upArrow) {
|
|
884
|
+
return shapeLocale.basicSettings.shapeTypes.upArrow;
|
|
885
|
+
}
|
|
886
|
+
return defaultLocale.basicSettings.shapeTypes.upArrow;
|
|
887
|
+
case 'downarrow':
|
|
888
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.shapeTypes
|
|
889
|
+
&& shapeLocale.basicSettings.shapeTypes.downArrow) {
|
|
890
|
+
return shapeLocale.basicSettings.shapeTypes.downArrow;
|
|
891
|
+
}
|
|
892
|
+
return defaultLocale.basicSettings.shapeTypes.downArrow;
|
|
893
|
+
case 'dashed':
|
|
894
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.lineStyles
|
|
895
|
+
&& shapeLocale.basicSettings.lineStyles.dashed) {
|
|
896
|
+
return shapeLocale.basicSettings.lineStyles.dashed;
|
|
897
|
+
}
|
|
898
|
+
return defaultLocale.basicSettings.lineStyles.dashed;
|
|
899
|
+
case 'dotted':
|
|
900
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.lineStyles
|
|
901
|
+
&& shapeLocale.basicSettings.lineStyles.dotted) {
|
|
902
|
+
return shapeLocale.basicSettings.lineStyles.dotted;
|
|
903
|
+
}
|
|
904
|
+
return defaultLocale.basicSettings.lineStyles.dotted;
|
|
905
|
+
case 'dashdotdot':
|
|
906
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.lineStyles
|
|
907
|
+
&& shapeLocale.basicSettings.lineStyles.dashdotdot) {
|
|
908
|
+
return shapeLocale.basicSettings.lineStyles.dashdotdot;
|
|
909
|
+
}
|
|
910
|
+
return defaultLocale.basicSettings.lineStyles.dashdotdot;
|
|
911
|
+
case 'dashdot':
|
|
912
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.lineStyles
|
|
913
|
+
&& shapeLocale.basicSettings.lineStyles.dashdot) {
|
|
914
|
+
return shapeLocale.basicSettings.lineStyles.dashdot;
|
|
915
|
+
}
|
|
916
|
+
return defaultLocale.basicSettings.lineStyles.dashdot;
|
|
917
|
+
case 'solid':
|
|
918
|
+
if (shapeLocale && shapeLocale.basicSettings && shapeLocale.basicSettings.lineStyles
|
|
919
|
+
&& shapeLocale.basicSettings.lineStyles.solid) {
|
|
920
|
+
return shapeLocale.basicSettings.lineStyles.solid;
|
|
921
|
+
}
|
|
922
|
+
return defaultLocale.basicSettings.lineStyles.solid;
|
|
923
|
+
}
|
|
924
|
+
};
|
|
925
|
+
EJShape.prototype.renderItemPreview = function (criModel, targetDiv, locale) {
|
|
926
|
+
this.renderShape($(targetDiv), criModel);
|
|
927
|
+
};
|
|
928
|
+
return EJShape;
|
|
929
|
+
}());
|
|
930
|
+
EJShape.Locale = {};
|
|
931
|
+
EJShape.Locale['ar-AE'] = {
|
|
932
|
+
basicSettings: {
|
|
933
|
+
categoryName: 'الإعدادات الأساسية',
|
|
934
|
+
shapeType: 'الأشكال',
|
|
935
|
+
rotationAngle: 'زاوية الدوران',
|
|
936
|
+
starCount: 'عدد النجوم',
|
|
937
|
+
concavity: 'تقعر',
|
|
938
|
+
arrowHeight: 'ارتفاع السهم',
|
|
939
|
+
arrowWidth: 'عرض السهم',
|
|
940
|
+
lineStyle: 'نمط الخط',
|
|
941
|
+
fillColor: 'لون التعبئة',
|
|
942
|
+
shapeTypes: {
|
|
943
|
+
ellipse: 'القطع الناقص',
|
|
944
|
+
triangle: 'مثلث',
|
|
945
|
+
rightAngleTriangle: 'مثلث قائم الزاوية',
|
|
946
|
+
rectangle: 'المستطيل',
|
|
947
|
+
hexagon: 'مسدس',
|
|
948
|
+
pentagon: 'البنتاغون',
|
|
949
|
+
octagon: 'مثمن',
|
|
950
|
+
star: 'نجم',
|
|
951
|
+
leftArrow: 'السهم الأيسر',
|
|
952
|
+
rightArrow: 'السهم الأيمن',
|
|
953
|
+
upArrow: 'سهم لأعلى',
|
|
954
|
+
downArrow: 'سهم لأسفل'
|
|
955
|
+
},
|
|
956
|
+
lineStyles: {
|
|
957
|
+
dashed: 'متقطع',
|
|
958
|
+
dotted: 'منقط',
|
|
959
|
+
dashdotdot: 'شرطة نقطة نقطة',
|
|
960
|
+
dashdot: 'داش دوت',
|
|
961
|
+
solid: 'صلب'
|
|
962
|
+
}
|
|
963
|
+
},
|
|
964
|
+
toolTip: {
|
|
965
|
+
requirements: 'Display items in Shapes',
|
|
966
|
+
description: 'Visualize data with customizable shapes.',
|
|
967
|
+
title: 'Shape'
|
|
968
|
+
}
|
|
969
|
+
};
|
|
970
|
+
EJShape.Locale['en-US'] = {
|
|
971
|
+
basicSettings: {
|
|
972
|
+
categoryName: 'Basic Settings',
|
|
973
|
+
shapeType: 'Shapes',
|
|
974
|
+
rotationAngle: 'Rotation Angle',
|
|
975
|
+
starCount: 'Star Count',
|
|
976
|
+
concavity: 'Concavity',
|
|
977
|
+
arrowHeight: 'Arrow Height',
|
|
978
|
+
arrowWidth: 'Arrow Width',
|
|
979
|
+
lineStyle: 'Line Style',
|
|
980
|
+
fillColor: 'Fill Color',
|
|
981
|
+
shapeTypes: {
|
|
982
|
+
ellipse: 'Ellipse',
|
|
983
|
+
triangle: 'Triangle',
|
|
984
|
+
rightAngleTriangle: 'Right Angle Triangle',
|
|
985
|
+
rectangle: 'Rectangle',
|
|
986
|
+
hexagon: 'Hexagon',
|
|
987
|
+
pentagon: 'Pentagon',
|
|
988
|
+
octagon: 'Octagon',
|
|
989
|
+
star: 'Star',
|
|
990
|
+
leftArrow: 'Left Arrow',
|
|
991
|
+
rightArrow: 'Right Arrow',
|
|
992
|
+
upArrow: 'Up Arrow',
|
|
993
|
+
downArrow: 'Down Arrow'
|
|
994
|
+
},
|
|
995
|
+
lineStyles: {
|
|
996
|
+
dashed: 'Dashed',
|
|
997
|
+
dotted: 'Dotted',
|
|
998
|
+
dashdotdot: 'Dash Dot Dot',
|
|
999
|
+
dashdot: 'Dash Dot',
|
|
1000
|
+
solid: 'Solid'
|
|
1001
|
+
}
|
|
1002
|
+
},
|
|
1003
|
+
toolTip: {
|
|
1004
|
+
requirements: 'Display items in Shapes',
|
|
1005
|
+
description: 'Visualize data with customizable shapes.',
|
|
1006
|
+
title: 'Shape'
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
EJShape.Locale['de-DE'] = {
|
|
1010
|
+
basicSettings: {
|
|
1011
|
+
categoryName: 'Grundeinstellungen',
|
|
1012
|
+
shapeType: 'Formen',
|
|
1013
|
+
rotationAngle: 'Drehwinkel',
|
|
1014
|
+
starCount: 'Sternenanzahl',
|
|
1015
|
+
concavity: 'Konkavität',
|
|
1016
|
+
arrowHeight: 'Pfeilhöhe',
|
|
1017
|
+
arrowWidth: 'Pfeilbreite',
|
|
1018
|
+
lineStyle: 'Linienstil',
|
|
1019
|
+
fillColor: 'Füllfarbe',
|
|
1020
|
+
shapeTypes: {
|
|
1021
|
+
ellipse: 'Ellipse',
|
|
1022
|
+
triangle: 'Dreieck',
|
|
1023
|
+
rightAngleTriangle: 'Rechtwinkliges Dreieck',
|
|
1024
|
+
rectangle: 'Rechteck',
|
|
1025
|
+
hexagon: 'Hexagon',
|
|
1026
|
+
pentagon: 'Pentagon',
|
|
1027
|
+
octagon: 'Oktagon',
|
|
1028
|
+
star: 'Stern',
|
|
1029
|
+
leftArrow: 'Linker Pfeil',
|
|
1030
|
+
rightArrow: 'Rechter Pfeil',
|
|
1031
|
+
upArrow: 'Nach oben Pfeil',
|
|
1032
|
+
downArrow: 'Nach unten Pfeil'
|
|
1033
|
+
},
|
|
1034
|
+
lineStyles: {
|
|
1035
|
+
dashed: 'Gestrichelt',
|
|
1036
|
+
dotted: 'Gepunktet',
|
|
1037
|
+
dashdotdot: 'Strich Punkt Punkt',
|
|
1038
|
+
dashdot: 'Strich Punkt',
|
|
1039
|
+
solid: 'Durchgezogen'
|
|
1040
|
+
}
|
|
1041
|
+
},
|
|
1042
|
+
toolTip: {
|
|
1043
|
+
requirements: 'Elemente in Formen anzeigen',
|
|
1044
|
+
description: 'Visualisieren von Daten mit anpassbaren Formen.',
|
|
1045
|
+
title: 'Form'
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
EJShape.Locale['en-AU'] = {
|
|
1049
|
+
basicSettings: {
|
|
1050
|
+
categoryName: 'Basic Settings',
|
|
1051
|
+
shapeType: 'Shapes',
|
|
1052
|
+
rotationAngle: 'Rotation Angle',
|
|
1053
|
+
starCount: 'Star Count',
|
|
1054
|
+
concavity: 'Concavity',
|
|
1055
|
+
arrowHeight: 'Arrow Height',
|
|
1056
|
+
arrowWidth: 'Arrow Width',
|
|
1057
|
+
fillColor: 'Fill Color',
|
|
1058
|
+
lineStyle: 'Line Style',
|
|
1059
|
+
shapeTypes: {
|
|
1060
|
+
ellipse: 'Ellipse',
|
|
1061
|
+
triangle: 'Triangle',
|
|
1062
|
+
rightAngleTriangle: 'Right Angle Triangle',
|
|
1063
|
+
rectangle: 'Rectangle',
|
|
1064
|
+
hexagon: 'Hexagon',
|
|
1065
|
+
pentagon: 'Pentagon',
|
|
1066
|
+
octagon: 'Octagon',
|
|
1067
|
+
star: 'Star',
|
|
1068
|
+
leftArrow: 'Left Arrow',
|
|
1069
|
+
rightArrow: 'Right Arrow',
|
|
1070
|
+
upArrow: 'Up Arrow',
|
|
1071
|
+
downArrow: 'Down Arrow'
|
|
1072
|
+
},
|
|
1073
|
+
lineStyles: {
|
|
1074
|
+
dashed: 'Dashed',
|
|
1075
|
+
dotted: 'Dotted',
|
|
1076
|
+
dashdotdot: 'Dash Dot Dot',
|
|
1077
|
+
dashdot: 'Dash Dot',
|
|
1078
|
+
solid: 'Solid'
|
|
1079
|
+
}
|
|
1080
|
+
},
|
|
1081
|
+
toolTip: {
|
|
1082
|
+
requirements: 'Display items in Shapes',
|
|
1083
|
+
description: 'Visualize data with customizable shapes.',
|
|
1084
|
+
title: 'Shape'
|
|
1085
|
+
}
|
|
1086
|
+
};
|
|
1087
|
+
EJShape.Locale['en-CA'] = {
|
|
1088
|
+
basicSettings: {
|
|
1089
|
+
categoryName: 'Basic Settings',
|
|
1090
|
+
shapeType: 'Shapes',
|
|
1091
|
+
rotationAngle: 'Rotation Angle',
|
|
1092
|
+
starCount: 'Star Count',
|
|
1093
|
+
concavity: 'Concavity',
|
|
1094
|
+
arrowHeight: 'Arrow Height',
|
|
1095
|
+
arrowWidth: 'Arrow Width',
|
|
1096
|
+
lineStyle: 'Line Style',
|
|
1097
|
+
fillColor: 'Fill Color',
|
|
1098
|
+
shapeTypes: {
|
|
1099
|
+
ellipse: 'Ellipse',
|
|
1100
|
+
triangle: 'Triangle',
|
|
1101
|
+
rightAngleTriangle: 'Right Angle Triangle',
|
|
1102
|
+
rectangle: 'Rectangle',
|
|
1103
|
+
hexagon: 'Hexagon',
|
|
1104
|
+
pentagon: 'Pentagon',
|
|
1105
|
+
octagon: 'Octagon',
|
|
1106
|
+
star: 'Star',
|
|
1107
|
+
leftArrow: 'Left Arrow',
|
|
1108
|
+
rightArrow: 'Right Arrow',
|
|
1109
|
+
upArrow: 'Up Arrow',
|
|
1110
|
+
downArrow: 'Down Arrow'
|
|
1111
|
+
},
|
|
1112
|
+
lineStyles: {
|
|
1113
|
+
dashed: 'Dashed',
|
|
1114
|
+
dotted: 'Dotted',
|
|
1115
|
+
dashdotdot: 'Dash Dot Dot',
|
|
1116
|
+
dashdot: 'Dash Dot',
|
|
1117
|
+
solid: 'Solid'
|
|
1118
|
+
}
|
|
1119
|
+
},
|
|
1120
|
+
toolTip: {
|
|
1121
|
+
requirements: 'Display items in Shapes',
|
|
1122
|
+
description: 'Visualize data with customizable shapes.',
|
|
1123
|
+
title: 'Shape'
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
EJShape.Locale['en-ES'] = {
|
|
1127
|
+
basicSettings: {
|
|
1128
|
+
categoryName: 'Basic Settings',
|
|
1129
|
+
shapeType: 'Shapes',
|
|
1130
|
+
rotationAngle: 'Ángulo de Rotación',
|
|
1131
|
+
starCount: 'Conteo de estrellas',
|
|
1132
|
+
concavity: 'Concavidad',
|
|
1133
|
+
arrowHeight: 'Altura de la Flecha',
|
|
1134
|
+
arrowWidth: 'Ancho de la Flecha',
|
|
1135
|
+
fillColor: 'Color de Relleno',
|
|
1136
|
+
lineStyle: 'Estilo de línea',
|
|
1137
|
+
shapeTypes: {
|
|
1138
|
+
ellipse: 'Ellipse',
|
|
1139
|
+
triangle: 'Triángulo',
|
|
1140
|
+
rightAngleTriangle: 'Triángulo Rectángulo',
|
|
1141
|
+
rectangle: 'Rectángulo',
|
|
1142
|
+
hexagon: 'Hexágono',
|
|
1143
|
+
pentagon: 'Pentágono',
|
|
1144
|
+
octagon: 'Octágono',
|
|
1145
|
+
star: 'Estrella',
|
|
1146
|
+
leftArrow: 'Flecha Izquierda',
|
|
1147
|
+
rightArrow: 'Flecha Derecha',
|
|
1148
|
+
upArrow: 'Flecha Arriba',
|
|
1149
|
+
downArrow: 'Flecha Abajo',
|
|
1150
|
+
},
|
|
1151
|
+
lineStyles: {
|
|
1152
|
+
dashed: 'Guiones',
|
|
1153
|
+
dotted: 'Punteado',
|
|
1154
|
+
dashdotdot: 'Punto Guion Guion',
|
|
1155
|
+
dashdot: 'Punto Guion',
|
|
1156
|
+
solid: 'Sólido'
|
|
1157
|
+
}
|
|
1158
|
+
},
|
|
1159
|
+
toolTip: {
|
|
1160
|
+
requirements: 'Display items in Shapes',
|
|
1161
|
+
description: 'Visualize data with customizable shapes.',
|
|
1162
|
+
title: 'Shape'
|
|
1163
|
+
}
|
|
1164
|
+
};
|
|
1165
|
+
EJShape.Locale['fr-CA'] = {
|
|
1166
|
+
basicSettings: {
|
|
1167
|
+
categoryName: 'Paramètres de base',
|
|
1168
|
+
shapeType: 'Formes',
|
|
1169
|
+
rotationAngle: 'Angle de Rotation',
|
|
1170
|
+
starCount: 'Nombre d\'étoiles',
|
|
1171
|
+
concavity: 'Concavité',
|
|
1172
|
+
arrowHeight: 'Hauteur de la Flèche',
|
|
1173
|
+
arrowWidth: 'Largeur de la Flèche',
|
|
1174
|
+
lineStyle: 'Style de ligne',
|
|
1175
|
+
fillColor: 'Couleur de Remplissage',
|
|
1176
|
+
shapeTypes: {
|
|
1177
|
+
ellipse: 'Ellipse',
|
|
1178
|
+
triangle: 'Triangle',
|
|
1179
|
+
rightAngleTriangle: 'Triangle Rectangle',
|
|
1180
|
+
rectangle: 'Rectangle',
|
|
1181
|
+
hexagon: 'Hexagone',
|
|
1182
|
+
pentagon: 'Pentagone',
|
|
1183
|
+
octagon: 'Octogone',
|
|
1184
|
+
star: 'Étoile',
|
|
1185
|
+
leftArrow: 'Flèche Gauche',
|
|
1186
|
+
rightArrow: 'Flèche Droite',
|
|
1187
|
+
upArrow: 'Flèche Haut',
|
|
1188
|
+
downArrow: 'Flèche Bas'
|
|
1189
|
+
},
|
|
1190
|
+
lineStyles: {
|
|
1191
|
+
dashed: 'Tirets',
|
|
1192
|
+
dotted: 'Pointillés',
|
|
1193
|
+
dashdotdot: 'Tiret Point Point',
|
|
1194
|
+
dashdot: 'Tiret Point',
|
|
1195
|
+
solid: 'Solide'
|
|
1196
|
+
}
|
|
1197
|
+
},
|
|
1198
|
+
toolTip: {
|
|
1199
|
+
requirements: 'Afficher les éléments dans les Formes',
|
|
1200
|
+
description: 'Visualisez les données avec des formes personnalisables.',
|
|
1201
|
+
title: 'Forme'
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
EJShape.Locale['fr-FR'] = {
|
|
1205
|
+
basicSettings: {
|
|
1206
|
+
shapeType: 'Formes',
|
|
1207
|
+
categoryName: 'Paramètres de base',
|
|
1208
|
+
rotationAngle: 'Angle de Rotation',
|
|
1209
|
+
starCount: 'Nombre d\'étoiles',
|
|
1210
|
+
concavity: 'Concavité',
|
|
1211
|
+
arrowHeight: 'Hauteur de la Flèche',
|
|
1212
|
+
arrowWidth: 'Largeur de la Flèche',
|
|
1213
|
+
fillColor: 'Couleur de Remplissage',
|
|
1214
|
+
lineStyle: 'Style de ligne',
|
|
1215
|
+
shapeTypes: {
|
|
1216
|
+
ellipse: 'Ellipse',
|
|
1217
|
+
triangle: 'Triangle',
|
|
1218
|
+
rightAngleTriangle: 'Triangle Rectangle',
|
|
1219
|
+
rectangle: 'Rectangle',
|
|
1220
|
+
hexagon: 'Hexagone',
|
|
1221
|
+
pentagon: 'Pentagone',
|
|
1222
|
+
octagon: 'Octogone',
|
|
1223
|
+
star: 'Étoile',
|
|
1224
|
+
leftArrow: 'Flèche Gauche',
|
|
1225
|
+
rightArrow: 'Flèche Droite',
|
|
1226
|
+
upArrow: 'Flèche Haut',
|
|
1227
|
+
downArrow: 'Flèche Bas',
|
|
1228
|
+
},
|
|
1229
|
+
lineStyles: {
|
|
1230
|
+
dashed: 'Tirets',
|
|
1231
|
+
dotted: 'Pointillés',
|
|
1232
|
+
dashdotdot: 'Tiret Point Point',
|
|
1233
|
+
dashdot: 'Tiret Point',
|
|
1234
|
+
solid: 'Solide'
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
toolTip: {
|
|
1238
|
+
requirements: 'Afficher les éléments dans les Formes',
|
|
1239
|
+
description: 'Visualisez les données avec des formes personnalisables.',
|
|
1240
|
+
title: 'Forme'
|
|
1241
|
+
}
|
|
1242
|
+
};
|
|
1243
|
+
EJShape.Locale['it-IT'] = {
|
|
1244
|
+
basicSettings: {
|
|
1245
|
+
categoryName: 'Impostazioni di base',
|
|
1246
|
+
shapeType: 'Forme',
|
|
1247
|
+
rotationAngle: 'Angolo di Rotazione',
|
|
1248
|
+
starCount: 'Conteggio delle stelle',
|
|
1249
|
+
concavity: 'Concavità',
|
|
1250
|
+
arrowHeight: 'Altezza Freccia',
|
|
1251
|
+
arrowWidth: 'Larghezza Freccia',
|
|
1252
|
+
lineStyle: 'Stile di linea',
|
|
1253
|
+
fillColor: 'Colore di Riempimento',
|
|
1254
|
+
shapeTypes: {
|
|
1255
|
+
ellipse: 'Ellisse',
|
|
1256
|
+
triangle: 'Triangolo',
|
|
1257
|
+
rightAngleTriangle: 'Triangolo Rettangolo',
|
|
1258
|
+
rectangle: 'Rettangolo',
|
|
1259
|
+
hexagon: 'Esagono',
|
|
1260
|
+
pentagon: 'Pentagono',
|
|
1261
|
+
octagon: 'Ottagono',
|
|
1262
|
+
star: 'Stella',
|
|
1263
|
+
leftArrow: 'Freccia Sinistra',
|
|
1264
|
+
rightArrow: 'Freccia Destra',
|
|
1265
|
+
upArrow: 'Freccia Su',
|
|
1266
|
+
downArrow: 'Freccia Giù',
|
|
1267
|
+
},
|
|
1268
|
+
lineStyles: {
|
|
1269
|
+
dashed: 'Tratteggiato',
|
|
1270
|
+
dotted: 'Puntinato',
|
|
1271
|
+
dashdotdot: 'Trattino Punto Punto',
|
|
1272
|
+
dashdot: 'Trattino Punto',
|
|
1273
|
+
solid: 'Continuo'
|
|
1274
|
+
}
|
|
1275
|
+
}, toolTip: {
|
|
1276
|
+
requirements: 'Mostra elementi in Forme',
|
|
1277
|
+
description: 'Visualizza dati con forme personalizzabili.',
|
|
1278
|
+
title: 'Forma'
|
|
1279
|
+
}
|
|
1280
|
+
};
|
|
1281
|
+
EJShape.Locale['tr-TR'] = {
|
|
1282
|
+
basicSettings: {
|
|
1283
|
+
categoryName: 'Temel Ayarlar',
|
|
1284
|
+
shapeType: 'Şekiller',
|
|
1285
|
+
rotationAngle: 'Dönme Açısı',
|
|
1286
|
+
concavity: 'Konkavite',
|
|
1287
|
+
starCount: 'Yıldız Sayısı',
|
|
1288
|
+
arrowHeight: 'Ok Yüksekliği',
|
|
1289
|
+
arrowWidth: 'Ok Genişliği',
|
|
1290
|
+
lineStyle: 'Çizgi Stili',
|
|
1291
|
+
fillColor: 'Dolgu Rengi',
|
|
1292
|
+
shapeTypes: {
|
|
1293
|
+
ellipse: 'Elips',
|
|
1294
|
+
star: 'Yıldız',
|
|
1295
|
+
leftArrow: 'Sol Ok',
|
|
1296
|
+
rightArrow: 'Sağ Ok',
|
|
1297
|
+
upArrow: 'Yukarı Ok',
|
|
1298
|
+
downArrow: 'Aşağı Ok',
|
|
1299
|
+
rectangle: 'Dikdörtgen',
|
|
1300
|
+
hexagon: 'Altıgen',
|
|
1301
|
+
triangle: 'Üçgen',
|
|
1302
|
+
pentagon: 'Beşgen',
|
|
1303
|
+
octagon: 'Sekizgen',
|
|
1304
|
+
rightAngleTriangle: 'Dik Açılı Üçgen',
|
|
1305
|
+
},
|
|
1306
|
+
lineStyles: {
|
|
1307
|
+
dashdotdot: 'Kesik Çizgi Nokta Nokta',
|
|
1308
|
+
dashdot: 'Kesik Çizgi Nokta',
|
|
1309
|
+
solid: 'Düz',
|
|
1310
|
+
dashed: 'Kesik Çizgi',
|
|
1311
|
+
dotted: 'Nokta'
|
|
1312
|
+
}
|
|
1313
|
+
},
|
|
1314
|
+
toolTip: {
|
|
1315
|
+
requirements: 'Şekillerde öğeleri görüntüle',
|
|
1316
|
+
description: 'Özelleştirilebilir şekillerle veri görselleştirme.',
|
|
1317
|
+
title: 'Şekil'
|
|
1318
|
+
}
|
|
1319
|
+
};
|
|
1320
|
+
EJShape.Locale['zh-CN'] = {
|
|
1321
|
+
basicSettings: {
|
|
1322
|
+
categoryName: '基本设置',
|
|
1323
|
+
shapeType: '形状',
|
|
1324
|
+
rotationAngle: '旋转角度',
|
|
1325
|
+
arrowHeight: '箭头高度',
|
|
1326
|
+
arrowWidth: '箭头宽度',
|
|
1327
|
+
starCount: '星星数',
|
|
1328
|
+
concavity: '凹度',
|
|
1329
|
+
lineStyle: '线条样式',
|
|
1330
|
+
fillColor: '填充颜色',
|
|
1331
|
+
shapeTypes: {
|
|
1332
|
+
ellipse: '椭圆',
|
|
1333
|
+
triangle: '三角形',
|
|
1334
|
+
rightAngleTriangle: '直角三角形',
|
|
1335
|
+
rectangle: '长方形',
|
|
1336
|
+
hexagon: '六边形',
|
|
1337
|
+
pentagon: '五边形',
|
|
1338
|
+
octagon: '八边形',
|
|
1339
|
+
star: '星形',
|
|
1340
|
+
leftArrow: '左箭头',
|
|
1341
|
+
rightArrow: '右箭头',
|
|
1342
|
+
upArrow: '上箭头',
|
|
1343
|
+
downArrow: '下箭头',
|
|
1344
|
+
},
|
|
1345
|
+
lineStyles: {
|
|
1346
|
+
dashed: '虚线',
|
|
1347
|
+
dotted: '点线',
|
|
1348
|
+
dashdotdot: '点划点线',
|
|
1349
|
+
dashdot: '点划线',
|
|
1350
|
+
solid: '实线'
|
|
1351
|
+
}
|
|
1352
|
+
},
|
|
1353
|
+
toolTip: {
|
|
1354
|
+
requirements: '显示形状中的项目',
|
|
1355
|
+
description: '使用可定制的形状来可视化数据。',
|
|
1356
|
+
title: '形状'
|
|
1357
|
+
}
|
|
1358
|
+
};
|