Skip to content

Commit f675be3

Browse files
author
pipeline
committed
v31.1.18 is released
1 parent 0f2fb0e commit f675be3

File tree

260 files changed

+6963
-2628
lines changed

Some content is hidden

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

260 files changed

+6963
-2628
lines changed

controls/base/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-
## 31.1.17 (2025-09-05)
5+
## 31.1.18 (2025-09-10)
66

77
### Common
88

controls/charts/CHANGELOG.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,28 @@
22

33
## [Unreleased]
44

5-
## 31.1.17 (2025-09-05)
5+
## 31.1.18 (2025-09-10)
66

77
### Chart
88

99
#### Bug Fixes
1010

11-
- `#T745980` - The legend text trim tooltip will no longer be cropped at the bottom of the legend bounds.
12-
- `#T754125` - The marker will no longer render when it exceeds the axis range.
11+
- `#T742786` - Trendlines now render correctly when dynamically enabled.
12+
- `#F69182` - Columns with a single X-axis value now render with the correct width.
13+
- `#T757693` - Now the secondary axis label renders properly when the position is set to 'inside'.
14+
15+
### 3D Chart
16+
17+
#### Bug Fixes
18+
19+
- `#T756018` - The axis label tooltip text now renders correctly without being trimmed.
1320

1421
## 30.2.6 (2025-08-19)
1522

1623
### Chart
1724

1825
#### Bug Fixes
1926

20-
- `#T745980` - The legend text and symbol will no longer overlap when RTL is enabled.
21-
22-
## 30.2.4 (2025-08-13)
23-
2427
### Accumulation Chart
2528

2629
#### Bug Fixes
@@ -70,8 +73,6 @@
7073

7174
- `#I653358` - Provided support for DateTime value type on the primary Y-axis.
7275

73-
## 30.1.37 (2025-06-25)
74-
7576
### Chart
7677

7778
#### Feature

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": "30.1.40",
3+
"version": "31.1.17",
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: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,97 @@ describe('Chart Control', () => {
521521
expect(document.getElementById('EJ2_Chart_ZoomTip').innerHTML).toEqual(" Zoom ");
522522
});
523523
});
524+
describe('Chart checking no data template', () => {
525+
let chart: Chart;
526+
let ele: HTMLElement;
527+
beforeAll((): void => {
528+
ele = createElement('div', { id: 'container' });
529+
document.body.appendChild(ele);
530+
chart = new Chart();
531+
chart.appendTo('#container');
532+
});
533+
534+
afterAll((): void => {
535+
chart.destroy();
536+
ele.remove();
537+
});
538+
it('checking no data template element', (done: Function) => {
539+
chart.loaded = (args: ILoadedEventArgs) => {
540+
chart.loaded = null;
541+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
542+
expect(templateElement != null);
543+
done();
544+
};
545+
chart.noDataTemplate = '<div>No data template</div>';
546+
chart.refresh();
547+
});
548+
it('checking with title', (done: Function) => {
549+
chart.loaded = (args: ILoadedEventArgs) => {
550+
chart.loaded = null;
551+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
552+
expect(templateElement != null);
553+
done();
554+
};
555+
chart.enableHtmlSanitizer = true;
556+
chart.title = 'Title';
557+
chart.subTitle = 'Title';
558+
chart.refresh();
559+
});
560+
it('checking with title position left', (done: Function) => {
561+
chart.loaded = (args: ILoadedEventArgs) => {
562+
chart.loaded = null;
563+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
564+
expect(templateElement != null);
565+
done();
566+
};
567+
chart.enableHtmlSanitizer = true;
568+
chart.title = 'Title';
569+
chart.subTitle = 'Title';
570+
chart.titleStyle.position = 'Left';
571+
chart.refresh();
572+
});
573+
it('checking with title position Bottom', (done: Function) => {
574+
chart.loaded = (args: ILoadedEventArgs) => {
575+
chart.loaded = null;
576+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
577+
expect(templateElement != null);
578+
done();
579+
};
580+
chart.enableHtmlSanitizer = true;
581+
chart.title = 'Title';
582+
chart.subTitle = 'Title';
583+
chart.titleStyle.position = 'Bottom';
584+
chart.refresh();
585+
});
586+
it('checking with title position Right', (done: Function) => {
587+
chart.loaded = (args: ILoadedEventArgs) => {
588+
chart.loaded = null;
589+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
590+
expect(templateElement != null);
591+
done();
592+
};
593+
chart.enableHtmlSanitizer = true;
594+
chart.title = 'Title';
595+
chart.subTitle = 'Title';
596+
chart.titleStyle.position = 'Right';
597+
chart.refresh();
598+
});
599+
it('checking with title position Custom', (done: Function) => {
600+
chart.loaded = (args: ILoadedEventArgs) => {
601+
chart.loaded = null;
602+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
603+
expect(templateElement != null);
604+
done();
605+
};
606+
chart.enableHtmlSanitizer = true;
607+
chart.title = 'Title';
608+
chart.subTitle = 'Title';
609+
chart.titleStyle.position = 'Custom';
610+
chart.titleStyle.x = 250;
611+
chart.titleStyle.y = 100;
612+
chart.refresh();
613+
});
614+
});
524615
describe('Chart checking center aligned div', () => {
525616
let chart: Chart;
526617
let ele: HTMLElement;

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ export class MouseEvents {
2323
dblclick.initEvent('dblclick', true, false);
2424
element.dispatchEvent(dblclick);
2525
}
26+
public rightClickEvent(element: Element): void {
27+
let rightClick: Event = document.createEvent('MouseEvent');
28+
rightClick.initEvent('contextmenu', true, false);
29+
element.dispatchEvent(rightClick);
30+
}
2631
public mousedownEvent(element: Element, sx: number, sy: number, cx: number, cy: number): void {
2732
let mousedown: MouseEvent = document.createEvent('MouseEvent');
2833
mousedown.initMouseEvent('mousedown', false, false, window, 1, sx, sy, cx, cy, false, false, false, false, 0, null);

controls/charts/spec/pie/base/accumulation.spec.ts

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,78 @@ it('memory leak', () => {
511511
//Check the final memory usage against the first usage, there should be little change if everything was properly deallocated
512512
expect(memory).toBeLessThan(profile.samples[0] + 0.25);
513513
});
514+
describe('Pie Chart checking no data template', () => {
515+
let chart: AccumulationChart;
516+
let ele: HTMLElement;
517+
beforeAll((): void => {
518+
ele = createElement('div', { id: 'container' });
519+
document.body.appendChild(ele);
520+
chart = new AccumulationChart();
521+
chart.appendTo('#container');
522+
});
514523

524+
afterAll((): void => {
525+
chart.destroy();
526+
ele.remove();
527+
});
528+
it('checking no data template element', (done: Function) => {
529+
chart.loaded = (args: Object) => {
530+
chart.loaded = null;
531+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
532+
expect(templateElement != null);
533+
done();
534+
};
535+
chart.subTitle = null;
536+
chart.noDataTemplate = '<div>No data template</div>';
537+
chart.refresh();
538+
});
539+
it('checking with title', (done: Function) => {
540+
chart.loaded = (args: Object) => {
541+
chart.loaded = null;
542+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
543+
expect(templateElement != null);
544+
done();
545+
};
546+
chart.enableHtmlSanitizer = true;
547+
chart.title = 'Title';
548+
chart.subTitle = 'Title';
549+
chart.refresh();
550+
});
551+
it('checking with left title', (done: Function) => {
552+
chart.loaded = (args: Object) => {
553+
chart.loaded = null;
554+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
555+
expect(templateElement != null);
556+
done();
557+
};
558+
chart.titleStyle.position = 'Left';
559+
chart.enableHtmlSanitizer = false;
560+
chart.refresh();
561+
});
562+
it('checking with right title', (done: Function) => {
563+
chart.loaded = (args: Object) => {
564+
chart.loaded = null;
565+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
566+
expect(templateElement != null);
567+
done();
568+
};
569+
chart.titleStyle.position = 'Right';
570+
chart.refresh();
571+
});
572+
it('checking with bottom title', (done: Function) => {
573+
chart.loaded = (args: Object) => {
574+
chart.loaded = null;
575+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
576+
expect(templateElement != null);
577+
done();
578+
};
579+
chart.titleStyle.position = 'Bottom';
580+
chart.noDataTemplate = function() {
581+
return '<div>No data template</div>';
582+
};
583+
chart.refresh();
584+
});
585+
});
515586
describe('Checking RTL Behaviour for Title', () => {
516587
let ele: HTMLElement;
517588
let id: string = 'ej2-container';

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

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -731,6 +731,66 @@ describe('default stock chart', () => {
731731
chart.refresh();
732732
});
733733
});
734+
describe('Stock Chart checking no data template', () => {
735+
let chart: StockChart;
736+
let ele: HTMLElement;
737+
beforeAll((): void => {
738+
ele = createElement('div', { id: 'container' });
739+
document.body.appendChild(ele);
740+
chart = new StockChart();
741+
chart.appendTo('#container');
742+
});
743+
744+
afterAll((): void => {
745+
chart.destroy();
746+
ele.remove();
747+
});
748+
it('checking no data template element', (done: Function) => {
749+
chart.loaded = (args: Object) => {
750+
chart.loaded = null;
751+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
752+
expect(templateElement != null);
753+
done();
754+
};
755+
chart.noDataTemplate = '<div>No data template</div>';
756+
chart.refresh();
757+
});
758+
it('checking with title', (done: Function) => {
759+
chart.loaded = (args: Object) => {
760+
chart.loaded = null;
761+
const templateElement: HTMLElement = document.getElementById('container_NoDataTemplate_wrapper');
762+
expect(templateElement != null);
763+
done();
764+
};
765+
chart.noDataTemplate = function() {
766+
return '<div>No data template</div>';
767+
};
768+
chart.title = 'Title';
769+
chart.refresh();
770+
});
771+
});
772+
describe('Stock Chart checking id name', () => {
773+
let chart: StockChart;
774+
let ele: HTMLElement;
775+
beforeAll((): void => {
776+
ele = createElement('div', { });
777+
document.body.appendChild(ele);
778+
chart = new StockChart({}, ele);
779+
});
780+
781+
afterAll((): void => {
782+
chart.destroy();
783+
ele.remove();
784+
});
785+
it('checking id name', (done: Function) => {
786+
chart.loaded = (args: Object) => {
787+
chart.loaded = null;
788+
done();
789+
};
790+
chart.title = 'Title';
791+
chart.refresh();
792+
});
793+
});
734794
describe('checking stock chart', () => {
735795
let chart: StockChart;
736796
let chartElement: Element = createElement('div', { id: 'stock' });
@@ -874,6 +934,16 @@ describe('default stock chart', () => {
874934
};
875935
chart.refresh();
876936
});
937+
it('Checking stock chart events', (done: Function) => {
938+
chart.loaded = (args: IStockChartEventArgs): void => {
939+
chart.loaded = null;
940+
element = document.getElementById('stock_stockChart_chart_Series_0_Point_2');
941+
trigger.rightClickEvent(element);
942+
done();
943+
};
944+
chart.crosshair.enable = true;
945+
chart.refresh();
946+
});
877947
// it('Checking stock chart event export button', (done: Function) => {
878948
// chart.loaded = (args: IStockChartEventArgs): void => {
879949
// chart.loaded = null;

0 commit comments

Comments
 (0)