cats-charts 0.0.74 → 0.0.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/fesm2022/cats-charts.mjs
CHANGED
|
@@ -1872,6 +1872,25 @@ class LinesChart {
|
|
|
1872
1872
|
}
|
|
1873
1873
|
});
|
|
1874
1874
|
}
|
|
1875
|
+
else if (eventName === 'click') {
|
|
1876
|
+
this.chartInstance.on('click', (params) => {
|
|
1877
|
+
this.chartEvent.emit({
|
|
1878
|
+
type: 'click',
|
|
1879
|
+
data: params,
|
|
1880
|
+
});
|
|
1881
|
+
});
|
|
1882
|
+
const zr = this.chartInstance.getZr();
|
|
1883
|
+
zr.on('click', (zrEvent) => {
|
|
1884
|
+
if (!zrEvent.target) {
|
|
1885
|
+
const nativeEvent = zrEvent.event;
|
|
1886
|
+
nativeEvent.preventDefault();
|
|
1887
|
+
this.chartEvent.emit({
|
|
1888
|
+
type: 'blur',
|
|
1889
|
+
data: { ...zrEvent, type: 'blur' },
|
|
1890
|
+
});
|
|
1891
|
+
}
|
|
1892
|
+
});
|
|
1893
|
+
}
|
|
1875
1894
|
else {
|
|
1876
1895
|
this.chartInstance.on(eventName, (params) => {
|
|
1877
1896
|
this.chartEvent.emit({
|
|
@@ -2435,6 +2454,25 @@ class BarChart {
|
|
|
2435
2454
|
}
|
|
2436
2455
|
});
|
|
2437
2456
|
}
|
|
2457
|
+
else if (eventName === 'click') {
|
|
2458
|
+
this.chartInstance.on('click', (params) => {
|
|
2459
|
+
this.chartEvent.emit({
|
|
2460
|
+
type: 'click',
|
|
2461
|
+
data: params,
|
|
2462
|
+
});
|
|
2463
|
+
});
|
|
2464
|
+
const zr = this.chartInstance.getZr();
|
|
2465
|
+
zr.on('click', (zrEvent) => {
|
|
2466
|
+
if (!zrEvent.target) {
|
|
2467
|
+
const nativeEvent = zrEvent.event;
|
|
2468
|
+
nativeEvent.preventDefault();
|
|
2469
|
+
this.chartEvent.emit({
|
|
2470
|
+
type: 'blur',
|
|
2471
|
+
data: { ...zrEvent, type: 'blur' },
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
});
|
|
2475
|
+
}
|
|
2438
2476
|
else {
|
|
2439
2477
|
this.chartInstance.on(eventName, (params) => {
|
|
2440
2478
|
this.chartEvent.emit({
|
|
@@ -2889,6 +2927,25 @@ class DoughnutChart {
|
|
|
2889
2927
|
}
|
|
2890
2928
|
});
|
|
2891
2929
|
}
|
|
2930
|
+
else if (eventName === 'click') {
|
|
2931
|
+
this.chartInstance.on('click', (params) => {
|
|
2932
|
+
this.chartEvent.emit({
|
|
2933
|
+
type: 'click',
|
|
2934
|
+
data: params,
|
|
2935
|
+
});
|
|
2936
|
+
});
|
|
2937
|
+
const zr = this.chartInstance.getZr();
|
|
2938
|
+
zr.on('click', (zrEvent) => {
|
|
2939
|
+
if (!zrEvent.target) {
|
|
2940
|
+
const nativeEvent = zrEvent.event;
|
|
2941
|
+
nativeEvent.preventDefault();
|
|
2942
|
+
this.chartEvent.emit({
|
|
2943
|
+
type: 'blur',
|
|
2944
|
+
data: { ...zrEvent, type: 'blur' },
|
|
2945
|
+
});
|
|
2946
|
+
}
|
|
2947
|
+
});
|
|
2948
|
+
}
|
|
2892
2949
|
else {
|
|
2893
2950
|
this.chartInstance.on(eventName, (params) => {
|
|
2894
2951
|
this.chartEvent.emit({
|