Skip to content

Commit d2521f6

Browse files
author
pipeline
committed
v25.1.39 is released
1 parent c8e4b15 commit d2521f6

File tree

216 files changed

+5534
-2292
lines changed

Some content is hidden

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

216 files changed

+5534
-2292
lines changed

Diff for: controls/barcodegenerator/CHANGELOG.md

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

33
## [Unreleased]
44

5-
## 25.1.38 (2024-04-02)
5+
## 25.1.39 (2024-04-09)
66

77
### Barcode
88

Diff for: controls/buttons/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## [Unreleased]
44

5+
## 25.1.39 (2024-04-09)
6+
7+
### Checkbox
8+
9+
#### Bug Fixes
10+
11+
- `#I574511` - The issue with "script error thrown while clicking the checkbox through JS." has been resolved.
12+
513
## 25.1.35 (2024-03-15)
614

715
### Checkbox

Diff for: controls/buttons/src/check-box/check-box.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,14 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
167167

168168
private changeState(state?: string, isInitialize?: boolean ): void {
169169
let ariaState: string;
170+
let wrapper: Element = this.getWrapper() as Element;
170171
let rippleSpan: Element | null = null;
171-
const frameSpan: Element = (this.getWrapper() as Element).getElementsByClassName(FRAME)[0];
172-
if (isRippleEnabled) {
173-
rippleSpan = (this.getWrapper() as Element).getElementsByClassName(RIPPLE)[0];
172+
let frameSpan: Element | null = null;
173+
if (wrapper) {
174+
frameSpan = wrapper.getElementsByClassName(FRAME)[0];
175+
if (isRippleEnabled) {
176+
rippleSpan = wrapper.getElementsByClassName(RIPPLE)[0];
177+
}
174178
}
175179
if (state === 'check') {
176180
if (frameSpan) {

Diff for: controls/calendars/src/maskbase/masked-date-time.ts

+3-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class MaskedDateTime {
4848
private isNavigate : boolean = false;
4949
private navigated : boolean = false;
5050
private isBlur : boolean = false;
51-
private formatRegex : RegExp = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
51+
private formatRegex : RegExp = /EEEEE|EEEE|EEE|EE|E|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yyy|yy|y|HH|H|hh|h|mm|m|fff|ff|f|aa|a|ss|s|zzzz|zzz|zz|z|'[^']*'|'[^']*'/g;
5252
private isDeletion: boolean = false;
5353
private isShortYear: boolean = false;
5454
private isDeleteKey: boolean = false;
@@ -383,6 +383,7 @@ export class MaskedDateTime {
383383
let year: number = (this.isYearPart && (newDateValue.getFullYear().toString().length < 4
384384
&& !this.isShortYear) ? newDateValue.getFullYear() * 10 : 0) + parseInt(newVal[start - 1], 10);
385385
let yearValue: number = (this.dateformat.match(/y/g) || []).length;
386+
yearValue = yearValue !== 2 ? 4 : yearValue;
386387
this.isShortYear = false;
387388
this.isYearZero = (newVal[start - 1] === '0' );
388389
if (isNaN(year)) {
@@ -581,6 +582,7 @@ export class MaskedDateTime {
581582
result = proxy.zeroCheck(proxy.isYearZero , proxy.isYearPart , result );
582583
break;
583584
case 'y':
585+
case 'yyy':
584586
case 'yyyy':
585587
result = proxy.isYearPart ? proxy.roundOff(proxy.maskDateValue.getFullYear(), 4) : proxy.defaultConstant['year'].toString();
586588
result = proxy.zeroCheck(proxy.isYearZero , proxy.isYearPart , result );

Diff for: controls/charts/CHANGELOG.md

+17
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,25 @@
22

33
## [Unreleased]
44

5+
## 25.1.39 (2024-04-09)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#I571372` - The first axis label does not shift to the left when using `edgelabelplacement` as `shift`.
12+
- `#I571107` - When the chart is resized, the console error will no longer be thrown.
13+
514
## 25.1.38 (2024-04-02)
615

16+
### Chart
17+
18+
#### Bug Fixes
19+
20+
- `#I532022` - Now, the datalabel position is properly set when the position property is set to `Auto`.
21+
22+
## 25.1.37 (2024-03-26)
23+
724
### AccumulationChart
825

926
#### Bug Fixes

Diff for: controls/charts/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-charts",
3-
"version": "25.1.35",
3+
"version": "25.1.38",
44
"description": "Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

Diff for: controls/charts/spec/chart/series/line-and-area-series.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ describe('Chart Control Series', () => {
21712171
it('Datalabel count check', (done: Function) => {
21722172
chartObj.loaded = (args: Object): void => {
21732173
let groupElement: Element = document.getElementById('containerTextGroup0');
2174-
expect(groupElement.childElementCount === 9).toBe(true);
2174+
expect(groupElement.childElementCount === 7).toBe(true);
21752175
done();
21762176
};
21772177
chartObj.refresh();

Diff for: controls/charts/src/chart/axis/cartesian-panel.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1435,8 +1435,8 @@ export class CartesianAxisLayoutPanel {
14351435
}
14361436
else if (isLeft && angle !== 0) {
14371437
intervalLength = rect.width / length;
1438-
if (intervalLength > rect.x + rotatedLabelSize.width) {
1439-
options.x = pointX = rect.x + rotatedLabelSize.width;
1438+
if (rect.x + intervalLength > options.x + rotatedLabelSize.width) {
1439+
options.x = pointX = rect.x + padding;
14401440
}
14411441
else{
14421442
options.x = pointX = rect.x + intervalLength - padding;

Diff for: controls/charts/src/chart/chart.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
20752075
'stroke-width': 1,
20762076
'stroke': 'Gray'
20772077
};
2078-
if (!this.seriesElements) {
2078+
if (!this.seriesElements || (options.height < 0 || options.width < 0)) {
20792079
return;
20802080
}
20812081
let clipRectElement: Element;
@@ -2701,6 +2701,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
27012701
this.element.id + '_ChartAreaBorder', this.chartArea.background,
27022702
{ width: this.chartArea.border.width, color: this.chartArea.border.color || this.themeStyle.areaBorder },
27032703
this.chartArea.opacity, this.chartAxisLayoutPanel.seriesClipRect, 0, 0, '', this.chartArea.border.dashArray);
2704+
if (rect.height < 0 || rect.width < 0) { return null; }
27042705
this.htmlObject = this.renderer.drawRectangle(rect) as HTMLElement;
27052706
this.htmlObject.setAttribute('aria-hidden', 'true');
27062707
appendChildElement(

Diff for: controls/charts/src/chart/series/data-label.ts

+25-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable jsdoc/require-returns */
22
/* eslint-disable valid-jsdoc */
33
/* eslint-disable jsdoc/require-param */
4-
import { ChartLocation, ColorValue, RectOption, isCollide, isOverlap, LabelLocation } from '../../common/utils/helper';
4+
import { ChartLocation, ColorValue, RectOption, isCollide, isOverlap, LabelLocation, rotateTextSize } from '../../common/utils/helper';
55
import { markerAnimate, appendChildElement, getVisiblePoints } from '../../common/utils/helper';
66
import { getLabelText, convertHexToColor, calculateRect, textElement, colorNameToHex } from '../../common/utils/helper';
77
import { Chart } from '../chart';
@@ -39,7 +39,7 @@ export class DataLabel {
3939
private inverted: boolean;
4040
private errorHeight: number = 0;
4141
private chartBackground: string;
42-
42+
private extraSpace: number;
4343
/**
4444
* Constructor for the data label module.
4545
*
@@ -147,7 +147,6 @@ export class DataLabel {
147147
this.yAxisInversed = series.yAxis.isAxisInverse;
148148
const redraw: boolean = chart.redraw;
149149
let isDataLabelOverlap: boolean = false;
150-
let coordinatesAfterRotation: ChartLocation[] = [];
151150
const templateId: string = chart.element.id + '_Series_' +
152151
(series.index === undefined ? series.category : series.index) + '_DataLabelCollections';
153152
const element: HTMLElement = createElement('div', {
@@ -199,7 +198,12 @@ export class DataLabel {
199198
if (argsData.template !== null) {
200199
this.createDataLabelTemplate(element, series, dataLabel, point, argsData, i, redraw);
201200
} else {
202-
textSize = measureText(argsData.text, dataLabel.font, this.chart.themeStyle.datalabelFont);
201+
if (dataLabel.enableRotation){
202+
textSize = rotateTextSize(dataLabel.font, argsData.text, dataLabel.angle, this.chart);
203+
}
204+
else {
205+
textSize = measureText(argsData.text, dataLabel.font, this.chart.themeStyle.datalabelFont);
206+
}
203207
rect = this.calculateTextPosition(point, series, textSize, dataLabel, i);
204208
// To check whether the polar radar chart datalabel intersects the axis label or not
205209
if (chart.chartAreaType === 'PolarRadar') {
@@ -216,10 +220,9 @@ export class DataLabel {
216220
const rectCoordinates: ChartLocation[] = this.getRectanglePoints(rect);
217221
rectCenterX = rect.x + (rect.width / 2);
218222
rectCenterY = (rect.y + (rect.height / 2));
219-
coordinatesAfterRotation = getRotatedRectangleCoordinates(rectCoordinates, rectCenterX, rectCenterY, angle);
220-
isDataLabelOverlap = (dataLabel.labelIntersectAction === 'Rotate90' || angle == -90) ? false : this.isDataLabelOverlapWithChartBound(coordinatesAfterRotation, chart, clip);
223+
isDataLabelOverlap = (dataLabel.labelIntersectAction === 'Rotate90' || angle == -90) ? false : this.isDataLabelOverlapWithChartBound(rectCoordinates, chart, clip);
221224
if (!isDataLabelOverlap) {
222-
this.chart.rotatedDataLabelCollections.push(coordinatesAfterRotation);
225+
this.chart.rotatedDataLabelCollections.push(rectCoordinates);
223226
const currentPointIndex: number = this.chart.rotatedDataLabelCollections.length - 1;
224227
for (let index: number = currentPointIndex; index >= 0; index--) {
225228
if (this.chart.rotatedDataLabelCollections[currentPointIndex as number] &&
@@ -256,7 +259,7 @@ export class DataLabel {
256259
rgbValue = convertHexToColor(colorNameToHex(backgroundColor));
257260
contrast = Math.round((rgbValue.r * 299 + rgbValue.g * 587 + rgbValue.b * 114) / 1000);
258261
xPos = (rect.x + this.margin.left + textSize.width / 2) + labelLocation.x;
259-
yPos = (rect.y + this.margin.top + textSize.height * 3 / 4) + labelLocation.y;
262+
yPos = dataLabel.enableRotation && this.chart.chartAreaType !== 'PolarRadar' ? (rect.y + this.margin.top + textSize.height / 2 + textSize.width / 4 + (dataLabel.position === 'Auto' ? point.regions[0].width / 10 : 0)) + labelLocation.y : (rect.y + this.margin.top + textSize.height * 3 / 4) + labelLocation.y;
260263
labelLocation = { x: 0, y: 0 };
261264
if (angle !== 0 && dataLabel.enableRotation) {
262265
// xValue = xPos - (dataLabel.margin.left) / 2 + (dataLabel.margin.right / 2);
@@ -584,8 +587,8 @@ export class DataLabel {
584587
}
585588
const padding: number = 5;
586589
const margin: MarginModel = this.margin;
587-
const textLength: number = !this.inverted ? textSize.height : textSize.width;
588-
let extraSpace: number = this.borderWidth + textLength / 2 + (position !== 'Outer' && series.type.indexOf('Column') > -1 &&
590+
const textLength: number = (series.marker.dataLabel.enableRotation ? textSize.width : (!this.inverted ? textSize.height : textSize.width));
591+
this.extraSpace = this.borderWidth + textLength / 2 + (position !== 'Outer' && series.type.indexOf('Column') > -1 &&
589592
(Math.abs(rect.height - textSize.height) < padding) ? 0 : padding);
590593
if (series.type === 'StackingColumn100' || series.type === 'StackingBar100') {
591594
position = (position === 'Outer') ? 'Top' : position;
@@ -598,10 +601,10 @@ export class DataLabel {
598601
switch (position) {
599602
case 'Bottom':
600603
labelLocation = !this.inverted ?
601-
isMinus ? (labelLocation + (series.type === 'Waterfall' ? (- extraSpace - margin.top - this.markerHeight) : (-rect.height + extraSpace + margin.top))) :
602-
(labelLocation + rect.height - extraSpace - margin.bottom) :
603-
isMinus ? (labelLocation + (series.type === 'Waterfall' ? (+ extraSpace + margin.left + this.markerHeight) : (+ rect.width - extraSpace - margin.left))) :
604-
(labelLocation - rect.width + extraSpace + margin.right);
604+
isMinus ? (labelLocation + (series.type === 'Waterfall' ? (- this.extraSpace - margin.top - this.markerHeight) : (-rect.height + this.extraSpace + margin.top))) :
605+
(labelLocation + rect.height - this.extraSpace - margin.bottom) :
606+
isMinus ? (labelLocation + (series.type === 'Waterfall' ? (+ this.extraSpace + margin.left + this.markerHeight) : (+ rect.width - this.extraSpace - margin.left))) :
607+
(labelLocation - rect.width + this.extraSpace + margin.right);
605608
break;
606609
case 'Middle':
607610
labelLocation = labelLocation = !this.inverted ?
@@ -612,8 +615,8 @@ export class DataLabel {
612615
labelLocation = this.calculateRectActualPosition(labelLocation, rect, isMinus, series, textSize, labelIndex, point);
613616
break;
614617
default:
615-
extraSpace += this.errorHeight;
616-
labelLocation = this.calculateTopAndOuterPosition(labelLocation, rect, position, series, labelIndex, extraSpace, isMinus);
618+
this.extraSpace += this.errorHeight;
619+
labelLocation = this.calculateTopAndOuterPosition(labelLocation, rect, position, series, labelIndex, this.extraSpace, isMinus);
617620

618621
break;
619622
}
@@ -697,8 +700,14 @@ export class DataLabel {
697700
labelLocation, rect, isMinus, actualPosition,
698701
series, size, labelIndex, point);
699702
if (!this.inverted) {
703+
if (series.marker.dataLabel.enableRotation) {
704+
size.width = size.width - point.regions[0].width / 10;
705+
}
700706
labelRect = calculateRect(new ChartLocation(this.locationX, location), size, this.margin);
701707
isOverLap = labelRect.y < 0 || isCollide(labelRect, collection, series.clipRect) || labelRect.y > series.clipRect.height;
708+
if (series.marker.dataLabel.template === null && isOverLap != true) {
709+
isOverLap = labelRect.y / 2 + size.height + (actualPosition === 'Outer' ? point.regions[0].height + this.extraSpace : point.regions[0].height - 2 * this.extraSpace) > series.clipRect.height;
710+
}
702711
} else {
703712
labelRect = calculateRect(new ChartLocation(location, this.locationY), size, this.margin);
704713
isOverLap = labelRect.x < 0 || isCollide(labelRect, collection, series.clipRect) ||

Diff for: controls/circulargauge/CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## [Unreleased]
66

7-
## 25.1.38 (2024-04-02)
7+
## 25.1.39 (2024-04-09)
88

99
### Circular Gauge
1010

Diff for: controls/diagrams/CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
## [Unreleased]
44

5+
## 25.1.39 (2024-04-09)
6+
7+
### Diagram
8+
9+
#### Bug Fixes
10+
11+
- `#I570446` - Now, zoom in and zoom out works properly while setting canZoomOut as true.
12+
- `#I561938` - Now, the connectors routed properly with shortest routing distance while using enable routing.
13+
- `#I565099` - Now, the undo redo works properly for swimlane after cut and delete.
14+
515
## 25.1.38 (2024-04-02)
616

717
### Diagram

Diff for: controls/diagrams/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-diagrams",
3-
"version": "25.1.37",
3+
"version": "25.1.38",
44
"description": "Feature-rich diagram control to create diagrams like flow charts, organizational charts, mind maps, and BPMN diagrams. Its rich feature set includes built-in shapes, editing, serializing, exporting, printing, overview, data binding, and automatic layouts.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",

0 commit comments

Comments
 (0)