@amcharts/amcharts5 5.7.2 → 5.7.4
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/.internal/charts/map/MapChart.d.ts.map +1 -1
- package/.internal/charts/map/MapChart.js +6 -2
- package/.internal/charts/map/MapChart.js.map +1 -1
- package/.internal/charts/map/MapSeries.js +1 -1
- package/.internal/charts/map/MapSeries.js.map +1 -1
- package/.internal/charts/stock/StockChart.d.ts +2 -1
- package/.internal/charts/stock/StockChart.d.ts.map +1 -1
- package/.internal/charts/stock/StockChart.js +16 -0
- package/.internal/charts/stock/StockChart.js.map +1 -1
- package/.internal/core/Registry.js +1 -1
- package/.internal/core/Registry.js.map +1 -1
- package/.internal/core/Root.d.ts.map +1 -1
- package/.internal/core/Root.js +1 -0
- package/.internal/core/Root.js.map +1 -1
- package/.internal/core/render/Container.d.ts.map +1 -1
- package/.internal/core/render/Container.js +12 -2
- package/.internal/core/render/Container.js.map +1 -1
- package/.internal/core/render/Series.d.ts.map +1 -1
- package/.internal/core/render/Series.js +14 -0
- package/.internal/core/render/Series.js.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.d.ts +4 -0
- package/.internal/core/render/backend/CanvasRenderer.d.ts.map +1 -1
- package/.internal/core/render/backend/CanvasRenderer.js +37 -6
- package/.internal/core/render/backend/CanvasRenderer.js.map +1 -1
- package/.internal/core/render/backend/Renderer.d.ts +1 -0
- package/.internal/core/render/backend/Renderer.d.ts.map +1 -1
- package/.internal/core/render/backend/Renderer.js.map +1 -1
- package/.internal/plugins/exporting/Annotator.d.ts +27 -0
- package/.internal/plugins/exporting/Annotator.d.ts.map +1 -1
- package/.internal/plugins/exporting/Annotator.js +6 -0
- package/.internal/plugins/exporting/Annotator.js.map +1 -1
- package/CHANGELOG.md +19 -0
- package/examples/javascript/flow-arc-horizontal/package.json +1 -1
- package/examples/javascript/flow-arc-vertical/package.json +1 -1
- package/examples/javascript/flow-chord/package.json +1 -1
- package/examples/javascript/flow-chord-directed/package.json +1 -1
- package/examples/javascript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/javascript/flow-sankey/package.json +1 -1
- package/examples/javascript/gauge/package.json +1 -1
- package/examples/javascript/gauge-bands/package.json +1 -1
- package/examples/javascript/hierarchy-force-directed/package.json +1 -1
- package/examples/javascript/hierarchy-pack/package.json +1 -1
- package/examples/javascript/hierarchy-partition/package.json +1 -1
- package/examples/javascript/hierarchy-sunburst/package.json +1 -1
- package/examples/javascript/hierarchy-tree/package.json +1 -1
- package/examples/javascript/hierarchy-treemap/package.json +1 -1
- package/examples/javascript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/javascript/jest/package.json +1 -1
- package/examples/javascript/json-pie/package.json +1 -1
- package/examples/javascript/json-xy/package.json +1 -1
- package/examples/javascript/map-animating-along-lines/package.json +1 -1
- package/examples/javascript/map-clustered-points/package.json +1 -1
- package/examples/javascript/map-day-and-night/package.json +1 -1
- package/examples/javascript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/javascript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/javascript/map-with-bubbles/package.json +1 -1
- package/examples/javascript/map-zoom-to-country/package.json +1 -1
- package/examples/javascript/misc-40-charts/package.json +1 -1
- package/examples/javascript/misc-microchart-grid/package.json +1 -1
- package/examples/javascript/pie-chart/package.json +1 -1
- package/examples/javascript/pie-donut-chart/package.json +1 -1
- package/examples/javascript/pie-variable-radius/package.json +1 -1
- package/examples/javascript/radar-column-iwatch-style/package.json +1 -1
- package/examples/javascript/radar-heat-map/package.json +1 -1
- package/examples/javascript/radar-line/package.json +1 -1
- package/examples/javascript/radar-time-line/package.json +1 -1
- package/examples/javascript/sliced-funnel/package.json +1 -1
- package/examples/javascript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/javascript/sliced-pyramid/package.json +1 -1
- package/examples/javascript/stock-chart/package.json +1 -1
- package/examples/javascript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/javascript/stock-chart-data-granularity/package.json +1 -1
- package/examples/javascript/stock-chart-data-grouping/package.json +1 -1
- package/examples/javascript/stock-chart-intraday/package.json +1 -1
- package/examples/javascript/stock-chart-live/package.json +1 -1
- package/examples/javascript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/javascript/venn-diagram/package.json +1 -1
- package/examples/javascript/wordcloud-with-data/package.json +1 -1
- package/examples/javascript/wordcloud-with-text/package.json +1 -1
- package/examples/javascript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/javascript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/javascript/xy-bubble/package.json +1 -1
- package/examples/javascript/xy-candlestick/package.json +1 -1
- package/examples/javascript/xy-clustered-column/package.json +1 -1
- package/examples/javascript/xy-column/package.json +1 -1
- package/examples/javascript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/javascript/xy-data-grouping/package.json +1 -1
- package/examples/javascript/xy-draggable-range/package.json +1 -1
- package/examples/javascript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/javascript/xy-dumbbell plot/package.json +1 -1
- package/examples/javascript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/javascript/xy-line/package.json +1 -1
- package/examples/javascript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/javascript/xy-live-data/package.json +1 -1
- package/examples/javascript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/javascript/xy-ohlc/package.json +1 -1
- package/examples/javascript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/javascript/xy-smoothed-line/package.json +1 -1
- package/examples/javascript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/javascript/xy-stacked-column/package.json +1 -1
- package/examples/javascript/xy-stacked-step/package.json +1 -1
- package/examples/javascript/xy-stock/package.json +1 -1
- package/examples/javascript/xy-stock-comparing/package.json +1 -1
- package/examples/typescript/flow-arc-horizontal/package.json +1 -1
- package/examples/typescript/flow-arc-vertical/package.json +1 -1
- package/examples/typescript/flow-chord/package.json +1 -1
- package/examples/typescript/flow-chord-directed/package.json +1 -1
- package/examples/typescript/flow-chord-non-ribbon/package.json +1 -1
- package/examples/typescript/flow-sankey/package.json +1 -1
- package/examples/typescript/gauge/package.json +1 -1
- package/examples/typescript/gauge-bands/package.json +1 -1
- package/examples/typescript/hierarchy-force-directed/package.json +1 -1
- package/examples/typescript/hierarchy-pack/package.json +1 -1
- package/examples/typescript/hierarchy-partition/package.json +1 -1
- package/examples/typescript/hierarchy-sunburst/package.json +1 -1
- package/examples/typescript/hierarchy-tree/package.json +1 -1
- package/examples/typescript/hierarchy-treemap/package.json +1 -1
- package/examples/typescript/hierarchy-voronoi-treemap/package.json +1 -1
- package/examples/typescript/jest/package.json +1 -1
- package/examples/typescript/json-pie/package.json +1 -1
- package/examples/typescript/json-xy/package.json +1 -1
- package/examples/typescript/map-animating-along-lines/package.json +1 -1
- package/examples/typescript/map-clustered-points/package.json +1 -1
- package/examples/typescript/map-day-and-night/package.json +1 -1
- package/examples/typescript/map-globe-rotate-to-country/package.json +1 -1
- package/examples/typescript/map-globe-with-projected-circles/package.json +1 -1
- package/examples/typescript/map-with-bubbles/package.json +1 -1
- package/examples/typescript/map-zoom-to-country/package.json +1 -1
- package/examples/typescript/misc-40-charts/package.json +1 -1
- package/examples/typescript/misc-microchart-grid/package.json +1 -1
- package/examples/typescript/pie-chart/package.json +1 -1
- package/examples/typescript/pie-donut-chart/package.json +1 -1
- package/examples/typescript/pie-variable-radius/package.json +1 -1
- package/examples/typescript/radar-column-iwatch-style/package.json +1 -1
- package/examples/typescript/radar-heat-map/package.json +1 -1
- package/examples/typescript/radar-line/package.json +1 -1
- package/examples/typescript/radar-time-line/package.json +1 -1
- package/examples/typescript/sliced-funnel/package.json +1 -1
- package/examples/typescript/sliced-pictorial-stacked/package.json +1 -1
- package/examples/typescript/sliced-pyramid/package.json +1 -1
- package/examples/typescript/stock-chart/package.json +1 -1
- package/examples/typescript/stock-chart-comparing-stocks/package.json +1 -1
- package/examples/typescript/stock-chart-data-granularity/package.json +1 -1
- package/examples/typescript/stock-chart-data-grouping/package.json +1 -1
- package/examples/typescript/stock-chart-intraday/package.json +1 -1
- package/examples/typescript/stock-chart-live/package.json +1 -1
- package/examples/typescript/stock-chart-volume-separate-panel/package.json +1 -1
- package/examples/typescript/venn-diagram/package.json +1 -1
- package/examples/typescript/wordcloud-with-data/package.json +1 -1
- package/examples/typescript/wordcloud-with-text/package.json +1 -1
- package/examples/typescript/xy-100-percent-stacked-column/package.json +1 -1
- package/examples/typescript/xy-animated-bullet-at-the-end-of-the-series/package.json +1 -1
- package/examples/typescript/xy-bubble/package.json +1 -1
- package/examples/typescript/xy-candlestick/package.json +1 -1
- package/examples/typescript/xy-clustered-column/package.json +1 -1
- package/examples/typescript/xy-column/package.json +1 -1
- package/examples/typescript/xy-comparing-series-google-analytics-style/package.json +1 -1
- package/examples/typescript/xy-data-grouping/package.json +1 -1
- package/examples/typescript/xy-draggable-range/package.json +1 -1
- package/examples/typescript/xy-drawing-series-with-mouse-or-touch/package.json +1 -1
- package/examples/typescript/xy-dumbbell plot/package.json +1 -1
- package/examples/typescript/xy-evenly-spaced-date-axis/package.json +1 -1
- package/examples/typescript/xy-line/package.json +1 -1
- package/examples/typescript/xy-line-highlight-on-legend-hover/package.json +1 -1
- package/examples/typescript/xy-live-data/package.json +1 -1
- package/examples/typescript/xy-multiple-synced-value-axes/package.json +1 -1
- package/examples/typescript/xy-ohlc/package.json +1 -1
- package/examples/typescript/xy-real-time-data-sorting/package.json +1 -1
- package/examples/typescript/xy-smoothed-line/package.json +1 -1
- package/examples/typescript/xy-stacked-and-clustered-column/package.json +1 -1
- package/examples/typescript/xy-stacked-column/package.json +1 -1
- package/examples/typescript/xy-stacked-step/package.json +1 -1
- package/examples/typescript/xy-stock/package.json +1 -1
- package/examples/typescript/xy-stock-comparing/package.json +1 -1
- package/package.json +1 -1
|
@@ -3302,10 +3302,6 @@ export class CanvasRendererEvent {
|
|
|
3302
3302
|
* @ignore
|
|
3303
3303
|
*/
|
|
3304
3304
|
export class CanvasRenderer extends ArrayDisposer {
|
|
3305
|
-
/*protected _mouseMoveThrottler: Throttler = new Throttler(() => {
|
|
3306
|
-
this._dispatchGlobalMousemove(this._lastPointerMoveEvent.event, this._lastPointerMoveEvent.native);
|
|
3307
|
-
});
|
|
3308
|
-
*/
|
|
3309
3305
|
constructor(resolution) {
|
|
3310
3306
|
super();
|
|
3311
3307
|
Object.defineProperty(this, "view", {
|
|
@@ -3564,6 +3560,13 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
3564
3560
|
}, { passive: false }));
|
|
3565
3561
|
}
|
|
3566
3562
|
}
|
|
3563
|
+
/*protected _mouseMoveThrottler: Throttler = new Throttler(() => {
|
|
3564
|
+
this._dispatchGlobalMousemove(this._lastPointerMoveEvent.event, this._lastPointerMoveEvent.native);
|
|
3565
|
+
});
|
|
3566
|
+
*/
|
|
3567
|
+
resetImageArray() {
|
|
3568
|
+
this._ghostLayer.imageArray = undefined;
|
|
3569
|
+
}
|
|
3567
3570
|
_delayTouchDeactivate() {
|
|
3568
3571
|
if (this._touchActiveTimeout) {
|
|
3569
3572
|
clearTimeout(this._touchActiveTimeout);
|
|
@@ -3819,8 +3822,13 @@ export class CanvasRenderer extends ArrayDisposer {
|
|
|
3819
3822
|
return hit;
|
|
3820
3823
|
}
|
|
3821
3824
|
getObjectAtPoint(point) {
|
|
3822
|
-
const
|
|
3823
|
-
|
|
3825
|
+
const data = this._ghostLayer.getImageArray(point);
|
|
3826
|
+
if (data[0] === 0 && data[1] === 0 && data[2] === 0) {
|
|
3827
|
+
return undefined;
|
|
3828
|
+
}
|
|
3829
|
+
const colorId = Color.fromRGB(data[0], data[1], data[2]).toCSS();
|
|
3830
|
+
const hit = this._colorMap[colorId];
|
|
3831
|
+
return hit;
|
|
3824
3832
|
}
|
|
3825
3833
|
_withEvents(key, f) {
|
|
3826
3834
|
const events = this._events[key];
|
|
@@ -4348,6 +4356,12 @@ class GhostLayer {
|
|
|
4348
4356
|
bottom: 0,
|
|
4349
4357
|
}
|
|
4350
4358
|
});
|
|
4359
|
+
Object.defineProperty(this, "_resolution", {
|
|
4360
|
+
enumerable: true,
|
|
4361
|
+
configurable: true,
|
|
4362
|
+
writable: true,
|
|
4363
|
+
value: 1
|
|
4364
|
+
});
|
|
4351
4365
|
Object.defineProperty(this, "_width", {
|
|
4352
4366
|
enumerable: true,
|
|
4353
4367
|
configurable: true,
|
|
@@ -4360,6 +4374,12 @@ class GhostLayer {
|
|
|
4360
4374
|
writable: true,
|
|
4361
4375
|
value: 0
|
|
4362
4376
|
});
|
|
4377
|
+
Object.defineProperty(this, "imageArray", {
|
|
4378
|
+
enumerable: true,
|
|
4379
|
+
configurable: true,
|
|
4380
|
+
writable: true,
|
|
4381
|
+
value: void 0
|
|
4382
|
+
});
|
|
4363
4383
|
this.view = document.createElement("canvas");
|
|
4364
4384
|
this.context = this.view.getContext("2d", { alpha: false, willReadFrequently: true });
|
|
4365
4385
|
this.context.imageSmoothingEnabled = false;
|
|
@@ -4368,6 +4388,7 @@ class GhostLayer {
|
|
|
4368
4388
|
this.view.style.left = "0px";
|
|
4369
4389
|
}
|
|
4370
4390
|
resize(canvasWidth, canvasHeight, domWidth, domHeight, resolution) {
|
|
4391
|
+
this._resolution = resolution;
|
|
4371
4392
|
canvasWidth += (this.margin.left + this.margin.right);
|
|
4372
4393
|
canvasHeight += (this.margin.top + this.margin.bottom);
|
|
4373
4394
|
// TODO this should take into account calculateSize
|
|
@@ -4387,6 +4408,16 @@ class GhostLayer {
|
|
|
4387
4408
|
// TODO should this round ?
|
|
4388
4409
|
Math.round(((point.x - bbox.left) / bbox.width) * this._width), Math.round(((point.y - bbox.top) / bbox.height) * this._height), 1, 1);
|
|
4389
4410
|
}
|
|
4411
|
+
getImageArray(point) {
|
|
4412
|
+
if (!this.imageArray) {
|
|
4413
|
+
this.imageArray = this.context.getImageData(0, 0, this._width, this._height).data;
|
|
4414
|
+
}
|
|
4415
|
+
const data = this.imageArray;
|
|
4416
|
+
const x = Math.round(point.x * this._resolution);
|
|
4417
|
+
const y = Math.round(point.y * this._resolution);
|
|
4418
|
+
const i = (y * this._width + x) * 4;
|
|
4419
|
+
return [data[i], data[i + 1], data[i + 2], data[i + 3]];
|
|
4420
|
+
}
|
|
4390
4421
|
setMargin(layers) {
|
|
4391
4422
|
this.margin.left = 0;
|
|
4392
4423
|
this.margin.right = 0;
|