Skip to content

Commit 5e0c585

Browse files
author
pipeline
committed
v22.2.7 is released
1 parent 706b624 commit 5e0c585

File tree

41,107 files changed

+1732
-7456222
lines changed

Some content is hidden

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

41,107 files changed

+1732
-7456222
lines changed

controls/base/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-base",
3-
"version": "22.1.38",
3+
"version": "22.2.5",
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/buttons/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-
## 22.2.5 (2023-07-27)
5+
## 22.2.7 (2023-08-02)
66

77
### Checkbox
88

controls/charts/CHANGELOG.md

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

33
## [Unreleased]
44

5+
## 22.2.7 (2023-08-02)
6+
7+
### Chart
8+
9+
#### Bug Fixes
10+
11+
- `#I479445` - Now, the legend opacity is working properly in the chart.
12+
- `#F183350` - Fixed an issue where the multicolored area was not working properly in canvas mode.
13+
- `#I481085` - The issue where the Legend gets cut off when `enablePages` is set to false has been resolved.
14+
- `#I481219` - Now, SelectedDataIndexes are properly updated when it is cleared on button click.
15+
- `#I482650` - Now the chart is proper when refreshed after zooming in and out.
16+
517
## 22.2.5 (2023-07-27)
618

719
### 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": "22.1.39",
3+
"version": "22.2.5",
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/legend/legend.spec.ts

Lines changed: 59 additions & 55 deletions
Large diffs are not rendered by default.

controls/charts/spec/pie/renderer/legend.spec.ts

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,6 @@ describe('Legend checking for the pie series', () => {
787787
},
788788
position: 'Bottom',
789789
margin: { top: 10 },
790-
enablePages: false
791790
},
792791
// Initialize tht tooltip
793792
tooltip: { enable: true, format: '${point.x} : <b>${point.y}</b>' },
@@ -825,14 +824,14 @@ describe('Legend checking for the pie series', () => {
825824
xValue = titleElement.getAttribute('x');
826825
expect(xValue === '150').toBe(true);
827826
yValue = titleElement.getAttribute('y');
828-
expect(yValue === '254.989169209323' || yValue === '255.98433900949567').toBe(true);
827+
expect(yValue === '229.01694285833028' || yValue === '255.98433900949567').toBe(true);
829828
backArrow = getElement('container_chart_legend_pageup');
830829
path = backArrow.getAttribute('d');
831-
expect(path === 'M 44 267.489169209323 L 36 271.489169209323 L 44 275.489169209323 L 44 273.489169209323 L 40 271.489169209323 L44 269.489169209323 Z' ||
830+
expect(path === 'M 36 286.51694285833025 L 28 290.51694285833025 L 36 294.51694285833025 L 36 292.51694285833025 L 32 290.51694285833025 L36 288.51694285833025 Z' ||
832831
path === 'M 27 268.48433900949567 L 19 272.48433900949567 L 27 276.48433900949567 L 27 274.48433900949567 L 23 272.48433900949567 L27 270.48433900949567 Z').toBe;
833832
fontArrow = getElement('container_chart_legend_pagedown');
834833
path = fontArrow.getAttribute('d');
835-
expect(path === 'M 256 267.489169209323 L 264 271.489169209323 L 256 275.489169209323 L 256 273.489169209323 L 260 271.489169209323 L256 269.489169209323 Z'||
834+
expect(path === 'M 70 286.51694285833025 L 78 290.51694285833025 L 70 294.51694285833025 L 70 292.51694285833025 L 74 290.51694285833025 L70 288.51694285833025 Z'||
836835
path === 'M 273 268.48433900949567 L 281 272.48433900949567 L 273 276.48433900949567 L 273 274.48433900949567 L 277 272.48433900949567 L273 270.48433900949567 Z').toBe;
837836
legendGroup = getElement('container_chart_legend_translate_g');
838837
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -847,16 +846,16 @@ describe('Legend checking for the pie series', () => {
847846
titleElement = getElement('container_chart_legend_title');
848847
expect(titleElement.textContent === 'Countries').toBe(true);
849848
xValue = titleElement.getAttribute('x');
850-
expect(xValue === '17' || xValue === '19.5').toBe(true);
849+
expect(xValue === '17' || xValue === '33').toBe(true);
851850
yValue = titleElement.getAttribute('y');
852-
expect(yValue === '276.21622576014306' || yValue === '275.96501821018626').toBe(true);
851+
expect(yValue === '254.51694285833028' || yValue === '275.96501821018626').toBe(true);
853852
backArrow = getElement('container_chart_legend_pageup');
854853
path = backArrow.getAttribute('d');
855-
expect(path === 'M 88 268.46501821018626 L 80 272.46501821018626 L 88 276.46501821018626 L 88 274.46501821018626 L 84 272.46501821018626 L88 270.46501821018626 Z' ||
854+
expect(path === 'M 36 278.51694285833025 L 28 282.51694285833025 L 36 286.51694285833025 L 36 284.51694285833025 L 32 282.51694285833025 L36 280.51694285833025 Z' ||
856855
path === 'M 98 267.71501821018626 L 90 271.71501821018626 L 98 275.71501821018626 L 98 273.71501821018626 L 94 271.71501821018626 L98 269.71501821018626 Z').toBe;
857856
fontArrow = getElement('container_chart_legend_pagedown');
858857
path = fontArrow.getAttribute('d');
859-
expect(path === 'M 271 268.46501821018626 L 279 272.46501821018626 L 271 276.46501821018626 L 271 274.46501821018626 L 275 272.46501821018626 L271 270.46501821018626 Z' ||
858+
expect(path === 'M 70 278.51694285833025 L 78 282.51694285833025 L 70 286.51694285833025 L 70 284.51694285833025 L 74 282.51694285833025 L70 280.51694285833025 Z' ||
860859
path === 'M 256 267.71501821018626 L 264 271.71501821018626 L 256 275.71501821018626 L 256 273.71501821018626 L 260 271.71501821018626 L256 269.71501821018626 Z').toBe;
861860
legendGroup = getElement('container_chart_legend_translate_g');
862861
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -871,16 +870,16 @@ describe('Legend checking for the pie series', () => {
871870
titleElement = getElement('container_chart_legend_title');
872871
expect(titleElement.textContent === 'Countries').toBe(true);
873872
xValue = titleElement.getAttribute('x');
874-
expect(xValue === '224' || xValue === '226.5').toBe(true);
873+
expect(xValue === '208' || xValue === '226.5').toBe(true);
875874
yValue = titleElement.getAttribute('y');
876-
expect(yValue === '276.21622576014306' || yValue === '275.96501821018626').toBe(true);
875+
expect(yValue === '254.51694285833028' || yValue === '275.96501821018626').toBe(true);
877876
backArrow = getElement('container_chart_legend_pageup');
878877
path = backArrow.getAttribute('d');
879-
expect(path === 'M 38.5 267.46622576014306 L 30.5 271.46622576014306 L 38.5 275.46622576014306 L 38.5 273.46622576014306 L 34.5 271.46622576014306 L38.5 269.46622576014306 Z' ||
878+
expect(path === 'M 36 278.51694285833025 L 28 282.51694285833025 L 36 286.51694285833025 L 36 284.51694285833025 L 32 282.51694285833025 L36 280.51694285833025 Z' ||
880879
path === 'M 29 268.46501821018626 L 21 272.46501821018626 L 29 276.46501821018626 L 29 274.46501821018626 L 25 272.46501821018626 L29 270.46501821018626 Z').toBe;
881880
fontArrow = getElement('container_chart_legend_pagedown');
882881
path = fontArrow.getAttribute('d');
883-
expect(path === 'M 197.5 267.46622576014306 L 205.5 271.46622576014306 L 197.5 275.46622576014306 L 197.5 273.46622576014306 L 201.5 271.46622576014306 L197.5 269.46622576014306 Z' ||
882+
expect(path === 'M 70 278.51694285833025 L 78 282.51694285833025 L 70 286.51694285833025 L 70 284.51694285833025 L 74 282.51694285833025 L70 280.51694285833025 Z' ||
884883
path === 'M 207 268.46501821018626 L 215 272.46501821018626 L 207 276.46501821018626 L 207 274.46501821018626 L 211 272.46501821018626 L207 270.46501821018626 Z').toBe;
885884
legendGroup = getElement('container_chart_legend_translate_g');
886885
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -918,14 +917,14 @@ describe('Legend checking for the pie series', () => {
918917
xValue = titleElement.getAttribute('x');
919918
expect(xValue === '150').toBe(true);
920919
yValue = titleElement.getAttribute('y');
921-
expect(yValue === '35' || yValue === '31.999999999999993').toBe(true);
920+
expect(yValue === '32' || yValue === '31.999999999999993').toBe(true);
922921
backArrow = getElement('container_chart_legend_pageup');
923922
path = backArrow.getAttribute('d');
924-
expect(path === 'M 44 47.5 L 36 51.5 L 44 55.5 L 44 53.5 L 40 51.5 L44 49.5 Z' ||
923+
expect(path === 'M 36 89.5 L 28 93.5 L 36 97.5 L 36 95.5 L 32 93.5 L36 91.5 Z' ||
925924
path === 'M 48.5 44.49999999999999 L 40.5 48.49999999999999 L 48.5 52.49999999999999 L 48.5 50.49999999999999 L 44.5 48.49999999999999 L48.5 46.49999999999999 Z').toBe;
926925
fontArrow = getElement('container_chart_legend_pagedown');
927926
path = fontArrow.getAttribute('d');
928-
expect(path === 'M 256 47.5 L 264 51.5 L 256 55.5 L 256 53.5 L 260 51.5 L256 49.5 Z' ||
927+
expect(path === 'M 70 89.5 L 78 93.5 L 70 97.5 L 70 95.5 L 74 93.5 L70 91.5 Z' ||
929928
path === 'M 251.5 44.49999999999999 L 259.5 48.49999999999999 L 251.5 52.49999999999999 L 251.5 50.49999999999999 L 255.5 48.49999999999999 L251.5 46.49999999999999 Z').toBe;
930929
legendGroup = getElement('container_chart_legend_translate_g');
931930
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -941,17 +940,17 @@ describe('Legend checking for the pie series', () => {
941940
titleElement = getElement('container_chart_legend_title');
942941
expect(titleElement.textContent === 'Countries').toBe(true);
943942
xValue = titleElement.getAttribute('x');
944-
expect(xValue === '17' || xValue === '19.5').toBe(true);
943+
expect(xValue === '17' || xValue === '33').toBe(true);
945944
yValue = titleElement.getAttribute('y');
946-
expect(yValue === '37.25' || yValue === '36').toBe(true);
945+
expect(yValue === '52.25' || yValue === '57.5').toBe(true);
947946
backArrow = getElement('container_chart_legend_pageup');
948947
path = backArrow.getAttribute('d');
949-
expect(path === 'M 97.5 28.5 L 89.5 32.5 L 97.5 36.5 L 97.5 34.5 L 93.5 32.5 L97.5 30.5 Z' ||
948+
expect(path === 'M 36 81.5 L 28 85.5 L 36 89.5 L 36 87.5 L 32 85.5 L36 83.5 Z' ||
950949
path === 'M 88 28.5 L 80 32.5 L 88 36.5 L 88 34.5 L 84 32.5 L88 30.5 Z').toBe;
951950
fontArrow = getElement('container_chart_legend_pagedown');
952951
path = fontArrow.getAttribute('d');
953952
expect(path === 'M 261.5 28.5 L 269.5 32.5 L 261.5 36.5 L 261.5 34.5 L 265.5 32.5 L261.5 30.5 Z' ||
954-
path === 'M 271 28.5 L 279 32.5 L 271 36.5 L 271 34.5 L 275 32.5 L271 30.5 Z').toBe;
953+
path === 'M 70 81.5 L 78 85.5 L 70 89.5 L 70 87.5 L 74 85.5 L70 83.5 Z').toBe;
955954
legendGroup = getElement('container_chart_legend_translate_g');
956955
expect(legendGroup.childElementCount === 7).toBe(true);
957956
done();
@@ -966,16 +965,16 @@ describe('Legend checking for the pie series', () => {
966965
titleElement = getElement('container_chart_legend_title');
967966
expect(titleElement.textContent === 'Countries').toBe(true);
968967
xValue = titleElement.getAttribute('x');
969-
expect(xValue === '224' || xValue === '226.5').toBe(true);
968+
expect(xValue === '208' || xValue === '226.5').toBe(true);
970969
yValue = titleElement.getAttribute('y');
971-
expect(yValue === '37.25' || yValue === '36').toBe(true);
970+
expect(yValue === '57.5' || yValue === '52').toBe(true);
972971
backArrow = getElement('container_chart_legend_pageup');
973972
path = backArrow.getAttribute('d');
974-
expect(path === 'M 29 28.5 L 21 32.5 L 29 36.5 L 29 34.5 L 25 32.5 L29 30.5 Z' ||
973+
expect(path === 'M 36 81.5 L 28 85.5 L 36 89.5 L 36 87.5 L 32 85.5 L36 83.5 Z' ||
975974
path === 'M 44 28.5 L 36 32.5 L 44 36.5 L 44 34.5 L 40 32.5 L44 30.5 Z').toBe;
976975
fontArrow = getElement('container_chart_legend_pagedown');
977976
path = fontArrow.getAttribute('d');
978-
expect(path === 'M 207 28.5 L 215 32.5 L 207 36.5 L 207 34.5 L 211 32.5 L207 30.5 Z' ||
977+
expect(path === 'M 70 81.5 L 78 85.5 L 70 89.5 L 70 87.5 L 74 85.5 L70 83.5 Z' ||
979978
path === 'M 197 28.5 L 205 32.5 L 197 36.5 L 197 34.5 L 201 32.5 L197 30.5 Z').toBe;
980979
legendGroup = getElement('container_chart_legend_translate_g');
981980
expect(legendGroup.childElementCount === 7).toBe(true);
@@ -991,23 +990,25 @@ describe('Legend checking for the pie series', () => {
991990
titleElement = getElement('container_chart_legend_title');
992991
expect(titleElement.textContent === 'Countries').toBe(true);
993992
xValue = titleElement.getAttribute('x');
994-
expect(xValue === '339.5').toBe(true);
993+
console.log(xValue);
994+
expect(xValue === '334.6450498628827').toBe(true);
995995
yValue = titleElement.getAttribute('y');
996+
console.log(yValue);
996997
expect(yValue === '29' || yValue === '26').toBe(true);
997998
backArrow = getElement('container_chart_legend_pageup');
998999
path = backArrow.getAttribute('d');
999-
expect(path === 'M 335.5 45 L 339.5 37 L 343.5 45L 341.5 45 L 339.5 41L337.5 45 Z' ||
1000+
expect(path === 'M 292.6450498628827 139 L 284.6450498628827 143 L 292.6450498628827 147 L 292.6450498628827 145 L 288.6450498628827 143 L292.6450498628827 141 Z' ||
10001001
path === 'M 335.5 42 L 339.5 34 L 343.5 42L 341.5 42 L 339.5 38L337.5 42 Z').toBe;
10011002
fontArrow = getElement('container_chart_legend_pagedown');
10021003
path = fontArrow.getAttribute('d');
1003-
expect(path === 'M 335.5 174 L 339.5 182 L 343.5 174L 341.5 174 L 339.5 178L337.5 174 Z' ||
1004+
expect(path === 'M 326.6450498628827 139 L 334.6450498628827 143 L 326.6450498628827 147 L 326.6450498628827 145 L 330.6450498628827 143 L326.6450498628827 141 Z'||
10041005
path === 'M 335.5 174 L 339.5 182 L 343.5 174L 341.5 174 L 339.5 178L337.5 174 Z').toBe;
10051006
legendGroup = getElement('container_chart_legend_translate_g');
10061007
expect(legendGroup.childElementCount === 7).toBe(true);
10071008
done();
10081009
};
10091010
chartContainer.style.width = '400px';
1010-
chartContainer.style.height = '200px';
1011+
chartContainer.style.height = '150px';
10111012
pieObj.legendSettings.title = 'Countries';
10121013
pieObj.legendSettings.titlePosition = 'Top';
10131014
pieObj.legendSettings.position = 'Right';

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,6 +2267,7 @@ export class AccumulationChart extends Component<HTMLElement> implements INotify
22672267
if (isNullOrUndefined(this.accumulationSelectionModule.selectedDataIndexes)) {
22682268
this.accumulationSelectionModule.invokeSelection(this);
22692269
} else {
2270+
this.accumulationSelectionModule.selectedDataIndexes = this.selectedDataIndexes as Indexes[];
22702271
this.accumulationSelectionModule.redrawSelection(this);
22712272
}
22722273
}

controls/charts/src/accumulation-chart/user-interaction/selection.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,11 @@ export class AccumulationSelection extends BaseSelection {
301301
for (const index of indexes) {
302302
this.removeStyles([this.getElementByIndex(index)], index);
303303
}
304+
const points: AccPoints[] = accumulation.visibleSeries[0].points;
305+
for (let i: number = 0; i < points.length; i++) {
306+
const index: Index = new Index(0, points[i as number].index)
307+
this.removeStyles([this.getElementByIndex(index)], index);
308+
}
304309
}
305310
/**
306311
* To perform the selection for legend elements.

controls/charts/src/chart/series/multi-colored-base.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,12 @@ export class MultiColoredSeries extends LineBase {
151151
attributeOptions.fill = 'transparent';
152152
}
153153
pathAnimation(getElement(attributeOptions.id), attributeOptions.d, chart.redraw);
154-
series.seriesElement.appendChild(
155-
chart.renderer.drawPath(attributeOptions)
156-
);
154+
series.pathElement = chart.renderer.drawPath(attributeOptions);
155+
if (!series.chart.enableCanvas) {
156+
series.seriesElement.appendChild(
157+
chart.renderer.drawPath(attributeOptions)
158+
);
159+
}
157160
});
158161
}
159162
}
@@ -206,9 +209,11 @@ export class MultiColoredSeries extends LineBase {
206209
height: series.yAxis.isInversed ? startPointLocation.y - endPointLocation.y : endPointLocation.y - startPointLocation.y
207210
}
208211
);
209-
series.seriesElement.appendChild(
210-
appendClipElement(series.chart.redraw, options, series.chart.renderer as SvgRenderer)
211-
);
212+
if (!series.chart.enableCanvas) {
213+
series.seriesElement.appendChild(
214+
appendClipElement(series.chart.redraw, options, series.chart.renderer as SvgRenderer)
215+
);
216+
}
212217
return 'url(#' + series.chart.element.id + '_ChartSegment' + series.index + 'ClipRect_' + index + ')';
213218
}
214219
return null;

controls/charts/src/common/legend/legend.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ export class BaseLegend {
835835
}
836836
count++;
837837
}
838-
if (this.isPaging && this.totalPages > 1) {
838+
if (this.isPaging && this.totalPages > 1 && (this.isBulletChartControl || legend.enablePages)) {
839839
this.renderPagingElements(chart, legendBounds, textOptions, legendGroup);
840840
} else {
841841
this.totalPages = 1;
@@ -1156,7 +1156,7 @@ export class BaseLegend {
11561156
}
11571157
const symbolOption: PathOption = new PathOption(
11581158
this.legendID + this.generateId(legendOption, '_shape_', legendIndex), symbolColor, strokewidth,
1159-
(isCustomBorder ? borderColor : symbolColor), 1, legendOption.dashArray, '');
1159+
(isCustomBorder ? borderColor : symbolColor), this.legend.opacity, legendOption.dashArray, '');
11601160
const textSize: Size = measureText(legendOption.text, this.legend.textStyle, this.chart.themeStyle.legendLabelFont);
11611161
const x: number = this.legend.isInversed && !this.isRtlEnable ? legendOption.location.x + textSize.width + this.legend.shapePadding
11621162
: legendOption.location.x;

controls/charts/src/common/utils/helper.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1903,6 +1903,12 @@ export function calculateSize(chart: Chart | AccumulationChart | RangeNavigator
19031903
chart.element.getBoundingClientRect().width / chart.availableSize.width : 1;
19041904
scaleY = chart.element.getBoundingClientRect().height > 0 ?
19051905
chart.element.getBoundingClientRect().height / chart.availableSize.height : 1;
1906+
let transformValue: string = chart.element.style.transform;
1907+
if (transformValue) {
1908+
let scaleValue: number = parseFloat(transformValue.match(/scale\((.*?)\)/)[1]);
1909+
scaleX = scaleValue ? scaleX / scaleValue : scaleX;
1910+
scaleY = scaleValue ? scaleY / scaleValue : scaleY;
1911+
}
19061912
chart.availableSize.width = chart.availableSize.width * scaleX;
19071913
chart.availableSize.height = chart.availableSize.height * scaleY;
19081914
(chart as Chart).scaleX = scaleX;

0 commit comments

Comments
 (0)