Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Commit 6cf0ce2

Browse files
authored
upd: updated smartcharts (#3277)
1 parent e2919c4 commit 6cf0ce2

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

gulp/bundle.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ gulp.task(
3131
gulp.task(
3232
'copy-js',
3333
gulp.parallel(done => {
34-
gulp.src(['./node_modules/smartcharts-beta/dist/*.smartcharts.*']).pipe(gulp.dest('www/js/'));
34+
gulp.src(['./node_modules/@deriv/deriv-charts/dist/*.smartcharts.*']).pipe(gulp.dest('www/js/'));
3535
done();
3636
})
3737
);
@@ -41,7 +41,7 @@ gulp.task(
4141
gulp.parallel(done => {
4242
gulp.src([
4343
'node_modules/jquery-ui-css/jquery-ui.min.css',
44-
'./node_modules/smartcharts-beta/dist/smartcharts.css',
44+
'./node_modules/@deriv/deriv-charts/dist/smartcharts.css',
4545
])
4646
.pipe(concatCss('bundle.css'))
4747
.pipe(rev())

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,6 @@
115115
"pako": "^1.0.11",
116116
"react-render-html": "^0.6.0",
117117
"react-transition-group": "^4.0.1",
118-
"smartcharts-beta": "^0.8.0-betam.11"
118+
"@deriv/deriv-charts": "0.3.16"
119119
}
120120
}

src/botPage/view/Dialogs/Chart.js

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import {
2-
SmartChart,
2+
ChartMode,
3+
DrawTools,
34
setSmartChartsPublicPath,
5+
Share,
6+
SmartChart,
47
StudyLegend,
8+
ToolbarWidget,
59
Views,
6-
DrawTools,
7-
Share,
8-
ChartMode,
9-
} from 'smartcharts-beta';
10+
} from '@deriv/deriv-charts';
1011
import React, { PureComponent } from 'react';
1112
import { translate } from '../../../common/i18n';
1213
import Dialog from './Dialog';
@@ -116,8 +117,8 @@ class ChartContent extends PureComponent {
116117

117118
renderTopWidgets = () => <span />;
118119

119-
renderControls = () => (
120-
<React.Fragment>
120+
renderToolbarWidgets = () => (
121+
<ToolbarWidget>
121122
<ChartMode
122123
onChartType={chartType => this.setState({ chartType })}
123124
onGranularity={granularity => this.setState({ granularity })}
@@ -126,7 +127,7 @@ class ChartContent extends PureComponent {
126127
<DrawTools />
127128
<Views searchInputClassName="data-hj-whitelist" />
128129
<Share />
129-
</React.Fragment>
130+
</ToolbarWidget>
130131
);
131132

132133
render() {
@@ -149,8 +150,9 @@ class ChartContent extends PureComponent {
149150
return (
150151
<SmartChart
151152
barriers={barriers}
152-
chartControlsWidgets={this.renderControls}
153+
chartControlsWidgets={null}
153154
chartType={this.state.chartType}
155+
enabledChartFooter={false}
154156
granularity={this.state.granularity}
155157
id={this.chartId}
156158
isMobile={false}
@@ -159,6 +161,7 @@ class ChartContent extends PureComponent {
159161
requestSubscribe={this.requestSubscribe.bind(this)}
160162
settings={this.settings}
161163
symbol={this.state.symbol}
164+
toolbarWidget={this.renderToolbarWidgets}
162165
topWidgets={this.renderTopWidgets}
163166
/>
164167
);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy