Skip to content

Commit f912ce9

Browse files
author
pipeline
committed
v27.2.4 is released
1 parent d2913c6 commit f912ce9

File tree

97 files changed

+1094
-240
lines changed

Some content is hidden

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

97 files changed

+1094
-240
lines changed

controls/barcodegenerator/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.3 (2024-11-21)
5+
## 27.2.4 (2024-11-26)
66

77
### Barcode
88

controls/buttons/CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,20 @@
22

33
## [Unreleased]
44

5-
## 27.2.2 (2024-11-15)
5+
## 27.2.4 (2024-11-26)
66

77
### Checkbox
88

99
#### Bug Fixes
1010

1111
- `#F857466`- The issue with "Need to set the label tag for attribute if user changes the checkbox input id in checkbox component" has been resolved.
12+
13+
## 27.2.2 (2024-11-15)
14+
15+
### Checkbox
16+
17+
#### Bug Fixes
18+
1219
- `#F95768`- The issue with "Parent element click event `prevented` while clicking on switch component in angular." has been resolved.
1320

1421
## 27.1.58 (2024-11-05)

controls/calendars/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.2.3 (2024-11-21)
5+
## 27.2.4 (2024-11-26)
66

77
### DatePicker
88

controls/charts/CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,19 @@
22

33
## [Unreleased]
44

5+
## 27.2.4 (2024-11-26)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#I654525` - Now, the error bar is displayed properly for the larger value.
12+
- `#I653358` - Now, the text render event’s text argument contains the datetime for the y-axis.
13+
- `#I654788` - Now, the chart zooms properly while scrolling after it is destroyed and re-rendered.
14+
- `#I653576` - The data label position is now set correctly for the labelIntersectAction as Hide.
15+
- `#I653442` - The selection rectangle now renders properly in canvas mode.
16+
- `#I654149` - Now the spline series animation is proper when adding null values.
17+
518
## 27.2.3 (2024-11-21)
619

720
### Chart

controls/charts/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-charts",
3-
"version": "27.2.2",
3+
"version": "27.2.3",
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",

controls/charts/spec/chart/base/chart.spec.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,5 +1557,22 @@ describe('Chart Control', () => {
15571557
chart.loaded = loaded;
15581558
chart.appendTo('#element');
15591559
});
1560+
it('Checking the mousewheel event', (done: Function) => {
1561+
loaded = (args: Object): void => {
1562+
let wheelArgs: unknown = {
1563+
preventDefault: () => {
1564+
},
1565+
wheelDelta: 120,
1566+
detail: 3,
1567+
clientX: 210,
1568+
clientY: 100
1569+
};
1570+
chart.zoomSettings.enableMouseWheelZooming = true;
1571+
chart.chartOnMouseWheel(<WheelEvent>wheelArgs);
1572+
done();
1573+
};
1574+
chart.loaded = loaded;
1575+
chart.appendTo('#element');
1576+
});
15601577
});
15611578
});

controls/charts/src/chart/chart.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
30083008
const stopEvent: string = Browser.touchEndEvent;
30093009
const cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
30103010
/** UnBind the Event handler */
3011-
3011+
EventHandler.remove(this.element, 'mousewheel', this.chartOnMouseWheel);
30123012
EventHandler.remove(this.element, startEvent, this.chartOnMouseDown);
30133013
EventHandler.remove(this.element, moveEvent, this.mouseMove);
30143014
EventHandler.remove(this.element, stopEvent, this.mouseEnd);
@@ -3048,6 +3048,7 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
30483048
const cancelEvent: string = Browser.isPointer ? 'pointerleave' : 'mouseleave';
30493049

30503050
/** Bind the Event handler */
3051+
EventHandler.add(this.element, 'mousewheel', this.chartOnMouseWheel, this);
30513052
EventHandler.add(this.element, Browser.touchStartEvent, this.chartOnMouseDown, this);
30523053
EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMove, this);
30533054
EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEnd, this);
@@ -3822,6 +3823,25 @@ export class Chart extends Component<HTMLElement> implements INotifyPropertyChan
38223823
}
38233824
}
38243825

3826+
/**
3827+
* Handles the mouse wheel on the chart.
3828+
*
3829+
* @param {WheelEvent} e - The wheel event.
3830+
* @returns {boolean} - False.
3831+
* @private
3832+
*/
3833+
public chartOnMouseWheel(e: WheelEvent): boolean {
3834+
const offset: ClientRect = this.element.getBoundingClientRect();
3835+
const svgRect: ClientRect = getElement(this.svgId).getBoundingClientRect();
3836+
const mouseX: number = (e.clientX - offset.left) - Math.max(svgRect.left - offset.left, 0);
3837+
const mouseY: number = (e.clientY - offset.top) - Math.max(svgRect.top - offset.top, 0);
3838+
3839+
if (this.zoomSettings.enableMouseWheelZooming &&
3840+
withInBounds(mouseX, mouseY, this.chartAxisLayoutPanel.seriesClipRect)) {
3841+
this.notify('mousewheel', e);
3842+
}
3843+
return false;
3844+
}
38253845
/**
38263846
* Handles the mouse down on the chart.
38273847
*

controls/charts/src/chart/series/chart-series.ts

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1185,6 +1185,33 @@ export class SeriesBase extends ChildProperty<SeriesBase> {
11851185
}
11861186
}
11871187
this.updateSplineValue();
1188+
this.updateYAxisForErrorBars();
1189+
}
1190+
/**
1191+
* Calculates the errorbar and adds a range to axis if errorbar exeeds to the actual range.
1192+
*
1193+
* @returns {void}
1194+
* @private
1195+
*/
1196+
private updateYAxisForErrorBars(): void {
1197+
if (this instanceof Series) {
1198+
if (this.chart.errorBarModule) {
1199+
let maxVerticalError: number;
1200+
if (this.errorBar.verticalError) {
1201+
for (let i: number = 0; i < this.points.length; i++) {
1202+
const verticalErrors: number[] = [];
1203+
for (let i: number = 0; i < this.points.length; i++) {
1204+
const point: Points = this.points[i as number];
1205+
if (point.verticalError) {
1206+
verticalErrors.push(point.verticalError);
1207+
}
1208+
}
1209+
maxVerticalError = Math.max(...verticalErrors);
1210+
}
1211+
}
1212+
this.yMax += isNaN(maxVerticalError) ? maxVerticalError / 2 : 0;
1213+
}
1214+
}
11881215
}
11891216

11901217
/**
@@ -2765,7 +2792,8 @@ export class Series extends SeriesBase {
27652792
if (this.chart.enableAnimation && (!(this.isRectSeries || this.type === 'Bubble' || this.type === 'Scatter')) && (this.type.indexOf('step') === -1)) {
27662793
if (this.marker && this.marker.visible && this.visible) {
27672794
for (let i: number = this.points.length - 2; i >= 0; i--) {
2768-
if (this.points[i as number] && this.points[i as number].symbolLocations[0] !== undefined) {
2795+
if (this.points[i as number] && !isNullOrUndefined(this.points[this.points.length - 2].y) &&
2796+
this.points[i as number].symbolLocations && this.points[i as number].symbolLocations[0] !== undefined) {
27692797
this.chart.markerRender.renderMarker(this, this.points[this.points.length - 2],
27702798
this.points[i as number].symbolLocations[0], null, true);
27712799
break;

controls/charts/src/chart/series/data-label.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ export class DataLabel {
467467
!((rect.y > (clipRect.y + clipRect.height)) || (rect.x > (clipRect.x + clipRect.width)) ||
468468
(rect.x + rect.width < 0) || (rect.y + rect.height < 0))) {
469469
rect.x = rect.x < 0 ? padding : rect.x;
470-
rect.y = (rect.y < 0) && !(dataLabel.labelIntersectAction === 'None') ? padding : rect.y;
470+
rect.y = (rect.y < 0 && !this.chart.requireInvertedAxis) && !(dataLabel.labelIntersectAction === 'None') ? padding : rect.y;
471471
rect.x -= (rect.x + rect.width) > (clipRect.x + clipRect.width) ? (rect.x + rect.width)
472472
- (clipRect.x + clipRect.width) + padding : 0;
473473
rect.y -= (rect.y + rect.height) > (clipRect.y + clipRect.height) ? (rect.y + rect.height)

controls/charts/src/chart/series/spline-series.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ export class SplineSeries extends SplineBase {
4848
startPoint = 'L';
4949
}
5050
this.storePointLocation(point, series, isInverted, getCoordinate);
51-
if (direction === '') {
51+
if (direction === '' && points.length === 1) {
5252
direction = 'M ' + point.symbolLocations[0].x + ' ' + point.symbolLocations[0].y;
5353
}
54+
if (firstPoint === null && direction !== '' && (point.index === points.length - 1 || (points[point.index + 1] && !points[point.index + 1].visible))) {
55+
direction += 'M ' + point.symbolLocations[0].x + ' ' + point.symbolLocations[0].y + ' ';
56+
}
5457
}
5558
firstPoint = point;
5659
} else {
@@ -142,10 +145,17 @@ export class SplineSeries extends SplineBase {
142145
const endPathCommands: string[] = (options.d).match(/[MLHVCSQTAZ][^MLHVCSQTAZ]*/g);
143146
const maxLength: number = Math.max(startPathCommands.length, endPathCommands.length);
144147
const minLength: number = Math.min(startPathCommands.length, endPathCommands.length);
148+
if (series.removedPointIndex === 0 && startPathCommands.length > endPathCommands.length && startPathCommands[2] && startPathCommands[2].indexOf('M') === 0) {
149+
startPathCommands.splice(0, startPathCommands.length - endPathCommands.length);
150+
points.previousDirection = startPathCommands.join('');
151+
}
145152
if (startPathCommands.length < endPathCommands.length) {
146153
for (let i: number = startPathCommands.length; i < endPathCommands.length; i++) {
147154
if (endPathCommands.length !== startPathCommands.length) {
148-
if (startPathCommands[startPathCommands.length - 1].indexOf('C') === 0) {
155+
if (endPathCommands.length === startPathCommands.length + 1 && endPathCommands[endPathCommands.length - 1].indexOf('M') === 0) {
156+
startPathCommands.push(endPathCommands[endPathCommands.length - 1]);
157+
}
158+
else if (startPathCommands[startPathCommands.length - 1].indexOf('C') === 0) {
149159
startPathCommands.push('L ' + ((startPathCommands[startPathCommands.length - 1]).split(' ').slice(-3)).join(' '));
150160
}
151161
else if (startPathCommands[startPathCommands.length - 1].indexOf('L') === 0) {

0 commit comments

Comments
 (0)