@devexperts/dxcharts-lite 1.0.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.
- package/LICENSE +151 -0
- package/README.md +184 -0
- package/dist/chart/animation/canvas-animation.d.ts +96 -0
- package/dist/chart/animation/canvas-animation.js +6 -0
- package/dist/chart/animation/types/animation.d.ts +35 -0
- package/dist/chart/animation/types/animation.js +6 -0
- package/dist/chart/animation/types/color-alpha-animation.d.ts +43 -0
- package/dist/chart/animation/types/color-alpha-animation.js +6 -0
- package/dist/chart/animation/types/color-transition-animation.d.ts +59 -0
- package/dist/chart/animation/types/color-transition-animation.js +6 -0
- package/dist/chart/animation/types/viewport-movement-animation.d.ts +44 -0
- package/dist/chart/animation/types/viewport-movement-animation.js +6 -0
- package/dist/chart/animation/viewport-model-animation.d.ts +15 -0
- package/dist/chart/animation/viewport-model-animation.js +6 -0
- package/dist/chart/bootstrap.d.ts +266 -0
- package/dist/chart/bootstrap.js +6 -0
- package/dist/chart/canvas/canvas-bounds-container.d.ts +347 -0
- package/dist/chart/canvas/canvas-bounds-container.js +6 -0
- package/dist/chart/canvas/canvas-chart-html.d.ts +7 -0
- package/dist/chart/canvas/canvas-chart-html.js +23 -0
- package/dist/chart/canvas/chart-elements.d.ts +22 -0
- package/dist/chart/canvas/chart-elements.js +6 -0
- package/dist/chart/canvas/cursor.handler.d.ts +71 -0
- package/dist/chart/canvas/cursor.handler.js +6 -0
- package/dist/chart/canvas/layout-creator.d.ts +20 -0
- package/dist/chart/canvas/layout-creator.js +6 -0
- package/dist/chart/canvas/y-axis-bounds.container.d.ts +54 -0
- package/dist/chart/canvas/y-axis-bounds.container.js +6 -0
- package/dist/chart/chart-container.d.ts +18 -0
- package/dist/chart/chart-container.js +6 -0
- package/dist/chart/chart.config.d.ts +774 -0
- package/dist/chart/chart.config.js +6 -0
- package/dist/chart/components/chart/basic-scale.d.ts +22 -0
- package/dist/chart/components/chart/basic-scale.js +6 -0
- package/dist/chart/components/chart/candle-transformer.functions.d.ts +11 -0
- package/dist/chart/components/chart/candle-transformer.functions.js +6 -0
- package/dist/chart/components/chart/candle-width-calculator.functions.d.ts +7 -0
- package/dist/chart/components/chart/candle-width-calculator.functions.js +6 -0
- package/dist/chart/components/chart/candle.functions.d.ts +19 -0
- package/dist/chart/components/chart/candle.functions.js +6 -0
- package/dist/chart/components/chart/chart-area-pan.handler.d.ts +88 -0
- package/dist/chart/components/chart/chart-area-pan.handler.js +6 -0
- package/dist/chart/components/chart/chart-base.model.d.ts +55 -0
- package/dist/chart/components/chart/chart-base.model.js +6 -0
- package/dist/chart/components/chart/chart.component.d.ts +251 -0
- package/dist/chart/components/chart/chart.component.js +6 -0
- package/dist/chart/components/chart/chart.model.d.ts +448 -0
- package/dist/chart/components/chart/chart.model.js +6 -0
- package/dist/chart/components/chart/data-series.high-low-provider.d.ts +25 -0
- package/dist/chart/components/chart/data-series.high-low-provider.js +6 -0
- package/dist/chart/components/chart/fake-candles.d.ts +18 -0
- package/dist/chart/components/chart/fake-candles.js +6 -0
- package/dist/chart/components/chart/price.formatter.d.ts +12 -0
- package/dist/chart/components/chart/price.formatter.js +6 -0
- package/dist/chart/components/chart/secondary-chart-colors-pool.d.ts +43 -0
- package/dist/chart/components/chart/secondary-chart-colors-pool.js +6 -0
- package/dist/chart/components/cross_tool/cross-tool.component.d.ts +69 -0
- package/dist/chart/components/cross_tool/cross-tool.component.js +6 -0
- package/dist/chart/components/cross_tool/cross-tool.drawer.d.ts +32 -0
- package/dist/chart/components/cross_tool/cross-tool.drawer.js +6 -0
- package/dist/chart/components/cross_tool/cross-tool.model.d.ts +63 -0
- package/dist/chart/components/cross_tool/cross-tool.model.js +6 -0
- package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.d.ts +44 -0
- package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.js +6 -0
- package/dist/chart/components/cross_tool/types/none.drawer.d.ts +9 -0
- package/dist/chart/components/cross_tool/types/none.drawer.js +6 -0
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-x.component.d.ts +27 -0
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-x.component.js +6 -0
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-y.component.d.ts +23 -0
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop-y.component.js +6 -0
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop.component.d.ts +46 -0
- package/dist/chart/components/dran-n-drop_helper/drag-n-drop.component.js +6 -0
- package/dist/chart/components/events/events-hit-test.drawer.d.ts +34 -0
- package/dist/chart/components/events/events-hit-test.drawer.js +6 -0
- package/dist/chart/components/events/events.component.d.ts +45 -0
- package/dist/chart/components/events/events.component.js +6 -0
- package/dist/chart/components/events/events.drawer.d.ts +87 -0
- package/dist/chart/components/events/events.drawer.js +6 -0
- package/dist/chart/components/events/events.model.d.ts +64 -0
- package/dist/chart/components/events/events.model.js +6 -0
- package/dist/chart/components/grid/grid.component.d.ts +34 -0
- package/dist/chart/components/grid/grid.component.js +6 -0
- package/dist/chart/components/grid/grid.drawer.d.ts +55 -0
- package/dist/chart/components/grid/grid.drawer.js +6 -0
- package/dist/chart/components/high_low/high-low.component.d.ts +17 -0
- package/dist/chart/components/high_low/high-low.component.js +6 -0
- package/dist/chart/components/high_low/high-low.drawer.d.ts +69 -0
- package/dist/chart/components/high_low/high-low.drawer.js +6 -0
- package/dist/chart/components/highlights/highlights.component.d.ts +42 -0
- package/dist/chart/components/highlights/highlights.component.js +6 -0
- package/dist/chart/components/highlights/highlights.drawer.d.ts +56 -0
- package/dist/chart/components/highlights/highlights.drawer.js +6 -0
- package/dist/chart/components/highlights/highlights.model.d.ts +66 -0
- package/dist/chart/components/highlights/highlights.model.js +6 -0
- package/dist/chart/components/labels_generator/numeric-axis-labels.generator.d.ts +63 -0
- package/dist/chart/components/labels_generator/numeric-axis-labels.generator.js +6 -0
- package/dist/chart/components/navigation_map/navigation-map-move.handler.d.ts +36 -0
- package/dist/chart/components/navigation_map/navigation-map-move.handler.js +6 -0
- package/dist/chart/components/navigation_map/navigation-map.component.d.ts +52 -0
- package/dist/chart/components/navigation_map/navigation-map.component.js +6 -0
- package/dist/chart/components/navigation_map/navigation-map.drawer.d.ts +96 -0
- package/dist/chart/components/navigation_map/navigation-map.drawer.js +6 -0
- package/dist/chart/components/navigation_map/navigation-map.model.d.ts +25 -0
- package/dist/chart/components/navigation_map/navigation-map.model.js +7 -0
- package/dist/chart/components/pan/chart-pan.component.d.ts +52 -0
- package/dist/chart/components/pan/chart-pan.component.js +6 -0
- package/dist/chart/components/pane/extent/y-extent-component.d.ts +91 -0
- package/dist/chart/components/pane/extent/y-extent-component.js +6 -0
- package/dist/chart/components/pane/pane-hit-test.controller.d.ts +39 -0
- package/dist/chart/components/pane/pane-hit-test.controller.js +6 -0
- package/dist/chart/components/pane/pane-manager.component.d.ts +87 -0
- package/dist/chart/components/pane/pane-manager.component.js +6 -0
- package/dist/chart/components/pane/pane.component.d.ts +193 -0
- package/dist/chart/components/pane/pane.component.js +6 -0
- package/dist/chart/components/resizer/bar-resizer.component.d.ts +72 -0
- package/dist/chart/components/resizer/bar-resizer.component.js +6 -0
- package/dist/chart/components/resizer/bar-resizer.drawer.d.ts +34 -0
- package/dist/chart/components/resizer/bar-resizer.drawer.js +6 -0
- package/dist/chart/components/snapshot/snapshot.component.d.ts +31 -0
- package/dist/chart/components/snapshot/snapshot.component.js +6 -0
- package/dist/chart/components/volumes/separate-volumes.component.d.ts +45 -0
- package/dist/chart/components/volumes/separate-volumes.component.js +6 -0
- package/dist/chart/components/volumes/volume-color-resolvers.functions.d.ts +11 -0
- package/dist/chart/components/volumes/volume-color-resolvers.functions.js +6 -0
- package/dist/chart/components/volumes/volumes.component.d.ts +59 -0
- package/dist/chart/components/volumes/volumes.component.js +6 -0
- package/dist/chart/components/volumes/volumes.drawer.d.ts +71 -0
- package/dist/chart/components/volumes/volumes.drawer.js +6 -0
- package/dist/chart/components/volumes/volumes.formatter.d.ts +6 -0
- package/dist/chart/components/volumes/volumes.formatter.js +6 -0
- package/dist/chart/components/volumes/volumes.model.d.ts +32 -0
- package/dist/chart/components/volumes/volumes.model.js +6 -0
- package/dist/chart/components/watermark/water-mark.component.d.ts +75 -0
- package/dist/chart/components/watermark/water-mark.component.js +6 -0
- package/dist/chart/components/watermark/water-mark.drawer.d.ts +68 -0
- package/dist/chart/components/watermark/water-mark.drawer.js +6 -0
- package/dist/chart/components/x_axis/numeric-x-axis-labels.generator.d.ts +25 -0
- package/dist/chart/components/x_axis/numeric-x-axis-labels.generator.js +6 -0
- package/dist/chart/components/x_axis/time/parser/time-formats-matchers.functions.d.ts +55 -0
- package/dist/chart/components/x_axis/time/parser/time-formats-matchers.functions.js +6 -0
- package/dist/chart/components/x_axis/time/parser/time-formats-parser.functions.d.ts +23 -0
- package/dist/chart/components/x_axis/time/parser/time-formats-parser.functions.js +6 -0
- package/dist/chart/components/x_axis/time/parser/time-formats-validators.functions.d.ts +28 -0
- package/dist/chart/components/x_axis/time/parser/time-formats-validators.functions.js +6 -0
- package/dist/chart/components/x_axis/time/parser/time-formats.model.d.ts +33 -0
- package/dist/chart/components/x_axis/time/parser/time-formats.model.js +6 -0
- package/dist/chart/components/x_axis/time/x-axis-weights.functions.d.ts +62 -0
- package/dist/chart/components/x_axis/time/x-axis-weights.functions.js +6 -0
- package/dist/chart/components/x_axis/time/x-axis-weights.generator.d.ts +33 -0
- package/dist/chart/components/x_axis/time/x-axis-weights.generator.js +6 -0
- package/dist/chart/components/x_axis/x-axis-draw.functions.d.ts +17 -0
- package/dist/chart/components/x_axis/x-axis-draw.functions.js +6 -0
- package/dist/chart/components/x_axis/x-axis-labels.drawer.d.ts +42 -0
- package/dist/chart/components/x_axis/x-axis-labels.drawer.js +6 -0
- package/dist/chart/components/x_axis/x-axis-labels.generator.d.ts +141 -0
- package/dist/chart/components/x_axis/x-axis-labels.generator.js +6 -0
- package/dist/chart/components/x_axis/x-axis-labels.model.d.ts +39 -0
- package/dist/chart/components/x_axis/x-axis-labels.model.js +6 -0
- package/dist/chart/components/x_axis/x-axis-scale.handler.d.ts +38 -0
- package/dist/chart/components/x_axis/x-axis-scale.handler.js +6 -0
- package/dist/chart/components/x_axis/x-axis-time-labels.drawer.d.ts +54 -0
- package/dist/chart/components/x_axis/x-axis-time-labels.drawer.js +6 -0
- package/dist/chart/components/x_axis/x-axis.component.d.ts +73 -0
- package/dist/chart/components/x_axis/x-axis.component.js +6 -0
- package/dist/chart/components/y_axis/label-color.functions.d.ts +18 -0
- package/dist/chart/components/y_axis/label-color.functions.js +6 -0
- package/dist/chart/components/y_axis/numeric-y-axis-labels.generator.d.ts +22 -0
- package/dist/chart/components/y_axis/numeric-y-axis-labels.generator.js +6 -0
- package/dist/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.d.ts +33 -0
- package/dist/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.js +6 -0
- package/dist/chart/components/y_axis/price_labels/labels-positions-calculator.d.ts +27 -0
- package/dist/chart/components/y_axis/price_labels/labels-positions-calculator.js +6 -0
- package/dist/chart/components/y_axis/price_labels/last-candle-labels.provider.d.ts +35 -0
- package/dist/chart/components/y_axis/price_labels/last-candle-labels.provider.js +6 -0
- package/dist/chart/components/y_axis/price_labels/price-label.drawer.d.ts +23 -0
- package/dist/chart/components/y_axis/price_labels/price-label.drawer.js +6 -0
- package/dist/chart/components/y_axis/price_labels/y-axis-labels.model.d.ts +159 -0
- package/dist/chart/components/y_axis/price_labels/y-axis-labels.model.js +6 -0
- package/dist/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.d.ts +23 -0
- package/dist/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.js +6 -0
- package/dist/chart/components/y_axis/y-axis-base-labels.model.d.ts +31 -0
- package/dist/chart/components/y_axis/y-axis-base-labels.model.js +6 -0
- package/dist/chart/components/y_axis/y-axis-labels.drawer.d.ts +70 -0
- package/dist/chart/components/y_axis/y-axis-labels.drawer.js +6 -0
- package/dist/chart/components/y_axis/y-axis-scale.handler.d.ts +32 -0
- package/dist/chart/components/y_axis/y-axis-scale.handler.js +6 -0
- package/dist/chart/components/y_axis/y-axis.component.d.ts +158 -0
- package/dist/chart/components/y_axis/y-axis.component.js +6 -0
- package/dist/chart/components/y_axis/y-axis.drawer.d.ts +72 -0
- package/dist/chart/components/y_axis/y-axis.drawer.js +6 -0
- package/dist/chart/components/y_axis/y-axis.model.d.ts +33 -0
- package/dist/chart/components/y_axis/y-axis.model.js +6 -0
- package/dist/chart/drawers/chart-background.drawer.d.ts +19 -0
- package/dist/chart/drawers/chart-background.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/area.drawer.d.ts +13 -0
- package/dist/chart/drawers/chart-type-drawers/area.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/bar.drawer.d.ts +14 -0
- package/dist/chart/drawers/chart-type-drawers/bar.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/baseline.drawer.d.ts +15 -0
- package/dist/chart/drawers/chart-type-drawers/baseline.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/candle.drawer.d.ts +25 -0
- package/dist/chart/drawers/chart-type-drawers/candle.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/histogram.drawer.d.ts +13 -0
- package/dist/chart/drawers/chart-type-drawers/histogram.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/line.drawer.d.ts +13 -0
- package/dist/chart/drawers/chart-type-drawers/line.drawer.js +6 -0
- package/dist/chart/drawers/chart-type-drawers/scatter-plot.drawer.d.ts +13 -0
- package/dist/chart/drawers/chart-type-drawers/scatter-plot.drawer.js +6 -0
- package/dist/chart/drawers/clear-canvas.drawer.d.ts +16 -0
- package/dist/chart/drawers/clear-canvas.drawer.js +6 -0
- package/dist/chart/drawers/composite.drawer.d.ts +25 -0
- package/dist/chart/drawers/composite.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/candle-series-wrapper.d.ts +23 -0
- package/dist/chart/drawers/data-series-drawers/candle-series-wrapper.js +6 -0
- package/dist/chart/drawers/data-series-drawers/color-candle.drawer.d.ts +17 -0
- package/dist/chart/drawers/data-series-drawers/color-candle.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/data-series-drawers.utils.d.ts +8 -0
- package/dist/chart/drawers/data-series-drawers/data-series-drawers.utils.js +6 -0
- package/dist/chart/drawers/data-series-drawers/difference-cloud.drawer.d.ts +21 -0
- package/dist/chart/drawers/data-series-drawers/difference-cloud.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/histogram.drawer.d.ts +11 -0
- package/dist/chart/drawers/data-series-drawers/histogram.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/linear.drawer.d.ts +12 -0
- package/dist/chart/drawers/data-series-drawers/linear.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/points.drawer.d.ts +11 -0
- package/dist/chart/drawers/data-series-drawers/points.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/rectangular-tool.drawer.d.ts +9 -0
- package/dist/chart/drawers/data-series-drawers/rectangular-tool.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/text.drawer.d.ts +13 -0
- package/dist/chart/drawers/data-series-drawers/text.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/trend-histogram.drawer.d.ts +12 -0
- package/dist/chart/drawers/data-series-drawers/trend-histogram.drawer.js +6 -0
- package/dist/chart/drawers/data-series-drawers/triangle.drawer.d.ts +12 -0
- package/dist/chart/drawers/data-series-drawers/triangle.drawer.js +6 -0
- package/dist/chart/drawers/data-series.drawer.d.ts +39 -0
- package/dist/chart/drawers/data-series.drawer.js +6 -0
- package/dist/chart/drawers/drawing-manager.d.ts +61 -0
- package/dist/chart/drawers/drawing-manager.js +6 -0
- package/dist/chart/drawers/ht-data-series.drawer.d.ts +22 -0
- package/dist/chart/drawers/ht-data-series.drawer.js +6 -0
- package/dist/chart/events/event-bus.d.ts +48 -0
- package/dist/chart/events/event-bus.js +6 -0
- package/dist/chart/events/events.d.ts +8 -0
- package/dist/chart/events/events.js +6 -0
- package/dist/chart/inputhandlers/candle-tap.handler.d.ts +27 -0
- package/dist/chart/inputhandlers/candle-tap.handler.js +6 -0
- package/dist/chart/inputhandlers/chart-resize.handler.d.ts +67 -0
- package/dist/chart/inputhandlers/chart-resize.handler.js +6 -0
- package/dist/chart/inputhandlers/cross-event-producer.component.d.ts +44 -0
- package/dist/chart/inputhandlers/cross-event-producer.component.js +6 -0
- package/dist/chart/inputhandlers/hover-producer.component.d.ts +140 -0
- package/dist/chart/inputhandlers/hover-producer.component.js +6 -0
- package/dist/chart/inputhandlers/main-canvas-touch.handler.d.ts +54 -0
- package/dist/chart/inputhandlers/main-canvas-touch.handler.js +6 -0
- package/dist/chart/inputlisteners/canvas-input-listener.component.d.ts +311 -0
- package/dist/chart/inputlisteners/canvas-input-listener.component.js +6 -0
- package/dist/chart/model/baseline.model.d.ts +54 -0
- package/dist/chart/model/baseline.model.js +6 -0
- package/dist/chart/model/bounds.model.d.ts +16 -0
- package/dist/chart/model/bounds.model.js +6 -0
- package/dist/chart/model/candle-hover.d.ts +35 -0
- package/dist/chart/model/candle-hover.js +6 -0
- package/dist/chart/model/candle-series-high-low.provider.d.ts +20 -0
- package/dist/chart/model/candle-series-high-low.provider.js +6 -0
- package/dist/chart/model/candle-series.model.d.ts +150 -0
- package/dist/chart/model/candle-series.model.js +6 -0
- package/dist/chart/model/candle.model.d.ts +46 -0
- package/dist/chart/model/candle.model.js +6 -0
- package/dist/chart/model/canvas.model.d.ts +131 -0
- package/dist/chart/model/canvas.model.js +6 -0
- package/dist/chart/model/chart-base-element.d.ts +103 -0
- package/dist/chart/model/chart-base-element.js +6 -0
- package/dist/chart/model/compare-series-hover.d.ts +22 -0
- package/dist/chart/model/compare-series-hover.js +6 -0
- package/dist/chart/model/data-series-view.d.ts +58 -0
- package/dist/chart/model/data-series-view.js +6 -0
- package/dist/chart/model/data-series.config.d.ts +31 -0
- package/dist/chart/model/data-series.config.js +6 -0
- package/dist/chart/model/data-series.model.d.ts +172 -0
- package/dist/chart/model/data-series.model.js +6 -0
- package/dist/chart/model/date-time.formatter.d.ts +23 -0
- package/dist/chart/model/date-time.formatter.js +6 -0
- package/dist/chart/model/hit-test-canvas.model.d.ts +128 -0
- package/dist/chart/model/hit-test-canvas.model.js +6 -0
- package/dist/chart/model/main-candle-series.model.d.ts +27 -0
- package/dist/chart/model/main-candle-series.model.js +6 -0
- package/dist/chart/model/scale.model.d.ts +180 -0
- package/dist/chart/model/scale.model.js +6 -0
- package/dist/chart/model/scaling/auto-scale.model.d.ts +79 -0
- package/dist/chart/model/scaling/auto-scale.model.js +6 -0
- package/dist/chart/model/scaling/constrait.functions.d.ts +43 -0
- package/dist/chart/model/scaling/constrait.functions.js +6 -0
- package/dist/chart/model/scaling/lock-ratio.model.d.ts +16 -0
- package/dist/chart/model/scaling/lock-ratio.model.js +6 -0
- package/dist/chart/model/scaling/move-chart.functions.d.ts +20 -0
- package/dist/chart/model/scaling/move-chart.functions.js +6 -0
- package/dist/chart/model/scaling/viewport.model.d.ts +223 -0
- package/dist/chart/model/scaling/viewport.model.js +6 -0
- package/dist/chart/model/scaling/x-zooming.functions.d.ts +26 -0
- package/dist/chart/model/scaling/x-zooming.functions.js +6 -0
- package/dist/chart/model/time-zone.model.d.ts +65 -0
- package/dist/chart/model/time-zone.model.js +6 -0
- package/dist/chart/model/visual-candle.d.ts +106 -0
- package/dist/chart/model/visual-candle.js +6 -0
- package/dist/chart/utils/__tests__/array.utils.test.d.ts +6 -0
- package/dist/chart/utils/__tests__/array.utils.test.js +6 -0
- package/dist/chart/utils/__tests__/object.utils.test.d.ts +6 -0
- package/dist/chart/utils/__tests__/object.utils.test.js +6 -0
- package/dist/chart/utils/__tests__/priceIncrementsUtils.test.d.ts +6 -0
- package/dist/chart/utils/__tests__/priceIncrementsUtils.test.js +6 -0
- package/dist/chart/utils/array.utils.d.ts +101 -0
- package/dist/chart/utils/array.utils.js +6 -0
- package/dist/chart/utils/auto-period-detector.utils.d.ts +16 -0
- package/dist/chart/utils/auto-period-detector.utils.js +6 -0
- package/dist/chart/utils/candles-generator-ts.utils.d.ts +41 -0
- package/dist/chart/utils/candles-generator-ts.utils.js +6 -0
- package/dist/chart/utils/candles-generator.utils.d.ts +13 -0
- package/dist/chart/utils/candles-generator.utils.js +6 -0
- package/dist/chart/utils/candles.utils.d.ts +8 -0
- package/dist/chart/utils/candles.utils.js +6 -0
- package/dist/chart/utils/canvas/canvas-drawing-functions.utils.d.ts +68 -0
- package/dist/chart/utils/canvas/canvas-drawing-functions.utils.js +6 -0
- package/dist/chart/utils/canvas/canvas-font-measure-tool.utils.d.ts +20 -0
- package/dist/chart/utils/canvas/canvas-font-measure-tool.utils.js +6 -0
- package/dist/chart/utils/canvas/canvas-text-functions.utils.d.ts +76 -0
- package/dist/chart/utils/canvas/canvas-text-functions.utils.js +6 -0
- package/dist/chart/utils/color.utils.d.ts +6 -0
- package/dist/chart/utils/color.utils.js +6 -0
- package/dist/chart/utils/device/browser.utils.d.ts +9 -0
- package/dist/chart/utils/device/browser.utils.js +6 -0
- package/dist/chart/utils/device/device-detector.utils.d.ts +12 -0
- package/dist/chart/utils/device/device-detector.utils.js +6 -0
- package/dist/chart/utils/device/device-pixel-ratio.utils.d.ts +16 -0
- package/dist/chart/utils/device/device-pixel-ratio.utils.js +6 -0
- package/dist/chart/utils/device/touchpad.utils.d.ts +30 -0
- package/dist/chart/utils/device/touchpad.utils.js +6 -0
- package/dist/chart/utils/dom.utils.d.ts +13 -0
- package/dist/chart/utils/dom.utils.js +6 -0
- package/dist/chart/utils/function.utils.d.ts +13 -0
- package/dist/chart/utils/function.utils.js +6 -0
- package/dist/chart/utils/math.utils.d.ts +40 -0
- package/dist/chart/utils/math.utils.js +6 -0
- package/dist/chart/utils/merge.utils.d.ts +27 -0
- package/dist/chart/utils/merge.utils.js +6 -0
- package/dist/chart/utils/object.utils.d.ts +46 -0
- package/dist/chart/utils/object.utils.js +6 -0
- package/dist/chart/utils/perfomance/animation-frame-cache.utils.d.ts +53 -0
- package/dist/chart/utils/perfomance/animation-frame-cache.utils.js +6 -0
- package/dist/chart/utils/perfomance/debounce.utils.d.ts +6 -0
- package/dist/chart/utils/perfomance/debounce.utils.js +6 -0
- package/dist/chart/utils/perfomance/memoize.utils.d.ts +21 -0
- package/dist/chart/utils/perfomance/memoize.utils.js +6 -0
- package/dist/chart/utils/perfomance/request-animation-frame-throttle.utils.d.ts +15 -0
- package/dist/chart/utils/perfomance/request-animation-frame-throttle.utils.js +6 -0
- package/dist/chart/utils/perfomance/throttle.utils.d.ts +15 -0
- package/dist/chart/utils/perfomance/throttle.utils.js +6 -0
- package/dist/chart/utils/price-increments.utils.d.ts +44 -0
- package/dist/chart/utils/price-increments.utils.js +6 -0
- package/dist/chart/utils/uuid.utils.d.ts +6 -0
- package/dist/chart/utils/uuid.utils.js +6 -0
- package/dist/dxchart.min.js +26 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +6 -0
- package/package.json +103 -0
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (C) 2002 - 2023 Devexperts LLC
|
|
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 { PriceAxisType } from './components/labels_generator/numeric-axis-labels.generator';
|
|
7
|
+
import { MagnetTarget } from './components/cross_tool/cross-tool.component';
|
|
8
|
+
import { CrossToolType } from './components/cross_tool/cross-tool.model';
|
|
9
|
+
import { EventType } from './components/events/events.model';
|
|
10
|
+
import { HighlightType } from './components/highlights/highlights.model';
|
|
11
|
+
import { WaterMarkPositionType } from './components/watermark/water-mark.drawer';
|
|
12
|
+
import { TimeFormatWithDuration } from './components/x_axis/time/parser/time-formats.model';
|
|
13
|
+
import { DrawerType } from './drawers/drawing-manager';
|
|
14
|
+
import { DateTimeFormatter, TimeFormatterConfig } from './model/date-time.formatter';
|
|
15
|
+
import { MergeOptions } from './utils/merge.utils';
|
|
16
|
+
import { DeepPartial } from './utils/object.utils';
|
|
17
|
+
export declare const MAIN_FONT = "Open Sans Semibold, sans-serif";
|
|
18
|
+
export interface DateTimeFormatConfig {
|
|
19
|
+
format: string;
|
|
20
|
+
showWhen?: {
|
|
21
|
+
periodLessThen?: number;
|
|
22
|
+
periodMoreThen?: number;
|
|
23
|
+
};
|
|
24
|
+
customFormatter?: DateTimeFormatter;
|
|
25
|
+
}
|
|
26
|
+
export interface BarTypes {
|
|
27
|
+
candle: unknown;
|
|
28
|
+
bar: unknown;
|
|
29
|
+
line: unknown;
|
|
30
|
+
area: unknown;
|
|
31
|
+
scatterPlot: unknown;
|
|
32
|
+
hollow: unknown;
|
|
33
|
+
histogram: unknown;
|
|
34
|
+
baseline: unknown;
|
|
35
|
+
trend: unknown;
|
|
36
|
+
}
|
|
37
|
+
export type BarType = keyof BarTypes;
|
|
38
|
+
export declare const LastBarRedrawableBarTypes: BarType[];
|
|
39
|
+
export declare const availableBarTypes: BarType[];
|
|
40
|
+
export declare const isLastBarRedrawAvailable: (type: BarType) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Full chart-core default config.
|
|
43
|
+
* @doc-tags chart-core,default-config
|
|
44
|
+
* @doc-tags-name getDefaultConfig=xl
|
|
45
|
+
*/
|
|
46
|
+
export declare const getDefaultConfig: () => FullChartConfig;
|
|
47
|
+
/**
|
|
48
|
+
* Merges a partial chart configuration object with a default chart configuration object.
|
|
49
|
+
* @param {PartialChartConfig} config - The partial chart configuration object to merge.
|
|
50
|
+
* @param {FullChartConfig} defaultConfig - The default chart configuration object to merge with.
|
|
51
|
+
* @returns {FullChartConfig} - The merged chart configuration object.
|
|
52
|
+
*/
|
|
53
|
+
export declare function mergeWithDefaultConfig(config: PartialChartConfig, defaultConfig?: FullChartConfig): FullChartConfig;
|
|
54
|
+
/**
|
|
55
|
+
* Merges a partial chart configuration object with the default configuration object and returns a new object with the merged values.
|
|
56
|
+
* @param {PartialChartConfig} config - The partial chart configuration object to merge with the default configuration object.
|
|
57
|
+
* @param {FullChartConfig} defaultConfig - The default chart configuration object to merge with the partial configuration object. If not provided, the default configuration object will be retrieved using getDefaultConfig() function.
|
|
58
|
+
* @returns {FullChartConfig} - A new object with the merged values of the partial and default configuration objects.
|
|
59
|
+
* @todo Implement deep copy of the partial configuration object before merging.
|
|
60
|
+
*/
|
|
61
|
+
export declare function mergeWithDefaultConfigCopy(config: PartialChartConfig, defaultConfig?: FullChartConfig): FullChartConfig;
|
|
62
|
+
/**
|
|
63
|
+
* This function rewrites the properties of an object with the properties of another object.
|
|
64
|
+
* @param {object} current - The object to be rewritten.
|
|
65
|
+
* @param {object} newObj - The object containing the new properties.
|
|
66
|
+
* @returns {void}
|
|
67
|
+
*/
|
|
68
|
+
export declare function rewrite(current: Record<string, any>, newObj: Record<string, any>): void;
|
|
69
|
+
/**
|
|
70
|
+
* This function is intended to be used for merging config objects
|
|
71
|
+
* Current chart architecture with passing references to same config between different parts of the system makes this function unusable
|
|
72
|
+
* TODO: Think about replacing direct references in constructor argument with functions that returns config.
|
|
73
|
+
* E.g. ChartBootstrap passes direct reference to config to ChartDrawer
|
|
74
|
+
* Once reference updated in ChartBootstrap, it's not updated in ChartDrawer, it's still pointing to the previous version of config
|
|
75
|
+
*/
|
|
76
|
+
export declare function immutableMerge<T>(base: Partial<T>, override: Partial<T>, options: MergeOptions): T;
|
|
77
|
+
export interface DateFormat {
|
|
78
|
+
format: string;
|
|
79
|
+
super: string;
|
|
80
|
+
}
|
|
81
|
+
export interface DateFormats {
|
|
82
|
+
minute: DateFormat;
|
|
83
|
+
day: DateFormat;
|
|
84
|
+
}
|
|
85
|
+
export interface FullChartColors {
|
|
86
|
+
candleTheme: CandleTheme;
|
|
87
|
+
activeCandleTheme: CandleTheme;
|
|
88
|
+
barTheme: LineStyleTheme;
|
|
89
|
+
lineTheme: LineStyleTheme;
|
|
90
|
+
areaTheme: AreaStyleTheme;
|
|
91
|
+
chartAreaTheme: ChartAreaTheme;
|
|
92
|
+
scatterPlot: ScatterPlotStyle;
|
|
93
|
+
baseLineTheme: BaselineStyleTheme;
|
|
94
|
+
histogram: HistogramColors;
|
|
95
|
+
highlights: Record<HighlightType, HighlightsColors>;
|
|
96
|
+
volume: VolumeColors;
|
|
97
|
+
secondaryChartTheme: SecondaryChartTheme[];
|
|
98
|
+
waterMarkTheme: {
|
|
99
|
+
firstRowColor: string;
|
|
100
|
+
secondRowColor: string;
|
|
101
|
+
thirdRowColor: string;
|
|
102
|
+
};
|
|
103
|
+
highLowTheme: {
|
|
104
|
+
highColor: string;
|
|
105
|
+
lowColor: string;
|
|
106
|
+
};
|
|
107
|
+
yAxis: {
|
|
108
|
+
backgroundColor: string;
|
|
109
|
+
backgroundHoverColor: string;
|
|
110
|
+
zeroPercentLine: string;
|
|
111
|
+
labelTextColor: string;
|
|
112
|
+
labelInvertedTextColor: string;
|
|
113
|
+
labelBoxColor: string;
|
|
114
|
+
rectLabelTextColor: string;
|
|
115
|
+
rectLabelInvertedTextColor: string;
|
|
116
|
+
};
|
|
117
|
+
xAxis: {
|
|
118
|
+
backgroundColor: string;
|
|
119
|
+
labelTextColor: string;
|
|
120
|
+
};
|
|
121
|
+
crossTool: {
|
|
122
|
+
lineColor: string;
|
|
123
|
+
labelBoxColor: string;
|
|
124
|
+
labelTextColor: string;
|
|
125
|
+
};
|
|
126
|
+
events: {
|
|
127
|
+
earnings: EventColors;
|
|
128
|
+
dividends: EventColors;
|
|
129
|
+
splits: EventColors;
|
|
130
|
+
'conference-calls': EventColors;
|
|
131
|
+
};
|
|
132
|
+
navigationMap: {
|
|
133
|
+
buttonColor: string;
|
|
134
|
+
knotColor: string;
|
|
135
|
+
sliderColor: string;
|
|
136
|
+
backgroundColor: string;
|
|
137
|
+
buttonArrowColor: string;
|
|
138
|
+
knotLineColor: string;
|
|
139
|
+
knotBorderColor: string;
|
|
140
|
+
timeLabelsTextColor: string;
|
|
141
|
+
mapFillColor: string;
|
|
142
|
+
mapGradientTopColor?: string;
|
|
143
|
+
mapGradientBottomColor?: string;
|
|
144
|
+
mapColor: string;
|
|
145
|
+
};
|
|
146
|
+
instrumentInfo: {
|
|
147
|
+
textColor: string;
|
|
148
|
+
};
|
|
149
|
+
paneResizer: {
|
|
150
|
+
lineColor: string;
|
|
151
|
+
bgColor: string;
|
|
152
|
+
bgHoverColor: string;
|
|
153
|
+
};
|
|
154
|
+
labels: YAxisLabelsColors;
|
|
155
|
+
}
|
|
156
|
+
export interface DateFormatter {
|
|
157
|
+
applyPattern?: (pattern: string) => string;
|
|
158
|
+
createFormatterFunction?: (pattern: string) => DateTimeFormatter;
|
|
159
|
+
utcTimeOverride?: {
|
|
160
|
+
pattern?: string;
|
|
161
|
+
test?: (pattern: string) => void;
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* The main configuration file for chart-core.
|
|
166
|
+
* Includes all components' configurations, global configs like dateFormatter, and colors.
|
|
167
|
+
*/
|
|
168
|
+
export interface FullChartConfig extends TimeFormatterConfig {
|
|
169
|
+
/**
|
|
170
|
+
* Controls how chart series are positioned horizontally and vertically.
|
|
171
|
+
* Other configurations like: inverse, lockRatio etc.
|
|
172
|
+
*/
|
|
173
|
+
scale: ChartScale;
|
|
174
|
+
/**
|
|
175
|
+
* Group of component configurations. Chart component is a single visual object on chart.
|
|
176
|
+
* Examples: chart itself, events, x-axis, highlights, cross tool.
|
|
177
|
+
*/
|
|
178
|
+
components: ChartComponents;
|
|
179
|
+
/**
|
|
180
|
+
* All colors in chart-core are configured here.
|
|
181
|
+
*/
|
|
182
|
+
colors: FullChartColors;
|
|
183
|
+
/**
|
|
184
|
+
* Date and time formatting configuration.
|
|
185
|
+
*/
|
|
186
|
+
dateFormatter?: DateFormatter;
|
|
187
|
+
/**
|
|
188
|
+
* Timezone to use on chart X axis labels and any other timestamps.
|
|
189
|
+
* Examples: Africa/Accra, Europe/Moscow, Asia/Tehran.
|
|
190
|
+
*/
|
|
191
|
+
timezone: string;
|
|
192
|
+
/**
|
|
193
|
+
* If set - chart canvas will have fixed size always.
|
|
194
|
+
*/
|
|
195
|
+
fixedSize?: {
|
|
196
|
+
width: number;
|
|
197
|
+
height: number;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Right to left mode. Used in drawings (like text drawing) calculation.
|
|
201
|
+
*/
|
|
202
|
+
rtl: boolean;
|
|
203
|
+
/**
|
|
204
|
+
* Initial visual order of chart drawers. Reorder to put volumes on top of candles for example.
|
|
205
|
+
*/
|
|
206
|
+
drawingOrder: DrawerType[];
|
|
207
|
+
useUTCTimeOverride: boolean;
|
|
208
|
+
animation: AnimationConfig;
|
|
209
|
+
devexpertsPromoLink: boolean;
|
|
210
|
+
}
|
|
211
|
+
export type PartialChartConfig = DeepPartial<FullChartConfig>;
|
|
212
|
+
export interface ChartScale {
|
|
213
|
+
/**
|
|
214
|
+
* Auto scale will always fit whole chart series in viewport.
|
|
215
|
+
*/
|
|
216
|
+
auto: boolean;
|
|
217
|
+
/**
|
|
218
|
+
* True - will zoom to cursor on mouse wheel. False - zoom to last candle.
|
|
219
|
+
*/
|
|
220
|
+
zoomToCursor: boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Locks the ratio between price/time, so when zooming it will feel like google maps.
|
|
223
|
+
*/
|
|
224
|
+
lockPriceToBarRatio: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Inverses the Y scale vertically. TODO move to components.yAxis.
|
|
227
|
+
*/
|
|
228
|
+
inverse: boolean;
|
|
229
|
+
/**
|
|
230
|
+
* Do auto scale (even if it's not enabled in config) after instrument change.
|
|
231
|
+
*/
|
|
232
|
+
autoScaleOnCandles: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* When dragging chart under specific angle - will automatically disable auto-scale.
|
|
235
|
+
*/
|
|
236
|
+
autoScaleDisableOnDrag: AutoScaleDisableOnDrag;
|
|
237
|
+
/**
|
|
238
|
+
* 0..1 ratio of full viewport; 0.5 = middle, 0.75 = 3/4 of viewport
|
|
239
|
+
*/
|
|
240
|
+
zoomSensitivity: number;
|
|
241
|
+
/**
|
|
242
|
+
* Defines how much items (candles) will be in viewport when chart applies basic scale
|
|
243
|
+
*/
|
|
244
|
+
defaultViewportItems: number;
|
|
245
|
+
/**
|
|
246
|
+
* Adjust x viewport when y-axis width is changed, so x zoom remains the same
|
|
247
|
+
*/
|
|
248
|
+
keepZoomXOnYAxisChange: boolean;
|
|
249
|
+
}
|
|
250
|
+
export interface AutoScaleDisableOnDrag {
|
|
251
|
+
enabled: boolean;
|
|
252
|
+
/**
|
|
253
|
+
* The angle of mouse movement. Default - Math.PI / 9.
|
|
254
|
+
*/
|
|
255
|
+
edgeAngle: number;
|
|
256
|
+
/**
|
|
257
|
+
* Distance that mouse should travel vertically in px. Default - 80.
|
|
258
|
+
*/
|
|
259
|
+
yDiff: number;
|
|
260
|
+
}
|
|
261
|
+
export interface ChartComponents {
|
|
262
|
+
chart: ChartConfigComponentsChart;
|
|
263
|
+
xAxis: ChartConfigComponentsXAxis;
|
|
264
|
+
yAxis: ChartConfigComponentsYAxis;
|
|
265
|
+
grid: GridComponentConfig;
|
|
266
|
+
volumes: ChartConfigComponentsVolumes;
|
|
267
|
+
offsets: ChartConfigComponentsOffsets;
|
|
268
|
+
waterMark: ChartConfigComponentsWaterMark;
|
|
269
|
+
events: ChartConfigComponentsEvents;
|
|
270
|
+
highLow: ChartConfigComponentsHighLow;
|
|
271
|
+
crossTool: ChartConfigComponentsCrossTool;
|
|
272
|
+
highlights: ChartConfigComponentsHighlights;
|
|
273
|
+
navigationMap: ChartConfigComponentsNavigationMap;
|
|
274
|
+
baseline: ChartConfigComponentsBaseline;
|
|
275
|
+
/**
|
|
276
|
+
* Horizontal resizer between panes
|
|
277
|
+
*/
|
|
278
|
+
paneResizer: ChartConfigComponentsPaneResizer;
|
|
279
|
+
}
|
|
280
|
+
export interface ChartConfigComponentsChart {
|
|
281
|
+
/**
|
|
282
|
+
* The type of chart. Candle, bar, area and others.
|
|
283
|
+
*/
|
|
284
|
+
type: BarType;
|
|
285
|
+
/**
|
|
286
|
+
* Shows the border of candle. Useful for hollow-candles and to increase contrast on thin candles.
|
|
287
|
+
*/
|
|
288
|
+
showCandlesBorder: boolean;
|
|
289
|
+
/**
|
|
290
|
+
* Shows the border for active candle (tapped by finger on mobile devices).
|
|
291
|
+
*/
|
|
292
|
+
showActiveCandlesBorder: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Shows candle wicks - high and low.
|
|
295
|
+
*/
|
|
296
|
+
showWicks: boolean;
|
|
297
|
+
candleLineWidth: number;
|
|
298
|
+
barLineWidth: number;
|
|
299
|
+
lineWidth: number;
|
|
300
|
+
areaLineWidth: number;
|
|
301
|
+
/**
|
|
302
|
+
* The minimum amount of candles in viewport. It will not be possible to make fewer than that by using zoom.
|
|
303
|
+
*/
|
|
304
|
+
minCandles: number;
|
|
305
|
+
defaultZoomCandleWidth: number;
|
|
306
|
+
minWidth: number;
|
|
307
|
+
zoomStep: number;
|
|
308
|
+
candlePaddingPercent: number;
|
|
309
|
+
highlightActiveCandle: boolean;
|
|
310
|
+
cursor: CursorType;
|
|
311
|
+
selectedWidth: number;
|
|
312
|
+
minCandlesOffset: number;
|
|
313
|
+
histogram: ChartConfigComponentsHistogram;
|
|
314
|
+
}
|
|
315
|
+
export interface ChartConfigComponentsEvents {
|
|
316
|
+
/**
|
|
317
|
+
* Toggle events visibility.
|
|
318
|
+
*/
|
|
319
|
+
visible: boolean;
|
|
320
|
+
/**
|
|
321
|
+
* Toggle specific event type visibility (for example: dividends, splits, earnings).
|
|
322
|
+
*/
|
|
323
|
+
eventsVisibility: Record<EventType, boolean>;
|
|
324
|
+
/**
|
|
325
|
+
* Height of events area in pixels
|
|
326
|
+
*/
|
|
327
|
+
height: number;
|
|
328
|
+
/**
|
|
329
|
+
* Configure events cursor type.
|
|
330
|
+
*/
|
|
331
|
+
cursor: CursorType;
|
|
332
|
+
/**
|
|
333
|
+
* Configure x axis labels
|
|
334
|
+
*/
|
|
335
|
+
xAxisLabelFormat: Array<DateTimeFormatConfig>;
|
|
336
|
+
/**
|
|
337
|
+
* Configure icons, the format is string which contains svg tag, for example:
|
|
338
|
+
* '<svg width="13" height="13" viewBox="0 0 13 13" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
339
|
+
* <path d="M1.06066 6.5L6.5 1.06066L11.9393 6.5L6.5 11.9393L1.06066 6.5Z" stroke="#D92C40" stroke-width="1.5"/>
|
|
340
|
+
* </svg>'
|
|
341
|
+
*/
|
|
342
|
+
icons?: ChartConfigComponentsEventsIcons;
|
|
343
|
+
}
|
|
344
|
+
export interface DateTimeFormatConfig {
|
|
345
|
+
format: string;
|
|
346
|
+
showWhen?: {
|
|
347
|
+
periodLessThen?: number;
|
|
348
|
+
periodMoreThen?: number;
|
|
349
|
+
};
|
|
350
|
+
customFormatter?: DateTimeFormatter;
|
|
351
|
+
}
|
|
352
|
+
export interface ChartConfigComponentsXAxis {
|
|
353
|
+
visible: boolean;
|
|
354
|
+
cursor: CursorType;
|
|
355
|
+
formatsForLabelsConfig: Record<TimeFormatWithDuration, string>;
|
|
356
|
+
padding: {
|
|
357
|
+
top?: number;
|
|
358
|
+
bottom?: number;
|
|
359
|
+
};
|
|
360
|
+
fontSize: number;
|
|
361
|
+
fontFamily: string;
|
|
362
|
+
fontStyle: string;
|
|
363
|
+
}
|
|
364
|
+
export type YAxisAlign = 'left' | 'right';
|
|
365
|
+
export interface ChartConfigComponentsYAxis {
|
|
366
|
+
visible: boolean;
|
|
367
|
+
/**
|
|
368
|
+
* Type of Y axis. Currently supported 'regular', 'percent', 'logarithmic'.
|
|
369
|
+
*/
|
|
370
|
+
type: PriceAxisType;
|
|
371
|
+
/**
|
|
372
|
+
* Align Y axis left or right.
|
|
373
|
+
*/
|
|
374
|
+
align: YAxisAlign;
|
|
375
|
+
/**
|
|
376
|
+
* Configures the labels on Y axis.
|
|
377
|
+
*/
|
|
378
|
+
labels: YAxisLabels;
|
|
379
|
+
/**
|
|
380
|
+
* Override appearance of different label types. Useful to change all labels of the same type.
|
|
381
|
+
*/
|
|
382
|
+
typeConfig: YAxisTypeConfig;
|
|
383
|
+
/**
|
|
384
|
+
* The height of the single label in pixels.
|
|
385
|
+
* Used during calculation step between labels.
|
|
386
|
+
* You can make it smaller to fit more labels on Y axis. Or less to fit less labels.
|
|
387
|
+
*/
|
|
388
|
+
labelHeight: number;
|
|
389
|
+
/**
|
|
390
|
+
* Always show zero line for percent scale.
|
|
391
|
+
*/
|
|
392
|
+
zeroPercentLine: boolean;
|
|
393
|
+
/**
|
|
394
|
+
* Allow to scale chart vertically by dragging Y axis with mouse.
|
|
395
|
+
*/
|
|
396
|
+
customScale: boolean;
|
|
397
|
+
/**
|
|
398
|
+
* Allows to double-click on Y axis to turn on auto-scale.
|
|
399
|
+
*/
|
|
400
|
+
customScaleDblClick: boolean;
|
|
401
|
+
cursor: CursorType;
|
|
402
|
+
resizeDisabledCursor: CursorType;
|
|
403
|
+
labelBoxMargin: {
|
|
404
|
+
top: number;
|
|
405
|
+
bottom: number;
|
|
406
|
+
end: number;
|
|
407
|
+
start: number;
|
|
408
|
+
};
|
|
409
|
+
fontSize: number;
|
|
410
|
+
fontFamily: string;
|
|
411
|
+
}
|
|
412
|
+
export interface ChartConfigComponentsOffsets {
|
|
413
|
+
visible: boolean;
|
|
414
|
+
/**
|
|
415
|
+
* Top offset, measured in percents of chart height.
|
|
416
|
+
*/
|
|
417
|
+
top: number;
|
|
418
|
+
/**
|
|
419
|
+
* Left offset, measured in amount of candles.
|
|
420
|
+
*/
|
|
421
|
+
left: number;
|
|
422
|
+
/**
|
|
423
|
+
* Right offset, measured in amount of candles.
|
|
424
|
+
*/
|
|
425
|
+
right: number;
|
|
426
|
+
/**
|
|
427
|
+
* Bottom offset, measured in percents of chart height.
|
|
428
|
+
*/
|
|
429
|
+
bottom: number;
|
|
430
|
+
}
|
|
431
|
+
export interface ChartConfigComponentsWaterMark {
|
|
432
|
+
visible: boolean;
|
|
433
|
+
/**
|
|
434
|
+
* Position on the screen.
|
|
435
|
+
*/
|
|
436
|
+
position: WaterMarkPositionType;
|
|
437
|
+
offsetX: number;
|
|
438
|
+
offsetY: number;
|
|
439
|
+
logoWidth: number;
|
|
440
|
+
logoHeight: number;
|
|
441
|
+
fontFamily: string;
|
|
442
|
+
/**
|
|
443
|
+
* Font size for first text line.
|
|
444
|
+
*/
|
|
445
|
+
firstRowFontSize: number;
|
|
446
|
+
/**
|
|
447
|
+
* Padding after first text line.
|
|
448
|
+
*/
|
|
449
|
+
firstRowBottomPadding: number;
|
|
450
|
+
/**
|
|
451
|
+
* Font size for second text line.
|
|
452
|
+
*/
|
|
453
|
+
secondRowFontSize: number;
|
|
454
|
+
/**
|
|
455
|
+
* Padding after second text line.
|
|
456
|
+
*/
|
|
457
|
+
secondRowBottomPadding: number;
|
|
458
|
+
/**
|
|
459
|
+
* Font size for third text line.
|
|
460
|
+
*/
|
|
461
|
+
thirdRowFontSize: number;
|
|
462
|
+
/**
|
|
463
|
+
* Padding after third text line.
|
|
464
|
+
*/
|
|
465
|
+
thirdRowBottomPadding: number;
|
|
466
|
+
}
|
|
467
|
+
export interface ChartConfigComponentsHighLow {
|
|
468
|
+
visible: boolean;
|
|
469
|
+
/**
|
|
470
|
+
* Font config of high/low labels.
|
|
471
|
+
*/
|
|
472
|
+
font: string;
|
|
473
|
+
}
|
|
474
|
+
export interface ChartConfigComponentsCrossTool {
|
|
475
|
+
/**
|
|
476
|
+
* The type of cross tool. Visibility is also contolled by type, set 'none' to hide the cross tool.
|
|
477
|
+
*/
|
|
478
|
+
type: CrossToolType;
|
|
479
|
+
/**
|
|
480
|
+
* Line dash for cross tool.
|
|
481
|
+
*/
|
|
482
|
+
lineDash: Array<number>;
|
|
483
|
+
/**
|
|
484
|
+
* When discrete is ON - the cross tool X coordinate will always be at the middle of candle.
|
|
485
|
+
*/
|
|
486
|
+
discrete: boolean;
|
|
487
|
+
/**
|
|
488
|
+
* Cross tool Y coordinate can magnet to OHLC values of candle.
|
|
489
|
+
*/
|
|
490
|
+
magnetTarget: MagnetTarget;
|
|
491
|
+
/**
|
|
492
|
+
* Format of X label config for different periods.
|
|
493
|
+
*/
|
|
494
|
+
xAxisLabelFormat: Array<DateTimeFormatConfig>;
|
|
495
|
+
/**
|
|
496
|
+
* X label appearance.
|
|
497
|
+
*/
|
|
498
|
+
xLabel: {
|
|
499
|
+
padding: {
|
|
500
|
+
top: number;
|
|
501
|
+
bottom: number;
|
|
502
|
+
right: number;
|
|
503
|
+
left: number;
|
|
504
|
+
};
|
|
505
|
+
margin: {
|
|
506
|
+
top: number;
|
|
507
|
+
bottom?: number;
|
|
508
|
+
};
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* X label appearance.
|
|
512
|
+
*/
|
|
513
|
+
yLabel: {
|
|
514
|
+
padding: {
|
|
515
|
+
top: number;
|
|
516
|
+
bottom: number;
|
|
517
|
+
end: number;
|
|
518
|
+
start: number;
|
|
519
|
+
};
|
|
520
|
+
type: YAxisLabelAppearanceType;
|
|
521
|
+
};
|
|
522
|
+
}
|
|
523
|
+
export interface ChartConfigComponentsHighlights {
|
|
524
|
+
visible: boolean;
|
|
525
|
+
/**
|
|
526
|
+
* Border of highlights (session breaks for example).
|
|
527
|
+
*/
|
|
528
|
+
border: {
|
|
529
|
+
width: number;
|
|
530
|
+
dash: [number, number];
|
|
531
|
+
};
|
|
532
|
+
fontFamily: string;
|
|
533
|
+
fontSize: number;
|
|
534
|
+
}
|
|
535
|
+
export interface ChartConfigComponentsVolumes {
|
|
536
|
+
visible: boolean;
|
|
537
|
+
/**
|
|
538
|
+
* Show volumes in overlaying mode or as sub-chart like a study.
|
|
539
|
+
*/
|
|
540
|
+
showSeparately: boolean;
|
|
541
|
+
volumeFillColor: string;
|
|
542
|
+
valueLines: number;
|
|
543
|
+
barCapSize: number;
|
|
544
|
+
volumeBarSpace: number;
|
|
545
|
+
}
|
|
546
|
+
export interface ChartConfigComponentsHistogram {
|
|
547
|
+
barCapSize: number;
|
|
548
|
+
}
|
|
549
|
+
export interface GridComponentConfig {
|
|
550
|
+
visible: boolean;
|
|
551
|
+
/**
|
|
552
|
+
* Shows vertical grid lines.
|
|
553
|
+
*/
|
|
554
|
+
vertical: boolean;
|
|
555
|
+
/**
|
|
556
|
+
* Shows horizontal grid lines.
|
|
557
|
+
*/
|
|
558
|
+
horizontal: boolean;
|
|
559
|
+
/**
|
|
560
|
+
* Width of grid lines in pixels.
|
|
561
|
+
*/
|
|
562
|
+
width: number;
|
|
563
|
+
/**
|
|
564
|
+
* Line dash configuration like [1,2].
|
|
565
|
+
*/
|
|
566
|
+
dash: Array<number>;
|
|
567
|
+
color?: string;
|
|
568
|
+
}
|
|
569
|
+
export interface ChartConfigComponentsNavigationMap {
|
|
570
|
+
visible: boolean;
|
|
571
|
+
allCandlesHistory: boolean;
|
|
572
|
+
timeLabels: {
|
|
573
|
+
visible: boolean;
|
|
574
|
+
dateFormat: string;
|
|
575
|
+
fontFamily: string;
|
|
576
|
+
fontSize: number;
|
|
577
|
+
padding: {
|
|
578
|
+
x: number;
|
|
579
|
+
y: number;
|
|
580
|
+
};
|
|
581
|
+
};
|
|
582
|
+
cursors: {
|
|
583
|
+
chart: CursorType;
|
|
584
|
+
buttonLeft: CursorType;
|
|
585
|
+
buttonRight: CursorType;
|
|
586
|
+
leftResizer: CursorType;
|
|
587
|
+
rightResizer: CursorType;
|
|
588
|
+
slider: CursorType;
|
|
589
|
+
};
|
|
590
|
+
knots: {
|
|
591
|
+
height: number;
|
|
592
|
+
width: number;
|
|
593
|
+
border: number;
|
|
594
|
+
lineWidth: number;
|
|
595
|
+
};
|
|
596
|
+
minSliderWindowWidth: number;
|
|
597
|
+
}
|
|
598
|
+
export interface ChartConfigComponentsBaseline {
|
|
599
|
+
cursor: CursorType;
|
|
600
|
+
dragZone: number;
|
|
601
|
+
height: number;
|
|
602
|
+
}
|
|
603
|
+
export interface ChartConfigComponentsPaneResizer {
|
|
604
|
+
visible: boolean;
|
|
605
|
+
/**
|
|
606
|
+
* Height of resizer in pixels.
|
|
607
|
+
*/
|
|
608
|
+
height: number;
|
|
609
|
+
/**
|
|
610
|
+
* Make the horizontal line fixed and disable resizing.
|
|
611
|
+
*/
|
|
612
|
+
fixedMode: boolean;
|
|
613
|
+
/**
|
|
614
|
+
* Hover area of resizer in pixels.
|
|
615
|
+
*/
|
|
616
|
+
dragZone: number;
|
|
617
|
+
cursor: string;
|
|
618
|
+
}
|
|
619
|
+
export interface AnimationConfig {
|
|
620
|
+
moveDuration: number;
|
|
621
|
+
candleDuration: number;
|
|
622
|
+
paneResizer: {
|
|
623
|
+
bgMode: boolean;
|
|
624
|
+
enabled: boolean;
|
|
625
|
+
duration: number;
|
|
626
|
+
};
|
|
627
|
+
yAxis: {
|
|
628
|
+
/**
|
|
629
|
+
* Deprecated. Old hover animation on Y axis.
|
|
630
|
+
*/
|
|
631
|
+
background: {
|
|
632
|
+
enabled: boolean;
|
|
633
|
+
duration: number;
|
|
634
|
+
};
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
export interface CandleTheme {
|
|
638
|
+
upColor: string;
|
|
639
|
+
downColor: string;
|
|
640
|
+
noneColor: string;
|
|
641
|
+
upWickColor: string;
|
|
642
|
+
downWickColor: string;
|
|
643
|
+
noneWickColor: string;
|
|
644
|
+
borderOpacity?: number;
|
|
645
|
+
}
|
|
646
|
+
export interface HighlightsColors {
|
|
647
|
+
border: string;
|
|
648
|
+
background: string;
|
|
649
|
+
label: string;
|
|
650
|
+
}
|
|
651
|
+
export interface EventColors {
|
|
652
|
+
color: string;
|
|
653
|
+
}
|
|
654
|
+
export interface HistogramColors {
|
|
655
|
+
upCap: string;
|
|
656
|
+
upBottom: string;
|
|
657
|
+
upBright: string;
|
|
658
|
+
downCap: string;
|
|
659
|
+
downBottom: string;
|
|
660
|
+
downBright: string;
|
|
661
|
+
noneCap: string;
|
|
662
|
+
noneBottom: string;
|
|
663
|
+
noneBright: string;
|
|
664
|
+
}
|
|
665
|
+
export interface VolumeColors {
|
|
666
|
+
downCapColor: string;
|
|
667
|
+
upCapColor: string;
|
|
668
|
+
noneCapColor: string;
|
|
669
|
+
downBarColor: string;
|
|
670
|
+
upBarColor: string;
|
|
671
|
+
noneBarColor: string;
|
|
672
|
+
}
|
|
673
|
+
export interface LineStyleTheme {
|
|
674
|
+
upColor: string;
|
|
675
|
+
downColor: string;
|
|
676
|
+
noneColor: string;
|
|
677
|
+
}
|
|
678
|
+
export interface ScatterPlotStyle {
|
|
679
|
+
mainColor: string;
|
|
680
|
+
}
|
|
681
|
+
export interface AreaStyleTheme {
|
|
682
|
+
lineColor: string;
|
|
683
|
+
startColor?: string;
|
|
684
|
+
stopColor?: string;
|
|
685
|
+
}
|
|
686
|
+
export interface BaselineStyleTheme {
|
|
687
|
+
upperSectionStrokeColor: string;
|
|
688
|
+
lowerSectionStrokeColor: string;
|
|
689
|
+
upperSectionFillColor: string;
|
|
690
|
+
lowerSectionFillColor: string;
|
|
691
|
+
baselineColor: string;
|
|
692
|
+
}
|
|
693
|
+
export interface SecondaryChartTheme {
|
|
694
|
+
lineTheme: LineStyleTheme;
|
|
695
|
+
areaTheme: AreaStyleTheme;
|
|
696
|
+
}
|
|
697
|
+
export interface ChartAreaTheme {
|
|
698
|
+
backgroundMode: 'regular' | 'gradient';
|
|
699
|
+
backgroundColor: string;
|
|
700
|
+
backgroundGradientTopColor: string;
|
|
701
|
+
backgroundGradientBottomColor: string;
|
|
702
|
+
axisColor: string;
|
|
703
|
+
gridColor: string;
|
|
704
|
+
}
|
|
705
|
+
export type ChartColors = DeepPartial<FullChartColors>;
|
|
706
|
+
export type YAxisLabelType = string;
|
|
707
|
+
export type YAxisLabelMode = 'none' | 'line' | 'line-label' | 'label';
|
|
708
|
+
export type YAxisLabelAppearanceType = 'badge' | 'rectangle' | 'plain';
|
|
709
|
+
export interface YAxisLabelConfig {
|
|
710
|
+
mode: YAxisLabelMode;
|
|
711
|
+
type: YAxisLabelAppearanceType;
|
|
712
|
+
}
|
|
713
|
+
export interface YAxisLabelColorConfig {
|
|
714
|
+
boxColor: string;
|
|
715
|
+
textColor?: string;
|
|
716
|
+
descriptionText?: string;
|
|
717
|
+
}
|
|
718
|
+
export interface YAxisLastPriceLabelColorConfig {
|
|
719
|
+
boxSelected: string;
|
|
720
|
+
boxPositive: string;
|
|
721
|
+
boxNegative: string;
|
|
722
|
+
textSelected: string;
|
|
723
|
+
textNegative: string;
|
|
724
|
+
textPositive: string;
|
|
725
|
+
}
|
|
726
|
+
export interface YAxisBidAskLabelColorConfig {
|
|
727
|
+
bid: YAxisLabelColorConfig;
|
|
728
|
+
ask: YAxisLabelColorConfig;
|
|
729
|
+
}
|
|
730
|
+
export interface YAxisHighLowLabelColorConfig {
|
|
731
|
+
high: YAxisLabelColorConfig;
|
|
732
|
+
low: YAxisLabelColorConfig;
|
|
733
|
+
}
|
|
734
|
+
export interface YAxisPrePostMarketLabelColorConfig {
|
|
735
|
+
pre: YAxisLabelColorConfig;
|
|
736
|
+
post: YAxisLabelColorConfig;
|
|
737
|
+
}
|
|
738
|
+
export interface YAxisLabels {
|
|
739
|
+
descriptions: boolean;
|
|
740
|
+
/**
|
|
741
|
+
* Settings contains required labels ('lastPrice', 'countDownToBarClose')
|
|
742
|
+
* and optional labels ('bidAsk', 'highLow', 'prevDayClose', 'prePostMarket').
|
|
743
|
+
*/
|
|
744
|
+
settings: Record<YAxisLabelType, YAxisLabelConfig>;
|
|
745
|
+
}
|
|
746
|
+
export interface YAxisTypeConfigProps {
|
|
747
|
+
rounded?: boolean;
|
|
748
|
+
paddings?: {
|
|
749
|
+
top: number;
|
|
750
|
+
bottom: number;
|
|
751
|
+
start: number;
|
|
752
|
+
end: number;
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
export type YAxisTypeConfig = Record<YAxisLabelAppearanceType, YAxisTypeConfigProps>;
|
|
756
|
+
export interface YAxisLabelsColors extends Record<YAxisLabelType, Record<string, any>> {
|
|
757
|
+
lastPrice: YAxisLastPriceLabelColorConfig;
|
|
758
|
+
bidAsk: YAxisBidAskLabelColorConfig;
|
|
759
|
+
highLow: YAxisHighLowLabelColorConfig;
|
|
760
|
+
prePostMarket: YAxisPrePostMarketLabelColorConfig;
|
|
761
|
+
prevDayClose: YAxisLabelColorConfig;
|
|
762
|
+
}
|
|
763
|
+
export interface CustomIcon {
|
|
764
|
+
normal: string;
|
|
765
|
+
hover: string;
|
|
766
|
+
}
|
|
767
|
+
export interface ChartConfigComponentsEventsIcons {
|
|
768
|
+
earnings?: CustomIcon;
|
|
769
|
+
dividends?: CustomIcon;
|
|
770
|
+
splits?: CustomIcon;
|
|
771
|
+
conferenceCalls?: CustomIcon;
|
|
772
|
+
}
|
|
773
|
+
export type CursorType = string;
|
|
774
|
+
export declare const getFontFromConfig: (config: ChartConfigComponentsYAxis) => string;
|