@devexperts/dxcharts-lite 2.5.8 → 2.6.1

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.
Files changed (68) hide show
  1. package/dist/chart/__tests__/chart.test.js +5 -5
  2. package/dist/chart/__tests__/env.js +1 -1
  3. package/dist/chart/bootstrap.js +1 -1
  4. package/dist/chart/canvas/canvas-bounds-container.d.ts +1 -0
  5. package/dist/chart/canvas/canvas-bounds-container.js +28 -4
  6. package/dist/chart/chart.config.d.ts +10 -0
  7. package/dist/chart/chart.config.js +4 -2
  8. package/dist/chart/components/chart/candle-transformer.functions.js +1 -1
  9. package/dist/chart/components/chart/candle.functions.d.ts +1 -1
  10. package/dist/chart/components/chart/candle.functions.js +3 -2
  11. package/dist/chart/components/chart/chart.component.d.ts +29 -8
  12. package/dist/chart/components/chart/chart.component.js +33 -4
  13. package/dist/chart/components/chart/chart.model.d.ts +41 -4
  14. package/dist/chart/components/chart/chart.model.js +90 -16
  15. package/dist/chart/components/chart/fake-candles.js +2 -0
  16. package/dist/chart/components/chart/fake-visual-candle.d.ts +4 -4
  17. package/dist/chart/components/chart/fake-visual-candle.js +4 -4
  18. package/dist/chart/components/cross_tool/cross-tool.component.js +2 -2
  19. package/dist/chart/components/cross_tool/cross-tool.drawer.d.ts +3 -1
  20. package/dist/chart/components/cross_tool/cross-tool.drawer.js +4 -3
  21. package/dist/chart/components/cross_tool/cross-tool.model.d.ts +6 -6
  22. package/dist/chart/components/cross_tool/cross-tool.model.js +42 -11
  23. package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.js +3 -3
  24. package/dist/chart/components/high_low/high-low.drawer.js +1 -1
  25. package/dist/chart/components/pane/pane-manager.component.d.ts +5 -0
  26. package/dist/chart/components/pane/pane-manager.component.js +20 -0
  27. package/dist/chart/components/pane/pane.component.d.ts +9 -1
  28. package/dist/chart/components/pane/pane.component.js +16 -0
  29. package/dist/chart/components/volumes/separate-volumes.component.d.ts +1 -3
  30. package/dist/chart/components/volumes/separate-volumes.component.js +1 -3
  31. package/dist/chart/components/volumes/volumes.component.js +1 -1
  32. package/dist/chart/components/volumes/volumes.drawer.js +3 -3
  33. package/dist/chart/components/watermark/water-mark.component.d.ts +3 -12
  34. package/dist/chart/components/watermark/water-mark.component.js +1 -1
  35. package/dist/chart/components/x_axis/time/parser/time-formats-parser.functions.js +1 -1
  36. package/dist/chart/components/x_axis/x-axis-draw.functions.js +2 -2
  37. package/dist/chart/components/x_axis/x-axis-scale.handler.d.ts +1 -0
  38. package/dist/chart/components/x_axis/x-axis-scale.handler.js +39 -10
  39. package/dist/chart/components/x_axis/x-axis-time-labels.drawer.js +2 -2
  40. package/dist/chart/components/x_axis/x-axis.component.js +1 -1
  41. package/dist/chart/components/y_axis/y-axis-scale.handler.js +3 -3
  42. package/dist/chart/drawers/drawing-manager.d.ts +1 -1
  43. package/dist/chart/drawers/drawing-manager.js +0 -1
  44. package/dist/chart/inputhandlers/cross-event-producer.component.d.ts +22 -0
  45. package/dist/chart/inputhandlers/cross-event-producer.component.js +11 -1
  46. package/dist/chart/inputhandlers/hover-producer.component.d.ts +5 -3
  47. package/dist/chart/inputhandlers/hover-producer.component.js +78 -18
  48. package/dist/chart/inputhandlers/main-canvas-touch.handler.d.ts +10 -0
  49. package/dist/chart/inputhandlers/main-canvas-touch.handler.js +18 -0
  50. package/dist/chart/inputlisteners/canvas-input-listener.component.js +2 -7
  51. package/dist/chart/model/candle-series.model.js +1 -1
  52. package/dist/chart/model/candle.model.d.ts +3 -0
  53. package/dist/chart/model/candle.model.js +7 -1
  54. package/dist/chart/model/data-series.model.d.ts +3 -3
  55. package/dist/chart/model/data-series.model.js +1 -1
  56. package/dist/chart/model/scale.model.js +1 -1
  57. package/dist/chart/model/scaling/viewport.model.d.ts +2 -1
  58. package/dist/chart/model/scaling/viewport.model.js +6 -1
  59. package/dist/chart/model/time-zone.model.js +1 -3
  60. package/dist/chart/utils/candles-generator-ts.utils.d.ts +1 -0
  61. package/dist/chart/utils/candles-generator.utils.d.ts +1 -0
  62. package/dist/chart/utils/candles-generator.utils.js +2 -0
  63. package/dist/chart/utils/string.utils.d.ts +6 -0
  64. package/dist/chart/utils/string.utils.js +19 -0
  65. package/dist/chart/utils/types.utils.d.ts +9 -0
  66. package/dist/chart/utils/types.utils.js +6 -0
  67. package/dist/dxchart.min.js +4 -4
  68. package/package.json +1 -1
@@ -5,6 +5,7 @@
5
5
  */
6
6
  /* eslint-disable */
7
7
  'use strict';
8
+ import { generateCandleId } from '../model/candle.model';
8
9
  export default function generateCandlesData(config) {
9
10
  // default generation config
10
11
  config = config || {};
@@ -78,6 +79,7 @@ function generateRandomCandle(from, to, candleAvgSize, type) {
78
79
  var high = Math.max(open, close) + Math.random() * candleAvgSize * 0.2;
79
80
  var low = Math.min(open, close) - Math.random() * candleAvgSize * 0.2;
80
81
  return {
82
+ id: generateCandleId(0, high + low + open + close),
81
83
  hi: high,
82
84
  lo: low,
83
85
  open: open,
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
3
+ * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4
+ * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
+ */
6
+ export declare function hashCode(str: string): number;
@@ -0,0 +1,19 @@
1
+ /*
2
+ * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
3
+ * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4
+ * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
+ */
6
+ export function hashCode(str) {
7
+ let hash = 0;
8
+ if (str.length === 0) {
9
+ return hash;
10
+ }
11
+ for (let i = 0; i < str.length; i++) {
12
+ const chr = str.charCodeAt(i);
13
+ // eslint-disable-next-line no-bitwise
14
+ hash = (hash << 5) - hash + chr;
15
+ // eslint-disable-next-line no-bitwise
16
+ hash |= 0; // Convert to 32bit integer
17
+ }
18
+ return hash;
19
+ }
@@ -0,0 +1,9 @@
1
+ /*
2
+ * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
3
+ * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4
+ * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
+ */
6
+ export type Mutable<T> = {
7
+ -readonly [P in keyof T]: T[P];
8
+ };
9
+ export type PartialExcept<T, K extends keyof T> = Partial<Omit<T, K>> & Pick<T, K>;
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
3
+ * This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4
+ * If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
5
+ */
6
+ export {};