@devexperts/dxcharts-lite 2.0.1 → 2.1.0
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/README.md +28 -29
- package/dist/chart/__tests__/chart.test.d.ts +6 -0
- package/dist/chart/__tests__/chart.test.js +51 -0
- package/dist/chart/{chart-container.js → __tests__/env.d.ts} +0 -1
- package/dist/chart/__tests__/env.js +28 -0
- package/dist/chart/bootstrap.d.ts +7 -2
- package/dist/chart/bootstrap.js +2 -2
- package/dist/chart/chart.config.d.ts +4 -1
- package/dist/chart/chart.config.js +1 -1
- package/dist/chart/chart.d.ts +2 -0
- package/dist/chart/chart.js +3 -1
- package/dist/chart/components/chart/candle-transformer.functions.d.ts +1 -0
- package/dist/chart/components/chart/candle-transformer.functions.js +1 -0
- package/dist/chart/components/chart/chart-base.model.d.ts +2 -2
- package/dist/chart/components/chart/chart-base.model.js +2 -2
- package/dist/chart/components/chart/chart.component.d.ts +6 -0
- package/dist/chart/components/chart/chart.component.js +23 -4
- package/dist/chart/components/chart/chart.model.d.ts +9 -3
- package/dist/chart/components/chart/chart.model.js +35 -13
- package/dist/chart/components/cross_tool/cross-tool.component.d.ts +2 -1
- package/dist/chart/components/cross_tool/cross-tool.component.js +4 -3
- package/dist/chart/components/cross_tool/cross-tool.model.js +1 -0
- package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.d.ts +3 -1
- package/dist/chart/components/cross_tool/types/cross-and-labels.drawer.js +3 -2
- package/dist/chart/components/dynamic-objects/dynamic-objects.component.js +1 -1
- package/dist/chart/components/dynamic-objects/dynamic-objects.model.d.ts +30 -10
- package/dist/chart/components/dynamic-objects/dynamic-objects.model.js +119 -57
- package/dist/chart/components/grid/grid.drawer.js +3 -1
- package/dist/chart/components/pane/extent/y-extent-component.js +2 -1
- package/dist/chart/components/pane/pane-hit-test.controller.js +2 -2
- package/dist/chart/components/volumes/volumes.component.d.ts +3 -0
- package/dist/chart/components/volumes/volumes.component.js +21 -4
- package/dist/chart/components/volumes/volumes.model.d.ts +2 -0
- package/dist/chart/components/volumes/volumes.model.js +2 -0
- package/dist/chart/components/x_axis/x-axis.component.js +2 -2
- package/dist/chart/components/y_axis/label-color.functions.d.ts +2 -1
- package/dist/chart/components/y_axis/label-color.functions.js +17 -0
- package/dist/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.d.ts +2 -2
- package/dist/chart/components/y_axis/price_labels/data-series-y-axis-labels.provider.js +27 -25
- package/dist/chart/components/y_axis/price_labels/labels-positions-calculator.js +24 -13
- package/dist/chart/components/y_axis/price_labels/last-candle-labels.provider.d.ts +3 -3
- package/dist/chart/components/y_axis/price_labels/last-candle-labels.provider.js +58 -40
- package/dist/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.d.ts +3 -3
- package/dist/chart/components/y_axis/price_labels/y-axis-price-labels.drawer.js +15 -13
- package/dist/chart/components/y_axis/y-axis-scale.handler.js +1 -1
- package/dist/chart/components/y_axis/y-axis.component.d.ts +2 -1
- package/dist/chart/components/y_axis/y-axis.component.js +6 -2
- package/dist/chart/drawers/ht-data-series.drawer.js +1 -1
- package/dist/chart/inputhandlers/hover-producer.component.d.ts +1 -1
- package/dist/chart/inputhandlers/hover-producer.component.js +7 -7
- package/dist/chart/inputlisteners/canvas-input-listener.component.d.ts +9 -2
- package/dist/chart/inputlisteners/canvas-input-listener.component.js +21 -19
- package/dist/chart/model/candle-series.model.d.ts +1 -1
- package/dist/chart/model/candle-series.model.js +2 -2
- package/dist/chart/model/compare-series-hover.d.ts +2 -1
- package/dist/chart/model/compare-series-hover.js +1 -0
- package/dist/chart/model/data-series.model.d.ts +3 -2
- package/dist/chart/model/data-series.model.js +2 -1
- package/dist/chart/model/main-candle-series.model.d.ts +1 -1
- package/dist/chart/model/main-candle-series.model.js +2 -2
- package/dist/chart/model/scale.model.d.ts +2 -0
- package/dist/chart/model/scale.model.js +11 -2
- package/dist/chart/utils/dom.utils.d.ts +7 -0
- package/dist/chart/utils/dom.utils.js +12 -0
- package/dist/chart/utils/linkedList.utils.d.ts +3 -3
- package/dist/chart/utils/linkedList.utils.js +55 -57
- package/dist/dxchart.min.js +4 -4
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -8
- package/package.json +18 -4
- package/dist/chart/chart-container.d.ts +0 -18
package/dist/index.d.ts
CHANGED
|
@@ -5,5 +5,6 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { Chart } from './chart/chart';
|
|
7
7
|
import { PartialChartConfig } from './chart/chart.config';
|
|
8
|
+
import { generateCandlesDataTS } from './chart/utils/candles-generator-ts.utils';
|
|
8
9
|
declare const createChart: (el: HTMLElement, config?: PartialChartConfig) => Chart;
|
|
9
|
-
export { createChart, Chart };
|
|
10
|
+
export { createChart, Chart, generateCandlesDataTS as generateCandlesData };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
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 { Chart } from './chart/chart';
|
|
7
|
+
import { generateCandlesDataTS } from './chart/utils/candles-generator-ts.utils';
|
|
7
8
|
const createChart =
|
|
8
9
|
/**
|
|
9
10
|
* Creates a new chart instance using ChartBootstrap class and returns it.
|
|
@@ -15,11 +16,4 @@ const createChart =
|
|
|
15
16
|
const chart = new Chart(el, config);
|
|
16
17
|
return chart;
|
|
17
18
|
};
|
|
18
|
-
|
|
19
|
-
* DXChart global variable. Exposes ChartBootstrap constructor.
|
|
20
|
-
* @doc-tags chart-core,api
|
|
21
|
-
*/
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
window['DXChart'] = Object.assign(Object.assign({}, window['DXChart']), { Chart,
|
|
24
|
-
createChart });
|
|
25
|
-
export { createChart, Chart };
|
|
19
|
+
export { createChart, Chart, generateCandlesDataTS as generateCandlesData };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devexperts/dxcharts-lite",
|
|
3
|
-
"version": "2.0
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "DXCharts Lite",
|
|
5
5
|
"author": "Devexperts Solutions IE Limited",
|
|
6
6
|
"license": "MPL 2.0",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"husky": "^8.0.2",
|
|
73
73
|
"is-glob": "^4.0.3",
|
|
74
74
|
"jest": "^24.9.0",
|
|
75
|
+
"jest-canvas-mock": "^2.5.2",
|
|
75
76
|
"lint-staged": "^13.0.4",
|
|
76
77
|
"mocha": "9.2.0",
|
|
77
78
|
"node-html-parser": "^6.1.5",
|
|
@@ -82,9 +83,9 @@
|
|
|
82
83
|
"ts-jest": "^24.1.0",
|
|
83
84
|
"ts-node": "^10.9.1",
|
|
84
85
|
"typescript": "^5.0.3",
|
|
85
|
-
"webpack": "^5.
|
|
86
|
-
"webpack-cli": "^5.1.
|
|
87
|
-
"webpack-dev-server": "^4.15.
|
|
86
|
+
"webpack": "^5.89.0",
|
|
87
|
+
"webpack-cli": "^5.1.4",
|
|
88
|
+
"webpack-dev-server": "^4.15.1"
|
|
88
89
|
},
|
|
89
90
|
"dependencies": {
|
|
90
91
|
"color": "^4.2.3",
|
|
@@ -92,6 +93,8 @@
|
|
|
92
93
|
"date-fns-tz": "^1.3.8",
|
|
93
94
|
"rxjs": "^7.5.7"
|
|
94
95
|
},
|
|
96
|
+
"main": "dist/index.js",
|
|
97
|
+
"types": "dist/index.d.ts",
|
|
95
98
|
"repository": {
|
|
96
99
|
"type": "git",
|
|
97
100
|
"url": "ssh://git@github.com:devexperts/dxcharts-lite.git"
|
|
@@ -99,5 +102,16 @@
|
|
|
99
102
|
"files": [
|
|
100
103
|
"dist/*"
|
|
101
104
|
],
|
|
105
|
+
"keywords": [
|
|
106
|
+
"javascript",
|
|
107
|
+
"finance",
|
|
108
|
+
"chart",
|
|
109
|
+
"charts",
|
|
110
|
+
"typescript",
|
|
111
|
+
"canvas",
|
|
112
|
+
"charting-library",
|
|
113
|
+
"charting",
|
|
114
|
+
"html5-charts"
|
|
115
|
+
],
|
|
102
116
|
"packageManager": "yarn@3.5.1"
|
|
103
117
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright (C) 2019 - 2023 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 EventBus from './events/event-bus';
|
|
7
|
-
import { FullChartConfig } from './chart.config';
|
|
8
|
-
import { CanvasInputListenerComponent } from './inputlisteners/canvas-input-listener.component';
|
|
9
|
-
import { CanvasBoundsContainer } from './canvas/canvas-bounds-container';
|
|
10
|
-
/**
|
|
11
|
-
* Abstraction over ChartBootstrap and PL chart.
|
|
12
|
-
*/
|
|
13
|
-
export default interface ChartContainer {
|
|
14
|
-
bus: EventBus;
|
|
15
|
-
config: FullChartConfig;
|
|
16
|
-
canvasInputListener: CanvasInputListenerComponent;
|
|
17
|
-
canvasBoundsContainer: CanvasBoundsContainer;
|
|
18
|
-
}
|