@devexperts/dxcharts-lite 2.4.4 → 2.4.6
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/dist/chart/__tests__/chart.test.d.ts +1 -1
- package/dist/chart/__tests__/chart.test.js +1 -1
- package/dist/chart/__tests__/env.d.ts +1 -1
- package/dist/chart/__tests__/env.js +1 -1
- package/dist/chart/animation/canvas-animation.d.ts +3 -1
- package/dist/chart/animation/canvas-animation.js +4 -1
- package/dist/chart/animation/types/animation.d.ts +1 -1
- package/dist/chart/animation/types/animation.js +1 -1
- package/dist/chart/animation/types/color-alpha-animation.d.ts +1 -1
- package/dist/chart/animation/types/color-alpha-animation.js +1 -1
- package/dist/chart/animation/types/color-transition-animation.d.ts +1 -1
- package/dist/chart/animation/types/color-transition-animation.js +1 -1
- package/dist/chart/animation/types/viewport-movement-animation.d.ts +1 -1
- package/dist/chart/animation/types/viewport-movement-animation.js +1 -1
- package/dist/chart/animation/viewport-model-animation.d.ts +1 -1
- package/dist/chart/animation/viewport-model-animation.js +7 -3
- package/dist/chart/bootstrap.d.ts +3 -1
- package/dist/chart/bootstrap.js +5 -1
- package/dist/chart/canvas/canvas-bounds-container.d.ts +1 -1
- package/dist/chart/canvas/canvas-bounds-container.js +25 -13
- package/dist/chart/canvas/canvas-chart-html.d.ts +1 -1
- package/dist/chart/canvas/canvas-chart-html.js +1 -1
- package/dist/chart/canvas/chart-elements.d.ts +1 -1
- package/dist/chart/canvas/chart-elements.js +1 -1
- package/dist/chart/canvas/cursor.handler.d.ts +1 -1
- package/dist/chart/canvas/cursor.handler.js +1 -1
- package/dist/chart/canvas/layout-creator.d.ts +1 -1
- package/dist/chart/canvas/layout-creator.js +1 -1
- package/dist/chart/canvas/y-axis-bounds.container.d.ts +1 -1
- package/dist/chart/canvas/y-axis-bounds.container.js +1 -1
- package/dist/chart/chart.config.d.ts +5 -11
- package/dist/chart/chart.config.js +1 -3
- package/dist/chart/chart.d.ts +1 -1
- package/dist/chart/chart.js +1 -1
- package/dist/chart/components/chart/basic-scale.d.ts +1 -1
- package/dist/chart/components/chart/basic-scale.js +1 -1
- package/dist/chart/components/chart/candle-transformer.functions.d.ts +1 -1
- package/dist/chart/components/chart/candle-transformer.functions.js +1 -1
- package/dist/chart/components/chart/candle-width-calculator.functions.d.ts +1 -1
- package/dist/chart/components/chart/candle-width-calculator.functions.js +1 -1
- package/dist/chart/components/chart/candle.functions.d.ts +1 -1
- package/dist/chart/components/chart/candle.functions.js +1 -1
- package/dist/chart/components/chart/chart-area-pan.handler.d.ts +9 -2
- package/dist/chart/components/chart/chart-area-pan.handler.js +41 -31
- package/dist/chart/components/chart/chart-base.model.d.ts +1 -1
- package/dist/chart/components/chart/chart-base.model.js +2 -2
- package/dist/chart/components/chart/chart.component.d.ts +1 -1
- package/dist/chart/components/chart/chart.component.js +1 -1
- package/dist/chart/components/chart/chart.model.d.ts +2 -3
- package/dist/chart/components/chart/chart.model.js +1 -2
- package/dist/chart/components/chart/data-series.high-low-provider.d.ts +1 -1
- package/dist/chart/components/chart/data-series.high-low-provider.js +1 -1
- package/dist/chart/components/chart/fake-candles.d.ts +3 -10
- package/dist/chart/components/chart/fake-candles.js +2 -52
- package/dist/chart/components/chart/fake-visual-candle.d.ts +16 -0
- package/dist/chart/components/chart/fake-visual-candle.js +56 -0
- package/dist/chart/components/chart/price.formatter.d.ts +1 -1
- package/dist/chart/components/chart/price.formatter.js +1 -1
- package/dist/chart/components/chart/secondary-chart-colors-pool.d.ts +1 -1
- package/dist/chart/components/chart/secondary-chart-colors-pool.js +1 -1
- package/dist/chart/components/cross_tool/cross-tool.component.d.ts +1 -1
- package/dist/chart/components/cross_tool/cross-tool.component.js +1 -1
- package/dist/chart/components/cross_tool/cross-tool.drawer.d.ts +1 -1
- package/dist/chart/components/cross_tool/cross-tool.drawer.js +1 -1
- package/dist/chart/components/cross_tool/cross-tool.model.d.ts +1 -1
- package/dist/chart/components/cross_tool/cross-tool.model.js +1 -1
- package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.d.ts +1 -1
- package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.js +1 -1
- package/dist/chart/components/cross_tool/types/none.drawer.d.ts +1 -1
- package/dist/chart/components/cross_tool/types/none.drawer.js +1 -1
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-x.component.d.ts +1 -1
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-x.component.js +1 -1
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-y.component.d.ts +1 -1
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-y.component.js +1 -1
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop.component.d.ts +2 -2
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop.component.js +21 -16
- package/dist/chart/components/dynamic-objects/dynamic-objects.component.d.ts +1 -1
- package/dist/chart/components/dynamic-objects/dynamic-objects.component.js +1 -1
- package/dist/chart/components/dynamic-objects/dynamic-objects.drawer.d.ts +1 -1
- package/dist/chart/components/dynamic-objects/dynamic-objects.drawer.js +1 -1
- package/dist/chart/components/dynamic-objects/dynamic-objects.model.d.ts +7 -4
- package/dist/chart/components/dynamic-objects/dynamic-objects.model.js +15 -4
- package/dist/chart/components/events/events-hit-test.drawer.d.ts +1 -1
- package/dist/chart/components/events/events-hit-test.drawer.js +1 -1
- package/dist/chart/components/events/events.component.d.ts +1 -1
- package/dist/chart/components/events/events.component.js +1 -1
- package/dist/chart/components/events/events.drawer.d.ts +1 -1
- package/dist/chart/components/events/events.drawer.js +1 -1
- package/dist/chart/components/events/events.model.d.ts +1 -1
- package/dist/chart/components/events/events.model.js +1 -1
- package/dist/chart/components/grid/grid.component.d.ts +1 -1
- package/dist/chart/components/grid/grid.component.js +1 -1
- package/dist/chart/components/grid/grid.drawer.d.ts +1 -1
- package/dist/chart/components/grid/grid.drawer.js +1 -1
- package/dist/chart/components/high_low/high-low.component.d.ts +1 -1
- package/dist/chart/components/high_low/high-low.component.js +1 -1
- package/dist/chart/components/high_low/high-low.drawer.d.ts +1 -1
- package/dist/chart/components/high_low/high-low.drawer.js +1 -1
- package/dist/chart/components/highlights/highlights.component.d.ts +1 -1
- package/dist/chart/components/highlights/highlights.component.js +1 -1
- package/dist/chart/components/highlights/highlights.drawer.d.ts +1 -1
- package/dist/chart/components/highlights/highlights.drawer.js +1 -1
- package/dist/chart/components/highlights/highlights.model.d.ts +1 -1
- package/dist/chart/components/highlights/highlights.model.js +1 -1
- package/dist/chart/components/hit-test/hit-test.component.d.ts +16 -0
- package/dist/chart/components/hit-test/hit-test.component.js +25 -0
- package/dist/chart/components/labels_generator/numeric-axis-labels.generator.d.ts +1 -1
- package/dist/chart/components/labels_generator/numeric-axis-labels.generator.js +1 -1
- package/dist/chart/components/navigation_map/navigation-map-move.handler.d.ts +1 -1
- package/dist/chart/components/navigation_map/navigation-map-move.handler.js +1 -1
- package/dist/chart/components/navigation_map/navigation-map.component.d.ts +1 -1
- package/dist/chart/components/navigation_map/navigation-map.component.js +1 -1
- package/dist/chart/components/navigation_map/navigation-map.drawer.d.ts +1 -1
- package/dist/chart/components/navigation_map/navigation-map.drawer.js +1 -1
- package/dist/chart/components/navigation_map/navigation-map.model.d.ts +1 -1
- package/dist/chart/components/navigation_map/navigation-map.model.js +1 -1
- package/dist/chart/components/pan/chart-pan.component.d.ts +2 -1
- package/dist/chart/components/pan/chart-pan.component.js +4 -1
- package/dist/chart/components/pane/extent/y-extent-component.d.ts +3 -1
- package/dist/chart/components/pane/extent/y-extent-component.js +1 -1
- package/dist/chart/components/pane/pane-hit-test.controller.d.ts +1 -1
- package/dist/chart/components/pane/pane-hit-test.controller.js +1 -1
- package/dist/chart/components/pane/pane-manager.component.d.ts +1 -1
- package/dist/chart/components/pane/pane-manager.component.js +3 -2
- package/dist/chart/components/pane/pane.component.d.ts +1 -1
- package/dist/chart/components/pane/pane.component.js +3 -2
- package/dist/chart/components/resizer/bar-resizer.component.d.ts +3 -2
- package/dist/chart/components/resizer/bar-resizer.component.js +9 -6
- package/dist/chart/components/resizer/bar-resizer.drawer.d.ts +1 -1
- package/dist/chart/components/resizer/bar-resizer.drawer.js +1 -1
- package/dist/chart/components/snapshot/snapshot.component.d.ts +1 -1
- package/dist/chart/components/snapshot/snapshot.component.js +1 -1
- package/dist/chart/components/volumes/separate-volumes.component.d.ts +1 -1
- package/dist/chart/components/volumes/separate-volumes.component.js +1 -1
- package/dist/chart/components/volumes/volume-color-resolvers.functions.d.ts +1 -1
- package/dist/chart/components/volumes/volume-color-resolvers.functions.js +1 -1
- package/dist/chart/components/volumes/volumes.component.d.ts +1 -1
- package/dist/chart/components/volumes/volumes.component.js +1 -1
- package/dist/chart/components/volumes/volumes.drawer.d.ts +1 -1
- package/dist/chart/components/volumes/volumes.drawer.js +1 -1
- package/dist/chart/components/volumes/volumes.formatter.d.ts +1 -1
- package/dist/chart/components/volumes/volumes.formatter.js +1 -1
- package/dist/chart/components/volumes/volumes.model.d.ts +1 -1
- package/dist/chart/components/volumes/volumes.model.js +1 -1
- package/dist/chart/components/watermark/water-mark.component.d.ts +1 -1
- package/dist/chart/components/watermark/water-mark.component.js +1 -1
- package/dist/chart/components/watermark/water-mark.drawer.d.ts +1 -1
- package/dist/chart/components/watermark/water-mark.drawer.js +1 -1
- package/dist/chart/components/x_axis/numeric-x-axis-labels.generator.d.ts +1 -1
- package/dist/chart/components/x_axis/numeric-x-axis-labels.generator.js +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats-matchers.functions.d.ts +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats-matchers.functions.js +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats-parser.functions.d.ts +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats-parser.functions.js +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats-validators.functions.d.ts +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats-validators.functions.js +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats.model.d.ts +1 -1
- package/dist/chart/components/x_axis/time/parser/time-formats.model.js +1 -1
- package/dist/chart/components/x_axis/time/x-axis-weights.functions.d.ts +1 -1
- package/dist/chart/components/x_axis/time/x-axis-weights.functions.js +1 -1
- package/dist/chart/components/x_axis/time/x-axis-weights.generator.d.ts +1 -1
- package/dist/chart/components/x_axis/time/x-axis-weights.generator.js +1 -1
- package/dist/chart/components/x_axis/x-axis-draw.functions.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis-draw.functions.js +1 -1
- package/dist/chart/components/x_axis/x-axis-labels.drawer.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis-labels.drawer.js +1 -1
- package/dist/chart/components/x_axis/x-axis-labels.generator.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis-labels.generator.js +2 -2
- package/dist/chart/components/x_axis/x-axis-labels.model.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis-labels.model.js +1 -1
- package/dist/chart/components/x_axis/x-axis-scale.handler.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis-scale.handler.js +2 -2
- package/dist/chart/components/x_axis/x-axis-time-labels.drawer.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis-time-labels.drawer.js +1 -1
- package/dist/chart/components/x_axis/x-axis.component.d.ts +1 -1
- package/dist/chart/components/x_axis/x-axis.component.js +1 -1
- package/dist/chart/components/y_axis/label-color.functions.d.ts +1 -1
- package/dist/chart/components/y_axis/label-color.functions.js +2 -2
- package/dist/chart/components/y_axis/numeric-y-axis-labels.generator.d.ts +1 -1
- package/dist/chart/components/y_axis/numeric-y-axis-labels.generator.js +1 -1
- package/dist/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.d.ts +1 -1
- package/dist/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.js +1 -1
- package/dist/chart/components/y_axis/price_labels/labels-positions-calculator.d.ts +1 -1
- package/dist/chart/components/y_axis/price_labels/labels-positions-calculator.js +1 -1
- package/dist/chart/components/y_axis/price_labels/last-candle-labels.provider.d.ts +1 -1
- package/dist/chart/components/y_axis/price_labels/last-candle-labels.provider.js +1 -1
- package/dist/chart/components/y_axis/price_labels/price-label.drawer.d.ts +1 -1
- package/dist/chart/components/y_axis/price_labels/price-label.drawer.js +1 -1
- package/dist/chart/components/y_axis/price_labels/y-axis-labels.model.d.ts +2 -4
- package/dist/chart/components/y_axis/price_labels/y-axis-labels.model.js +2 -4
- package/dist/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.d.ts +1 -1
- package/dist/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.js +1 -1
- package/dist/chart/components/y_axis/y-axis-base-labels.model.d.ts +1 -1
- package/dist/chart/components/y_axis/y-axis-base-labels.model.js +1 -1
- package/dist/chart/components/y_axis/y-axis-labels.drawer.d.ts +1 -1
- package/dist/chart/components/y_axis/y-axis-labels.drawer.js +1 -1
- package/dist/chart/components/y_axis/y-axis-scale.handler.d.ts +1 -1
- package/dist/chart/components/y_axis/y-axis-scale.handler.js +5 -7
- package/dist/chart/components/y_axis/y-axis.component.d.ts +2 -2
- package/dist/chart/components/y_axis/y-axis.component.js +7 -4
- package/dist/chart/components/y_axis/y-axis.drawer.d.ts +1 -1
- package/dist/chart/components/y_axis/y-axis.drawer.js +1 -1
- package/dist/chart/components/y_axis/y-axis.model.d.ts +1 -1
- package/dist/chart/components/y_axis/y-axis.model.js +1 -1
- package/dist/chart/drawers/chart-background.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-background.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/area.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/area.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/bar.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/bar.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/baseline.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/baseline.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/candle.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/candle.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/histogram.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/histogram.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/line.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/line.drawer.js +1 -1
- package/dist/chart/drawers/chart-type-drawers/scatter-plot.drawer.d.ts +1 -1
- package/dist/chart/drawers/chart-type-drawers/scatter-plot.drawer.js +1 -1
- package/dist/chart/drawers/clear-canvas.drawer.d.ts +1 -1
- package/dist/chart/drawers/clear-canvas.drawer.js +1 -1
- package/dist/chart/drawers/composite.drawer.d.ts +1 -1
- package/dist/chart/drawers/composite.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/candle-series-wrapper.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/candle-series-wrapper.js +1 -1
- package/dist/chart/drawers/data-series-drawers/color-candle.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/color-candle.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/data-series-drawers.utils.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/data-series-drawers.utils.js +1 -1
- package/dist/chart/drawers/data-series-drawers/difference-cloud.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/difference-cloud.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/histogram.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/histogram.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/linear.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/linear.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/points.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/points.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/rectangular-tool.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/rectangular-tool.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/text.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/text.drawer.js +1 -1
- package/dist/chart/drawers/data-series-drawers/trend-histogram.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/trend-histogram.drawer.js +52 -15
- package/dist/chart/drawers/data-series-drawers/triangle.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series-drawers/triangle.drawer.js +1 -1
- package/dist/chart/drawers/data-series.drawer.d.ts +1 -1
- package/dist/chart/drawers/data-series.drawer.js +1 -1
- package/dist/chart/drawers/drawing-manager.d.ts +1 -1
- package/dist/chart/drawers/drawing-manager.js +1 -1
- package/dist/chart/drawers/ht-data-series.drawer.d.ts +1 -1
- package/dist/chart/drawers/ht-data-series.drawer.js +1 -1
- package/dist/chart/events/event-bus.d.ts +1 -1
- package/dist/chart/events/event-bus.js +1 -1
- package/dist/chart/events/events.d.ts +1 -1
- package/dist/chart/events/events.js +1 -1
- package/dist/chart/inputhandlers/candle-tap.handler.d.ts +1 -1
- package/dist/chart/inputhandlers/candle-tap.handler.js +1 -1
- package/dist/chart/inputhandlers/chart-resize.handler.d.ts +1 -1
- package/dist/chart/inputhandlers/chart-resize.handler.js +1 -1
- package/dist/chart/inputhandlers/cross-event-producer.component.d.ts +1 -1
- package/dist/chart/inputhandlers/cross-event-producer.component.js +1 -1
- package/dist/chart/inputhandlers/hover-producer.component.d.ts +1 -1
- package/dist/chart/inputhandlers/hover-producer.component.js +1 -1
- package/dist/chart/inputhandlers/main-canvas-touch.handler.d.ts +2 -7
- package/dist/chart/inputhandlers/main-canvas-touch.handler.js +2 -7
- package/dist/chart/inputlisteners/canvas-input-listener.component.d.ts +1 -15
- package/dist/chart/inputlisteners/canvas-input-listener.component.js +2 -36
- package/dist/chart/model/baseline.model.d.ts +1 -1
- package/dist/chart/model/baseline.model.js +1 -1
- package/dist/chart/model/bounds.model.d.ts +1 -1
- package/dist/chart/model/bounds.model.js +1 -1
- package/dist/chart/model/candle-hover.d.ts +1 -1
- package/dist/chart/model/candle-hover.js +1 -1
- package/dist/chart/model/candle-series-high-low.provider.d.ts +1 -1
- package/dist/chart/model/candle-series-high-low.provider.js +1 -1
- package/dist/chart/model/candle-series.model.d.ts +11 -2
- package/dist/chart/model/candle-series.model.js +22 -4
- package/dist/chart/model/candle.model.d.ts +1 -1
- package/dist/chart/model/candle.model.js +1 -1
- package/dist/chart/model/canvas.model.d.ts +1 -1
- package/dist/chart/model/canvas.model.js +1 -1
- package/dist/chart/model/chart-base-element.d.ts +1 -1
- package/dist/chart/model/chart-base-element.js +1 -1
- package/dist/chart/model/compare-series-hover.d.ts +1 -1
- package/dist/chart/model/compare-series-hover.js +1 -1
- package/dist/chart/model/data-series-view.d.ts +1 -1
- package/dist/chart/model/data-series-view.js +1 -1
- package/dist/chart/model/data-series.config.d.ts +9 -2
- package/dist/chart/model/data-series.config.js +1 -1
- package/dist/chart/model/data-series.model.d.ts +1 -1
- package/dist/chart/model/data-series.model.js +6 -4
- package/dist/chart/model/date-time.formatter.d.ts +1 -1
- package/dist/chart/model/date-time.formatter.js +1 -1
- package/dist/chart/model/hit-test-canvas.model.d.ts +1 -1
- package/dist/chart/model/hit-test-canvas.model.js +1 -1
- package/dist/chart/model/main-candle-series.model.d.ts +1 -1
- package/dist/chart/model/main-candle-series.model.js +1 -1
- package/dist/chart/model/scale.model.d.ts +1 -1
- package/dist/chart/model/scale.model.js +1 -1
- package/dist/chart/model/scaling/auto-scale.model.d.ts +1 -1
- package/dist/chart/model/scaling/auto-scale.model.js +1 -1
- package/dist/chart/model/scaling/constrait.functions.d.ts +1 -1
- package/dist/chart/model/scaling/constrait.functions.js +1 -1
- package/dist/chart/model/scaling/lock-ratio.model.d.ts +1 -1
- package/dist/chart/model/scaling/lock-ratio.model.js +1 -1
- package/dist/chart/model/scaling/move-chart.functions.d.ts +1 -1
- package/dist/chart/model/scaling/move-chart.functions.js +1 -1
- package/dist/chart/model/scaling/viewport.model.d.ts +1 -1
- package/dist/chart/model/scaling/viewport.model.js +1 -1
- package/dist/chart/model/scaling/x-zooming.functions.d.ts +1 -1
- package/dist/chart/model/scaling/x-zooming.functions.js +1 -1
- package/dist/chart/model/time-zone.model.d.ts +1 -1
- package/dist/chart/model/time-zone.model.js +1 -1
- package/dist/chart/model/visual-candle.d.ts +1 -1
- package/dist/chart/model/visual-candle.js +1 -1
- package/dist/chart/utils/__tests__/array.utils.test.d.ts +1 -1
- package/dist/chart/utils/__tests__/array.utils.test.js +1 -1
- package/dist/chart/utils/__tests__/math.utils.test.d.ts +1 -1
- package/dist/chart/utils/__tests__/math.utils.test.js +1 -1
- package/dist/chart/utils/__tests__/object.utils.test.d.ts +1 -1
- package/dist/chart/utils/__tests__/object.utils.test.js +1 -1
- package/dist/chart/utils/__tests__/priceIncrementsUtils.test.d.ts +1 -1
- package/dist/chart/utils/__tests__/priceIncrementsUtils.test.js +1 -1
- package/dist/chart/utils/array.utils.d.ts +1 -1
- package/dist/chart/utils/array.utils.js +1 -1
- package/dist/chart/utils/auto-period-detector.utils.d.ts +1 -1
- package/dist/chart/utils/auto-period-detector.utils.js +1 -1
- package/dist/chart/utils/candles-generator-ts.utils.d.ts +1 -1
- package/dist/chart/utils/candles-generator-ts.utils.js +1 -1
- package/dist/chart/utils/candles-generator.utils.d.ts +1 -1
- package/dist/chart/utils/candles-generator.utils.js +1 -1
- package/dist/chart/utils/candles.utils.d.ts +1 -1
- package/dist/chart/utils/candles.utils.js +1 -1
- package/dist/chart/utils/canvas/canvas-drawing-functions.utils.d.ts +1 -1
- package/dist/chart/utils/canvas/canvas-drawing-functions.utils.js +1 -1
- package/dist/chart/utils/canvas/canvas-font-measure-tool.utils.d.ts +1 -1
- package/dist/chart/utils/canvas/canvas-font-measure-tool.utils.js +1 -1
- package/dist/chart/utils/canvas/canvas-text-functions.utils.d.ts +1 -1
- package/dist/chart/utils/canvas/canvas-text-functions.utils.js +1 -1
- package/dist/chart/utils/color.utils.d.ts +1 -1
- package/dist/chart/utils/color.utils.js +1 -1
- package/dist/chart/utils/device/browser.utils.d.ts +1 -1
- package/dist/chart/utils/device/browser.utils.js +1 -1
- package/dist/chart/utils/device/device-detector.utils.d.ts +1 -1
- package/dist/chart/utils/device/device-detector.utils.js +1 -1
- package/dist/chart/utils/device/device-pixel-ratio.utils.d.ts +1 -1
- package/dist/chart/utils/device/device-pixel-ratio.utils.js +1 -1
- package/dist/chart/utils/device/touchpad.utils.d.ts +1 -1
- package/dist/chart/utils/device/touchpad.utils.js +1 -1
- package/dist/chart/utils/dom.utils.d.ts +1 -1
- package/dist/chart/utils/dom.utils.js +1 -1
- package/dist/chart/utils/function.utils.d.ts +1 -1
- package/dist/chart/utils/function.utils.js +1 -1
- package/dist/chart/utils/linkedList.utils.d.ts +1 -1
- package/dist/chart/utils/linkedList.utils.js +1 -1
- package/dist/chart/utils/math.utils.d.ts +1 -1
- package/dist/chart/utils/math.utils.js +2 -2
- package/dist/chart/utils/merge.utils.d.ts +1 -1
- package/dist/chart/utils/merge.utils.js +1 -1
- package/dist/chart/utils/object.utils.d.ts +1 -1
- package/dist/chart/utils/object.utils.js +1 -1
- package/dist/chart/utils/performance/animation-frame-cache.utils.d.ts +1 -1
- package/dist/chart/utils/performance/animation-frame-cache.utils.js +1 -1
- package/dist/chart/utils/performance/debounce.utils.d.ts +1 -1
- package/dist/chart/utils/performance/debounce.utils.js +1 -1
- package/dist/chart/utils/performance/memoize.utils.d.ts +1 -1
- package/dist/chart/utils/performance/memoize.utils.js +1 -1
- package/dist/chart/utils/performance/request-animation-frame-throttle.utils.d.ts +1 -1
- package/dist/chart/utils/performance/request-animation-frame-throttle.utils.js +1 -1
- package/dist/chart/utils/performance/throttle.utils.d.ts +1 -1
- package/dist/chart/utils/performance/throttle.utils.js +1 -1
- package/dist/chart/utils/price-increments.utils.d.ts +1 -1
- package/dist/chart/utils/price-increments.utils.js +1 -1
- package/dist/chart/utils/timezone.utils.d.ts +1 -1
- package/dist/chart/utils/timezone.utils.js +4 -4
- package/dist/chart/utils/uuid.utils.d.ts +1 -1
- package/dist/chart/utils/uuid.utils.js +1 -1
- package/dist/dxchart.min.js +5 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
6
|
-
import {
|
|
7
|
-
import { throttleTime } from 'rxjs/operators';
|
|
6
|
+
import { animationFrameScheduler } from 'rxjs';
|
|
7
|
+
import { throttleTime, filter } from 'rxjs/operators';
|
|
8
8
|
import { VIEWPORT_ANIMATION_ID } from '../../animation/canvas-animation';
|
|
9
9
|
import { CanvasElement } from '../../canvas/canvas-bounds-container';
|
|
10
10
|
import { MainCanvasTouchHandler } from '../../inputhandlers/main-canvas-touch.handler';
|
|
11
11
|
import { ChartBaseElement } from '../../model/chart-base-element';
|
|
12
12
|
import { pixelsToUnits } from '../../model/scaling/viewport.model';
|
|
13
13
|
import { deviceDetector } from '../../utils/device/device-detector.utils';
|
|
14
|
-
import { getTouchpadSensitivity
|
|
14
|
+
import { getTouchpadSensitivity } from '../../utils/device/touchpad.utils';
|
|
15
15
|
import { DragNDropXComponent } from '../dran-n-drop_helper/drag-n-drop-x.component';
|
|
16
16
|
import { DragNDropYComponent } from '../dran-n-drop_helper/drag-n-drop-y.component';
|
|
17
17
|
/**
|
|
@@ -50,7 +50,8 @@ export class ChartAreaPanHandler extends ChartBaseElement {
|
|
|
50
50
|
// number of candles delta changed during X dragging: 1, 5 or -3 for ex.
|
|
51
51
|
this.xDraggedCandlesDelta = 0;
|
|
52
52
|
this.lastXStart = 0;
|
|
53
|
-
this.
|
|
53
|
+
this.wheelThrottleTime = 15; // in ms
|
|
54
|
+
this.chartPanningOptions = { horizontal: true, vertical: true };
|
|
54
55
|
/**
|
|
55
56
|
* It observes the wheel event on all panes of the canvas and throttles it to the specified time.
|
|
56
57
|
* It then calculates the zoom sensitivity based on whether the event was triggered by a touchpad or not.
|
|
@@ -104,7 +105,7 @@ export class ChartAreaPanHandler extends ChartBaseElement {
|
|
|
104
105
|
onDragTick: this.onXDragTick,
|
|
105
106
|
onDragEnd: this.onXDragEnd,
|
|
106
107
|
}, this.canvasInputListener, this.chartPanComponent, {
|
|
107
|
-
|
|
108
|
+
dragPredicate: () => this.chartPanningOptions.horizontal,
|
|
108
109
|
});
|
|
109
110
|
this.addChildEntity(dragNDropXComponent);
|
|
110
111
|
//#endregion
|
|
@@ -119,37 +120,33 @@ export class ChartAreaPanHandler extends ChartBaseElement {
|
|
|
119
120
|
//#region hit tests
|
|
120
121
|
const allPanesHitTest = this.canvasBoundsContainer.getBoundsHitTest(CanvasElement.ALL_PANES);
|
|
121
122
|
//#endregion
|
|
122
|
-
this.addRxSubscription(merge(this.canvasInputListener.observeWheel(allPanesHitTest), this.canvasInputListener.observePinch(allPanesHitTest))
|
|
123
|
-
.pipe(throttleTime(this.wheelTrottleTime, animationFrameScheduler, { trailing: true, leading: true }))
|
|
124
|
-
.subscribe(e => {
|
|
125
|
-
const isTouchpad = touchpadDetector(e);
|
|
126
|
-
const zoomSensitivity = isTouchpad
|
|
127
|
-
? getTouchpadSensitivity(this.config.components.yAxis.type, this.config.scale.zoomSensitivity.pinch)
|
|
128
|
-
: this.config.scale.zoomSensitivity.wheel;
|
|
129
|
-
this.zoomXHandler(e, zoomSensitivity);
|
|
130
|
-
}));
|
|
131
123
|
this.addRxSubscription(this.canvasInputListener
|
|
132
|
-
.
|
|
133
|
-
.pipe(throttleTime(this.
|
|
134
|
-
.subscribe(
|
|
135
|
-
let direction = -1;
|
|
124
|
+
.observeWheel(allPanesHitTest)
|
|
125
|
+
.pipe(filter(() => this.chartPanningOptions.horizontal && this.chartPanningOptions.vertical), throttleTime(this.wheelThrottleTime, animationFrameScheduler, { trailing: true, leading: true }))
|
|
126
|
+
.subscribe(e => {
|
|
136
127
|
const device = deviceDetector();
|
|
137
|
-
|
|
138
|
-
|
|
128
|
+
const direction = device === 'apple' || device === 'mobile' ? 1 : -1;
|
|
129
|
+
const deltaX = 0 + e.deltaX * direction;
|
|
130
|
+
const deltaY = 0 + e.deltaY * -direction;
|
|
131
|
+
if (e.ctrlKey) {
|
|
132
|
+
const zoomSensitivity = this.calculateDynamicSesitivity(e, this.config.scale.zoomSensitivity.wheel);
|
|
133
|
+
this.zoomXHandler(e, zoomSensitivity);
|
|
134
|
+
this.bus.fireDraw();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
// also works for geasture touchpad vertical case
|
|
138
|
+
if (deltaY !== 0 && Math.abs(deltaY) > Math.abs(deltaX)) {
|
|
139
|
+
const zoomSensitivity = this.calculateDynamicSesitivity(e, this.config.scale.zoomSensitivity.wheel);
|
|
140
|
+
this.zoomXHandler(e, zoomSensitivity);
|
|
141
|
+
this.bus.fireDraw();
|
|
139
142
|
}
|
|
140
|
-
|
|
141
|
-
let deltaY = 0;
|
|
142
|
-
deltaX += e.deltaX * direction;
|
|
143
|
-
deltaY += e.deltaY * -direction;
|
|
143
|
+
// also works for geasture touchpad horizontal case
|
|
144
144
|
if (deltaX !== 0 && Math.abs(deltaX) > Math.abs(deltaY)) {
|
|
145
145
|
const unitsDelta = pixelsToUnits(deltaX, this.scale.zoomX);
|
|
146
146
|
this.scale.moveXStart(this.scale.xStart - unitsDelta);
|
|
147
|
+
this.bus.fireDraw();
|
|
148
|
+
return;
|
|
147
149
|
}
|
|
148
|
-
else if (deltaY !== 0 && Math.abs(deltaY) > Math.abs(deltaX)) {
|
|
149
|
-
const zoomSensitivity = getTouchpadSensitivity(this.config.components.yAxis.type, this.config.scale.zoomSensitivity.glide);
|
|
150
|
-
this.zoomXHandler(e, zoomSensitivity);
|
|
151
|
-
}
|
|
152
|
-
this.bus.fireDraw();
|
|
153
150
|
}));
|
|
154
151
|
this.addRxSubscription(this.chartPanComponent.chartBaseModel.dataPrependSubject
|
|
155
152
|
.asObservable()
|
|
@@ -159,6 +156,17 @@ export class ChartAreaPanHandler extends ChartBaseElement {
|
|
|
159
156
|
this.touchHandler.activate();
|
|
160
157
|
this.addSubscription(this.touchHandler.deactivate.bind(this.touchHandler));
|
|
161
158
|
}
|
|
159
|
+
calculateDynamicSesitivity(e, maxSensitivity) {
|
|
160
|
+
// max delta distance that touchpad can provide
|
|
161
|
+
const MAX_POSSIBLE_DELTA = 100;
|
|
162
|
+
// get max delta
|
|
163
|
+
const delta = Math.max(Math.abs(e.deltaY), Math.abs(e.deltaX));
|
|
164
|
+
// calculate sensitivity for max delta based on touchpad it's distance
|
|
165
|
+
const caclulatedSensitivity = (maxSensitivity * delta) / MAX_POSSIBLE_DELTA;
|
|
166
|
+
// adjust sencitivity for percent axis type
|
|
167
|
+
const zoomSensitivity = getTouchpadSensitivity(this.config.components.yAxis.type, caclulatedSensitivity);
|
|
168
|
+
return zoomSensitivity;
|
|
169
|
+
}
|
|
162
170
|
/**
|
|
163
171
|
* Registers a handler for panning the chart along the Y-axis.
|
|
164
172
|
* @param {ScaleModel} scaleModel - The scale model of the extent.
|
|
@@ -173,6 +181,8 @@ export class ChartAreaPanHandler extends ChartBaseElement {
|
|
|
173
181
|
this.canvasAnimation.forceStopAnimation(VIEWPORT_ANIMATION_ID);
|
|
174
182
|
this.currentPoint = { x: 0, y: 0 };
|
|
175
183
|
lastYStart = scale.yStart;
|
|
184
|
+
// Stop redrawing hit test
|
|
185
|
+
this.hitTestCanvasModel.hitTestDrawersPredicateSubject.next(false);
|
|
176
186
|
};
|
|
177
187
|
const onYDragTick = (dragInfo) => {
|
|
178
188
|
const { delta: absoluteDelta } = dragInfo;
|
|
@@ -196,7 +206,7 @@ export class ChartAreaPanHandler extends ChartBaseElement {
|
|
|
196
206
|
onDragStart: onYDragStart,
|
|
197
207
|
onDragEnd: onYDragEnd,
|
|
198
208
|
}, this.canvasInputListener, this.chartPanComponent, {
|
|
199
|
-
|
|
209
|
+
dragPredicate: () => this.chartPanningOptions.vertical,
|
|
200
210
|
});
|
|
201
211
|
this.addChildEntity(dragNDropYComponent);
|
|
202
212
|
return dragNDropYComponent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
6
6
|
import { Subject } from 'rxjs';
|
|
7
7
|
import { autoDetectPeriod } from '../../utils/auto-period-detector.utils';
|
|
8
8
|
import { searchCandleIndex } from '../../utils/candles.utils';
|
|
9
|
-
import { fakeVisualCandle, fakeVisualPoint } from './fake-
|
|
9
|
+
import { fakeVisualCandle, fakeVisualPoint } from './fake-visual-candle';
|
|
10
10
|
/**
|
|
11
11
|
* This model is an abstraction which describes manipulations tied to the main data series.
|
|
12
12
|
* For example, all x-scale is based on the main data series. If we add a new data series, we need to match its coordinates to the main data series.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -27,7 +27,7 @@ export type VisualCandleCalculator = (candle: Candle, options: {
|
|
|
27
27
|
x: Unit;
|
|
28
28
|
prevCandle?: Candle;
|
|
29
29
|
activeCandle?: Candle;
|
|
30
|
-
}) => VisualCandle;
|
|
30
|
+
}, previousVisualCandle: VisualCandle) => VisualCandle;
|
|
31
31
|
export type LastCandleLabelHandler = (labels: LabelGroup, candleSeries: CandleSeriesModel) => void;
|
|
32
32
|
export type CandleWidthCalculator = (candle: Candle) => Unit;
|
|
33
33
|
export declare class ChartModel extends ChartBaseElement {
|
|
@@ -46,7 +46,6 @@ export declare class ChartModel extends ChartBaseElement {
|
|
|
46
46
|
candleSeries: Array<CandleSeriesModel>;
|
|
47
47
|
get mainCandleSeries(): CandleSeriesModel;
|
|
48
48
|
get secondaryCandleSeries(): Array<CandleSeriesModel>;
|
|
49
|
-
readonly nextCandleTimeStampSubject: Subject<void>;
|
|
50
49
|
readonly chartTypeChanged: Subject<BarType>;
|
|
51
50
|
readonly mainInstrumentChangedSubject: Subject<ChartInstrument>;
|
|
52
51
|
readonly offsetsChanged: Subject<void>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -47,7 +47,6 @@ export class ChartModel extends ChartBaseElement {
|
|
|
47
47
|
this.prevChartWidth = 0;
|
|
48
48
|
this.prevYWidth = 0;
|
|
49
49
|
this.candleSeries = [];
|
|
50
|
-
this.nextCandleTimeStampSubject = new Subject();
|
|
51
50
|
this.chartTypeChanged = new Subject();
|
|
52
51
|
this.mainInstrumentChangedSubject = new Subject();
|
|
53
52
|
this.offsetsChanged = new Subject();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
6
6
|
import { Candle } from '../../model/candle.model';
|
|
7
|
-
import { DataSeriesPoint
|
|
7
|
+
import { DataSeriesPoint } from '../../model/data-series.model';
|
|
8
8
|
import { Index } from '../../model/scaling/viewport.model';
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Generates fake candle for left and right "out of data range" zones.
|
|
12
|
-
* Requires period to calculate the fake timestamp.
|
|
13
|
-
* The timestamp won't take session breaks or holidays into account.
|
|
14
|
-
*/
|
|
15
|
-
export declare const fakeVisualCandle: (dataPoints: Candle[], visualCandles: VisualCandle[], candleWidth: number, index: Index, period?: number) => VisualCandle;
|
|
16
|
-
export declare const fakeVisualPoint: (dataPoints: DataSeriesPoint[], visualPoints: VisualSeriesPoint[], meanDataWidth: number, index: Index, period?: number) => VisualSeriesPoint;
|
|
9
|
+
export declare const DEFAULT_PERIOD = 60;
|
|
17
10
|
export declare const fakeCandle: (candles: Candle[], index: Index, period?: number) => Candle;
|
|
18
11
|
export declare const fakeDataPoint: (candles: DataSeriesPoint[], index: Index, period?: number) => DataSeriesPoint;
|
|
@@ -1,61 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
6
|
-
import { nameDirection } from '../../model/candle.model';
|
|
7
|
-
import { VisualSeriesPoint } from '../../model/data-series.model';
|
|
8
|
-
import VisualCandle from '../../model/visual-candle';
|
|
9
6
|
import { firstOf, lastOf } from '../../utils/array.utils';
|
|
10
7
|
import { round } from '../../utils/math.utils';
|
|
11
|
-
const DEFAULT_PERIOD = 60; // 1 minute
|
|
12
|
-
/**
|
|
13
|
-
* Generates fake candle for left and right "out of data range" zones.
|
|
14
|
-
* Requires period to calculate the fake timestamp.
|
|
15
|
-
* The timestamp won't take session breaks or holidays into account.
|
|
16
|
-
*/
|
|
17
|
-
export const fakeVisualCandle = (dataPoints, visualCandles, candleWidth, index, period = DEFAULT_PERIOD) => {
|
|
18
|
-
const candle = fakeCandle(dataPoints, index, period);
|
|
19
|
-
// in case we have equivolume
|
|
20
|
-
candle.volume = candleWidth;
|
|
21
|
-
let x;
|
|
22
|
-
if (visualCandles.length === 0) {
|
|
23
|
-
x = 0;
|
|
24
|
-
}
|
|
25
|
-
else if (index >= visualCandles.length) {
|
|
26
|
-
const lastCandle = visualCandles[visualCandles.length - 1];
|
|
27
|
-
const candlesCountInBetween = index - (visualCandles.length - 1);
|
|
28
|
-
const offsetFromLast = candlesCountInBetween * candleWidth;
|
|
29
|
-
x = lastCandle.centerUnit + offsetFromLast;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
const firstCandle = visualCandles[0];
|
|
33
|
-
const candlesCountInBetween = -index;
|
|
34
|
-
const offsetFromFirst = candlesCountInBetween * candleWidth;
|
|
35
|
-
x = firstCandle.centerUnit - offsetFromFirst;
|
|
36
|
-
}
|
|
37
|
-
return new VisualCandle(x, candleWidth, candle.open, candle.close, candle.lo, candle.hi, nameDirection(candle.open, candle.close), candle);
|
|
38
|
-
};
|
|
39
|
-
export const fakeVisualPoint = (dataPoints, visualPoints, meanDataWidth, index, period = DEFAULT_PERIOD) => {
|
|
40
|
-
const candle = fakeDataPoint(dataPoints, index, period);
|
|
41
|
-
let x;
|
|
42
|
-
if (visualPoints.length === 0) {
|
|
43
|
-
x = 0;
|
|
44
|
-
}
|
|
45
|
-
else if (index >= visualPoints.length) {
|
|
46
|
-
const lastCandle = visualPoints[visualPoints.length - 1];
|
|
47
|
-
const candlesCountInBetween = index - (visualPoints.length - 1);
|
|
48
|
-
const offsetFromLast = candlesCountInBetween * meanDataWidth;
|
|
49
|
-
x = lastCandle.centerUnit + offsetFromLast;
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
const firstCandle = visualPoints[0];
|
|
53
|
-
const candlesCountInBetween = -index;
|
|
54
|
-
const offsetFromFirst = candlesCountInBetween * meanDataWidth;
|
|
55
|
-
x = firstCandle.centerUnit - offsetFromFirst;
|
|
56
|
-
}
|
|
57
|
-
return new VisualSeriesPoint(x, candle.close);
|
|
58
|
-
};
|
|
8
|
+
export const DEFAULT_PERIOD = 60; // 1 minute
|
|
59
9
|
export const fakeCandle = (candles, index, period = DEFAULT_PERIOD) => {
|
|
60
10
|
const t = getTimestampOfIndex(candles, index, period);
|
|
61
11
|
return {
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
import { Candle } from "../../model/candle.model";
|
|
7
|
+
import { DataSeriesPoint, VisualSeriesPoint } from "../../model/data-series.model";
|
|
8
|
+
import { Index } from "../../model/scaling/viewport.model";
|
|
9
|
+
import VisualCandle from "../../model/visual-candle";
|
|
10
|
+
/**
|
|
11
|
+
* Generates fake candle for left and right "out of data range" zones.
|
|
12
|
+
* Requires period to calculate the fake timestamp.
|
|
13
|
+
* The timestamp won't take session breaks or holidays into account.
|
|
14
|
+
*/
|
|
15
|
+
export declare const fakeVisualCandle: (dataPoints: Candle[], visualCandles: VisualCandle[], candleWidth: number, index: Index, period?: number) => VisualCandle;
|
|
16
|
+
export declare const fakeVisualPoint: (dataPoints: DataSeriesPoint[], visualPoints: VisualSeriesPoint[], meanDataWidth: number, index: Index, period?: number) => VisualSeriesPoint;
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
import { nameDirection } from "../../model/candle.model";
|
|
7
|
+
import { VisualSeriesPoint } from "../../model/data-series.model";
|
|
8
|
+
import VisualCandle from "../../model/visual-candle";
|
|
9
|
+
import { DEFAULT_PERIOD, fakeCandle, fakeDataPoint } from "./fake-candles";
|
|
10
|
+
/**
|
|
11
|
+
* Generates fake candle for left and right "out of data range" zones.
|
|
12
|
+
* Requires period to calculate the fake timestamp.
|
|
13
|
+
* The timestamp won't take session breaks or holidays into account.
|
|
14
|
+
*/
|
|
15
|
+
export const fakeVisualCandle = (dataPoints, visualCandles, candleWidth, index, period = DEFAULT_PERIOD) => {
|
|
16
|
+
const candle = fakeCandle(dataPoints, index, period);
|
|
17
|
+
// in case we have equivolume
|
|
18
|
+
candle.volume = candleWidth;
|
|
19
|
+
let x;
|
|
20
|
+
if (visualCandles.length === 0) {
|
|
21
|
+
x = 0;
|
|
22
|
+
}
|
|
23
|
+
else if (index >= visualCandles.length) {
|
|
24
|
+
const lastCandle = visualCandles[visualCandles.length - 1];
|
|
25
|
+
const candlesCountInBetween = index - (visualCandles.length - 1);
|
|
26
|
+
const offsetFromLast = candlesCountInBetween * candleWidth;
|
|
27
|
+
x = lastCandle.centerUnit + offsetFromLast;
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
const firstCandle = visualCandles[0];
|
|
31
|
+
const candlesCountInBetween = -index;
|
|
32
|
+
const offsetFromFirst = candlesCountInBetween * candleWidth;
|
|
33
|
+
x = firstCandle.centerUnit - offsetFromFirst;
|
|
34
|
+
}
|
|
35
|
+
return new VisualCandle(x, candleWidth, candle.open, candle.close, candle.lo, candle.hi, nameDirection(candle.open, candle.close), candle);
|
|
36
|
+
};
|
|
37
|
+
export const fakeVisualPoint = (dataPoints, visualPoints, meanDataWidth, index, period = DEFAULT_PERIOD) => {
|
|
38
|
+
const candle = fakeDataPoint(dataPoints, index, period);
|
|
39
|
+
let x;
|
|
40
|
+
if (visualPoints.length === 0) {
|
|
41
|
+
x = 0;
|
|
42
|
+
}
|
|
43
|
+
else if (index >= visualPoints.length) {
|
|
44
|
+
const lastCandle = visualPoints[visualPoints.length - 1];
|
|
45
|
+
const candlesCountInBetween = index - (visualPoints.length - 1);
|
|
46
|
+
const offsetFromLast = candlesCountInBetween * meanDataWidth;
|
|
47
|
+
x = lastCandle.centerUnit + offsetFromLast;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
const firstCandle = visualPoints[0];
|
|
51
|
+
const candlesCountInBetween = -index;
|
|
52
|
+
const offsetFromFirst = candlesCountInBetween * meanDataWidth;
|
|
53
|
+
x = firstCandle.centerUnit - offsetFromFirst;
|
|
54
|
+
}
|
|
55
|
+
return new VisualSeriesPoint(x, candle.close);
|
|
56
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
@@ -12,7 +12,7 @@ export interface DragInfo {
|
|
|
12
12
|
draggedPixels: number;
|
|
13
13
|
}
|
|
14
14
|
export interface DragComponentOptions {
|
|
15
|
-
|
|
15
|
+
dragPredicate: () => boolean;
|
|
16
16
|
}
|
|
17
17
|
export interface DragNDropComponentCallbacks {
|
|
18
18
|
onDragStart?: (point: Point) => void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|
|
6
6
|
import { ChartBaseElement } from '../../model/chart-base-element';
|
|
7
7
|
export const defaultDragComponentOptions = {
|
|
8
|
-
|
|
8
|
+
dragPredicate: () => true,
|
|
9
9
|
};
|
|
10
10
|
export class DragNDropComponent extends ChartBaseElement {
|
|
11
11
|
constructor(hitTest, dragCallbacks, canvasInputListener, chartPanComponent, dragComponentOptions) {
|
|
@@ -18,25 +18,30 @@ export class DragNDropComponent extends ChartBaseElement {
|
|
|
18
18
|
this.dragging = false;
|
|
19
19
|
this.draggedPixels = 0;
|
|
20
20
|
this.onDragStart = (point) => {
|
|
21
|
-
this.
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
if (this.dragComponentOptions.dragPredicate()) {
|
|
22
|
+
this.dragging = true;
|
|
23
|
+
this.draggedPixels = 0;
|
|
24
|
+
this.dragCallbacks.onDragStart && this.dragCallbacks.onDragStart(point);
|
|
25
|
+
}
|
|
25
26
|
};
|
|
26
27
|
this.onDragTick = (yDelta) => {
|
|
27
|
-
if (this.
|
|
28
|
-
this.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
if (this.dragComponentOptions.dragPredicate()) {
|
|
29
|
+
if (this.dragging) {
|
|
30
|
+
this.draggedPixels += yDelta;
|
|
31
|
+
this.dragCallbacks.onDragTick({
|
|
32
|
+
delta: yDelta,
|
|
33
|
+
draggedPixels: this.draggedPixels,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
};
|
|
35
38
|
this.onDragEnd = () => {
|
|
36
|
-
if (this.
|
|
37
|
-
this.dragging
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
if (this.dragComponentOptions.dragPredicate()) {
|
|
40
|
+
if (this.dragging) {
|
|
41
|
+
this.dragging = false;
|
|
42
|
+
this.dragCallbacks.onDragEnd && this.dragCallbacks.onDragEnd(this.draggedPixels);
|
|
43
|
+
this.chartPanComponent.activateChartPanHandlers();
|
|
44
|
+
}
|
|
40
45
|
}
|
|
41
46
|
};
|
|
42
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright (C) 2019 -
|
|
2
|
+
* Copyright (C) 2019 - 2024 Devexperts Solutions IE Limited
|
|
3
3
|
* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
|
|
4
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
5
|
*/
|