binbot-charts 0.2.19 → 0.2.20
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.
|
@@ -35,7 +35,7 @@ function TVChartContainer(_ref) {
|
|
|
35
35
|
const containerRef = (0, _react.useRef)(null);
|
|
36
36
|
const [chartOrderLines, setChartOrderLines] = (0, _useImmer.useImmer)([]);
|
|
37
37
|
const [widgetState, setWidgetState] = (0, _react.useState)(null);
|
|
38
|
-
const [symbolState
|
|
38
|
+
const [symbolState] = (0, _react.useState)(null);
|
|
39
39
|
(0, _react.useEffect)(() => {
|
|
40
40
|
if (!widgetState) {
|
|
41
41
|
initializeChart();
|
|
@@ -89,6 +89,8 @@ function TVChartContainer(_ref) {
|
|
|
89
89
|
if (chartOrderLines && chartOrderLines.length > 0) {
|
|
90
90
|
chartOrderLines.forEach(item => {
|
|
91
91
|
orderLines.forEach(order => {
|
|
92
|
+
debugger;
|
|
93
|
+
|
|
92
94
|
if (item._data.bodyText == order.text) {
|
|
93
95
|
item.setText(order.text).setTooltip(order.tooltip).setQuantity(order.quantity).setPrice(order.price);
|
|
94
96
|
}
|
|
@@ -98,7 +100,9 @@ function TVChartContainer(_ref) {
|
|
|
98
100
|
if (orderLines && orderLines.length > 0) {
|
|
99
101
|
orderLines.forEach(order => {
|
|
100
102
|
const lineStyle = order.lineStyle || 0;
|
|
101
|
-
|
|
103
|
+
let chartOrderLine = widgetState.chart().createOrderLine().setText(order.text).setTooltip(order.tooltip).setQuantity(order.quantity).setQuantityFont("inherit 14px Arial").setQuantityBackgroundColor(order.color).setQuantityBorderColor(order.color).setLineStyle(lineStyle).setLineLength(25).setLineColor(order.color).setBodyFont("inherit 14px Arial").setBodyBorderColor(order.color).setBodyTextColor(order.color).setPrice(order.price); // set custom id easier search
|
|
104
|
+
|
|
105
|
+
chartOrderLine.id = order.id;
|
|
102
106
|
setChartOrderLines(draft => {
|
|
103
107
|
draft.push(chartOrderLine);
|
|
104
108
|
return draft;
|
package/package.json
CHANGED