Skip to content

Commit 409852a

Browse files
author
pipeline
committed
v19.2.57 is released
1 parent bbff062 commit 409852a

File tree

126 files changed

+3127
-1256
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+3127
-1256
lines changed

controls/base/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.2.56 (2021-08-17)
5+
## 19.2.51 (2021-08-03)
66

77
### Common
88

controls/base/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-base",
3-
"version": "19.2.49",
3+
"version": "19.2.55",
44
"description": "A common package of Essential JS 2 base libraries, methods and class definitions",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/base/spec/intl/date-parser.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -867,7 +867,7 @@ describe('DateParser', () => {
867867
});
868868
it('year only format input returns correct year value',()=>{
869869
let tFormatter: Date = DateParser.dateParser('en', { format:'yy',calendar:'islamic' }, cldrData)('40');
870-
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1442');
870+
let iFormatter: Date = DateParser.dateParser('en', { format:'y',calendar:'islamic' }, cldrData)('1443');
871871
expect(iFormatter.getFullYear()).toBe(new Date().getFullYear());
872872
});
873873
it('full skeletom eleton returns proper value',()=>{

controls/base/src/intl/number-parser.ts

+1
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ export class NumberParser {
104104
} else {
105105
value = parser.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch);
106106
value = parser.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair);
107+
value = value.indexOf('-') !== -1 ? value.replace('-.','-0.') : value;
107108
if (value.indexOf('.') === 0) {
108109
value = '0' + value;
109110
}

controls/buttons/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.2.56 (2021-08-17)
5+
## 19.2.57 (2021-08-24)
66

77
### Checkbox
88

controls/charts/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 19.2.56 (2021-08-17)
5+
## 19.2.57 (2021-08-24)
66

77
### Chart
88

controls/circulargauge/CHANGELOG.md

+16
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,22 @@
44

55
## [Unreleased]
66

7+
## 19.2.57 (2021-08-24)
8+
9+
### CircularGauge
10+
11+
#### Bug Fixes
12+
13+
- `#F168138` - When the axis' maximum and minimum values are the same, the axis will not be rendered.
14+
15+
## 19.2.49 (2021-07-27)
16+
17+
### CircularGauge
18+
19+
#### Bug Fixes
20+
21+
- `#I334929` - When the `moveToCenter` property is enabled, the Circular Gauge will now be in the centre, with a `startAngle` of **241** to **269** and an `endAngle` of **150**.
22+
723
## 19.2.47 (2021-07-13)
824

925
### CircularGauge

controls/circulargauge/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-circulargauge",
3-
"version": "19.2.47",
3+
"version": "19.2.55",
44
"description": "Essential JS 2 CircularGauge Components",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

controls/circulargauge/spec/circulargauge/axes/axis.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ describe('Circular-Gauge Control', () => {
138138
it('Checking Axis minimum and maximum value as same with default interval', (done: Function) => {
139139
gauge.loaded = (args: ILoadedEventArgs): void => {
140140
svg = document.getElementById('container_Axis_0_Label_0');
141-
expect(svg.textContent == '-11').toBe(true);
141+
expect(svg == null).toBe(true);
142142
done();
143143
};
144144
gauge.axes[0].minimum = -10;
@@ -149,7 +149,7 @@ describe('Circular-Gauge Control', () => {
149149
it('Checking Axis minimum and maximum value as same with given interval', (done: Function) => {
150150
gauge.loaded = (args: ILoadedEventArgs): void => {
151151
svg = document.getElementById('container_Axis_0_Label_0');
152-
expect(svg.textContent == '-20').toBe(true);
152+
expect(svg == null).toBe(true);
153153
done();
154154
};
155155
gauge.axes[0].minimum = -10;

controls/circulargauge/src/circular-gauge/axes/axis-panel.ts

+40-34
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ export class AxisLayoutPanel {
217217
*/
218218

219219
private calculateNumericInterval(axis: Axis, rect: Rect): number {
220-
if (axis.majorTicks.interval !== null) {
220+
const allowComponentRender: boolean = ((!isNullOrUndefined(axis.minimum) && !isNullOrUndefined(axis.maximum) && axis.minimum !== axis.maximum) || (isNullOrUndefined(axis.minimum) || isNullOrUndefined(axis.maximum)));
221+
if (!allowComponentRender) {
222+
return 0;
223+
} else if (axis.majorTicks.interval !== null) {
221224
return axis.majorTicks.interval;
222225
}
223226
let totalAngle: number = axis.endAngle - axis.startAngle;
@@ -271,41 +274,43 @@ export class AxisLayoutPanel {
271274
let roundValue: number;
272275
const interval: number = axis.visibleRange.interval;
273276
const max: number = axis.visibleRange.max;
274-
for (let i: number = axis.visibleRange.min; (i <= max && interval); i += interval) {
275-
roundValue = axis.roundingPlaces ? parseFloat(i.toFixed(axis.roundingPlaces)) : i;
276-
argsData = {
277-
cancel: false, name: axisLabelRender, axis: axis,
278-
text: customLabelFormat ? style.format.replace(new RegExp('{value}', 'g'), format(roundValue)) :
279-
format(roundValue),
280-
value: roundValue
281-
};
282-
if (this.gauge.isBlazor) {
283-
const { axis, ...blazorArgsData } : IAxisLabelRenderEventArgs = argsData;
284-
argsData = blazorArgsData;
285-
}
286-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
287-
const axisLabelRenderSuccess: any = (argsData: IAxisLabelRenderEventArgs) => {
288-
if (!argsData.cancel) {
289-
axis.visibleLabels.push(new VisibleLabels(
290-
argsData.text, i
291-
));
292-
if (i === max && this.gauge.isBlazor && document.getElementById(this.gauge.element.id + '_AxesCollection')) {
293-
const currentLast: number = axis.visibleLabels.length ? axis.visibleLabels[axis.visibleLabels.length - 1].value
294-
: null;
295-
if ( currentLast === axis.visibleRange.max || axis.showLastLabel !== true) {
296-
this.getMaxLabelWidth(this.gauge, axis);
297-
axis.nearSize = axis.nearSize + axis.maxLabelSize.height;
298-
axis.farSize = axis.farSize + axis.maxLabelSize.height;
299-
this.axisRenderer.drawAxisLabels(
300-
axis, this.gauge.axes.length - 1,
301-
(document.getElementById(this.gauge.element.id + '_Axis_Group_' + (this.gauge.axes.length - 1))),
302-
this.gauge);
277+
if ((isNullOrUndefined(axis.minimum) && isNullOrUndefined(axis.maximum)) || axis.minimum !== axis.maximum) {
278+
for (let i: number = axis.visibleRange.min; (i <= max && interval); i += interval) {
279+
roundValue = axis.roundingPlaces ? parseFloat(i.toFixed(axis.roundingPlaces)) : i;
280+
argsData = {
281+
cancel: false, name: axisLabelRender, axis: axis,
282+
text: customLabelFormat ? style.format.replace(new RegExp('{value}', 'g'), format(roundValue)) :
283+
format(roundValue),
284+
value: roundValue
285+
};
286+
if (this.gauge.isBlazor) {
287+
const { axis, ...blazorArgsData }: IAxisLabelRenderEventArgs = argsData;
288+
argsData = blazorArgsData;
289+
}
290+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
291+
const axisLabelRenderSuccess: any = (argsData: IAxisLabelRenderEventArgs) => {
292+
if (!argsData.cancel) {
293+
axis.visibleLabels.push(new VisibleLabels(
294+
argsData.text, i
295+
));
296+
if (i === max && this.gauge.isBlazor && document.getElementById(this.gauge.element.id + '_AxesCollection')) {
297+
const currentLast: number = axis.visibleLabels.length ? axis.visibleLabels[axis.visibleLabels.length - 1].value
298+
: null;
299+
if (currentLast === axis.visibleRange.max || axis.showLastLabel !== true) {
300+
this.getMaxLabelWidth(this.gauge, axis);
301+
axis.nearSize = axis.nearSize + axis.maxLabelSize.height;
302+
axis.farSize = axis.farSize + axis.maxLabelSize.height;
303+
this.axisRenderer.drawAxisLabels(
304+
axis, this.gauge.axes.length - 1,
305+
(document.getElementById(this.gauge.element.id + '_Axis_Group_' + (this.gauge.axes.length - 1))),
306+
this.gauge);
307+
}
303308
}
304309
}
305-
}
306-
};
307-
axisLabelRenderSuccess.bind(this);
308-
this.gauge.trigger(axisLabelRender, argsData, axisLabelRenderSuccess);
310+
};
311+
axisLabelRenderSuccess.bind(this);
312+
this.gauge.trigger(axisLabelRender, argsData, axisLabelRenderSuccess);
313+
}
309314
}
310315
const lastLabel: number = axis.visibleLabels.length ? axis.visibleLabels[axis.visibleLabels.length - 1].value : null;
311316
const maxVal: number = axis.visibleRange.max;
@@ -426,6 +431,7 @@ export class AxisLayoutPanel {
426431
element = gauge.renderer.createGroup({
427432
id: gauge.element.id + '_Axis_Group_' + index
428433
});
434+
this.gauge.allowComponentRender = ((!isNullOrUndefined(axis.minimum) && !isNullOrUndefined(axis.maximum) && axis.minimum !== axis.maximum) || (isNullOrUndefined(axis.minimum) || isNullOrUndefined(axis.maximum)));
429435
renderer.checkAngles(axis);
430436
renderer.drawAxisOuterLine(axis, index, element, gauge);
431437
renderer.drawAxisRange(axis, index, element);

0 commit comments

Comments
 (0)