Skip to content

Commit fc3c6cc

Browse files
chore: update to charts dev branch
1 parent ea931e1 commit fc3c6cc

File tree

5 files changed

+76
-75
lines changed

5 files changed

+76
-75
lines changed

.github/workflows/generate_preview_link.yml

+66-66
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Generate preview link
22

33
on:
4-
pull_request_target:
5-
types: [opened, synchronize]
4+
pull_request_target:
5+
types: [opened, synchronize]
66

77
concurrency:
88
group: cloudflare-pages-build-${{ github.head_ref }}
@@ -12,116 +12,116 @@ jobs:
1212
build_and_deploy_preview_link:
1313
runs-on: Ubuntu-latest
1414
permissions:
15-
checks: write
16-
pull-requests: write
15+
checks: write
16+
pull-requests: write
1717
steps:
18-
- name: Verify user
19-
uses: "deriv-com/shared-actions/.github/actions/verify_user_in_organization@v1"
20-
with:
21-
username: ${{github.event.pull_request.user.login}}
22-
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
23-
24-
- name: Post preview build comment
25-
id: post_preview_build_comment
26-
uses: 'deriv-com/shared-actions/.github/actions/post_preview_build_comment@v1'
27-
with:
18+
- name: Verify user
19+
uses: 'deriv-com/shared-actions/.github/actions/verify_user_in_organization@v1'
20+
with:
21+
username: ${{github.event.pull_request.user.login}}
22+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
23+
24+
- name: Post preview build comment
25+
id: post_preview_build_comment
26+
uses: 'deriv-com/shared-actions/.github/actions/post_preview_build_comment@v1'
27+
with:
2828
issue_number: ${{github.event.number}}
2929
head_sha: ${{github.event.pull_request.head.sha}}
3030

31-
- name: Checkout SmartCharts
32-
uses: 'binary-com/SmartCharts/.github/actions/checkout@master'
33-
with:
31+
- name: Checkout SmartCharts
32+
uses: 'binary-com/SmartCharts/.github/actions/checkout@master'
33+
with:
3434
repository: ${{github.event.pull_request.user.login}}/SmartCharts
3535
path: SmartCharts
3636
ref: ${{github.head_ref}}
3737
alternate_repository: 'binary-com/SmartCharts'
3838
alternate_ref: master
3939

40-
- name: Checkout deriv-app
41-
id: deriv_app
42-
uses: 'binary-com/SmartCharts/.github/actions/checkout@master'
43-
with:
40+
- name: Checkout deriv-app
41+
id: deriv_app
42+
uses: 'binary-com/SmartCharts/.github/actions/checkout@master'
43+
with:
4444
repository: ${{github.event.pull_request.user.login}}/deriv-app
4545
path: deriv-app
4646
ref: ${{github.head_ref}}
4747
alternate_repository: 'binary-com/deriv-app'
4848
alternate_ref: master
4949

50-
- name: Custom flutter-chart
51-
id: flutter_chart
52-
uses: 'binary-com/SmartCharts/.github/actions/checkout@master'
53-
with:
50+
- name: Custom flutter-chart
51+
id: flutter_chart
52+
uses: 'binary-com/SmartCharts/.github/actions/checkout@master'
53+
with:
5454
repository: ${{github.event.pull_request.user.login}}/flutter-chart
5555
path: flutter-chart
5656
ref: ${{github.head_ref}}
5757
alternate_repository: 'regentmarkets/flutter-chart'
58-
alternate_ref: fe-changes
58+
alternate_ref: dev
5959
token: ${{ secrets.REPO_READ_TOKEN }}
6060

61-
- uses: subosito/flutter-action@62f096cacda5168a3bd7b95793373be14fa4fbaf
62-
with:
61+
- uses: subosito/flutter-action@62f096cacda5168a3bd7b95793373be14fa4fbaf
62+
with:
6363
flutter-version: '3.10.6'
6464
channel: 'stable'
6565
cache: true
6666

67-
- name: Add SSH key
68-
run: |
69-
mkdir -p ~/.ssh
70-
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/github_action_key
71-
chmod 600 ~/.ssh/github_action_key
67+
- name: Add SSH key
68+
run: |
69+
mkdir -p ~/.ssh
70+
echo "${{ secrets.SSH_KEY }}" > ~/.ssh/github_action_key
71+
chmod 600 ~/.ssh/github_action_key
7272
73-
- name: Build flutter
74-
env:
75-
GIT_SSH_COMMAND: 'ssh -i ~/.ssh/github_action_key'
76-
run: |
73+
- name: Build flutter
74+
env:
75+
GIT_SSH_COMMAND: 'ssh -i ~/.ssh/github_action_key'
76+
run: |
7777
cd SmartCharts/chart_app
7878
flutter pub get
7979
flutter build web --web-renderer html --release
8080
81-
- name: Setup Node
82-
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
83-
with:
81+
- name: Setup Node
82+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8
83+
with:
8484
node-version: 18.x
8585

86-
- name: Setup deriv-app
87-
run: cd deriv-app && npm i -g lerna@^5.5.1 && npm run bootstrap
86+
- name: Setup deriv-app
87+
run: cd deriv-app && npm i -g lerna@^5.5.1 && npm run bootstrap
8888

89-
- name: Remove @deriv-charts in deriv-app
90-
run: rm -rf deriv-app/node_modules/@deriv/deriv-charts/dist
89+
- name: Remove @deriv-charts in deriv-app
90+
run: rm -rf deriv-app/node_modules/@deriv/deriv-charts/dist
9191

92-
- name: Setup SmartCharts
93-
run: cd SmartCharts && npm install
92+
- name: Setup SmartCharts
93+
run: cd SmartCharts && npm install
9494

95-
- name: Build SmartCharts
96-
run: cd SmartCharts && npm run build -- --output-path ../deriv-app/node_modules/@deriv/deriv-charts/dist
95+
- name: Build SmartCharts
96+
run: cd SmartCharts && npm run build -- --output-path ../deriv-app/node_modules/@deriv/deriv-charts/dist
9797

98-
- name: Run Tests
99-
run: cd SmartCharts && npm run test
98+
- name: Run Tests
99+
run: cd SmartCharts && npm run test
100100

101-
- name: Build deriv-app
102-
env:
103-
NODE_ENV: 'production'
104-
run: cd deriv-app && npm run build:all
101+
- name: Build deriv-app
102+
env:
103+
NODE_ENV: 'production'
104+
run: cd deriv-app && npm run build:all
105105

106-
- name: Setup Node
107-
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a
108-
with:
109-
node-version: 20
106+
- name: Setup Node
107+
uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a
108+
with:
109+
node-version: 20
110110

111-
- name: Publish to CF pages branch
112-
id: publish_to_pages_branch
113-
uses: 'deriv-com/shared-actions/.github/actions/publish_to_pages_branch@v1'
114-
with:
111+
- name: Publish to CF pages branch
112+
id: publish_to_pages_branch
113+
uses: 'deriv-com/shared-actions/.github/actions/publish_to_pages_branch@v1'
114+
with:
115115
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_TEST_LINKS_API_TOKEN }}
116116
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_TEST_LINKS_ACCOUNT_ID }}
117117
project_name: 'smartcharts-preview'
118118
branch_name: pr-${{github.event.number}}${{ steps.deriv_app.outputs.ref_exists == 'true' && '-dtra' || ''}}${{ steps.flutter_chart.outputs.ref_exists == 'true' && '-flutt' || ''}}
119119
output_dir: deriv-app/packages/core/dist
120120

121-
- name: 'Generate preview link comment'
122-
if: always() && steps.post_preview_build_comment.outcome == 'success'
123-
uses: 'deriv-com/shared-actions/.github/actions/post_preview_link_comment@v1'
124-
with:
121+
- name: 'Generate preview link comment'
122+
if: always() && steps.post_preview_build_comment.outcome == 'success'
123+
uses: 'deriv-com/shared-actions/.github/actions/post_preview_link_comment@v1'
124+
with:
125125
issue_number: ${{github.event.number}}
126126
check_run_id: ${{steps.post_preview_build_comment.outputs.check_run_id}}
127127
preview_url: ${{steps.publish_to_pages_branch.outputs.cf_pages_url}}

.github/workflows/publish_deriv_charts_and_update_deriv_app.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
repository: 'regentmarkets/flutter-chart'
2323
path: flutter-chart
24-
ref: fe-changes
24+
ref: dev
2525
token: ${{ secrets.REPO_READ_TOKEN }}
2626

2727
- uses: subosito/flutter-action@62f096cacda5168a3bd7b95793373be14fa4fbaf

chart_app/lib/deriv_chart_wrapper.dart

+4-2
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,10 @@ class DerivChartWrapperState extends State<DerivChartWrapper> {
359359
isLive: configModel.isLive,
360360
onCrosshairDisappeared: JsInterop.onCrosshairDisappeared,
361361
onCrosshairHover: _onCrosshairHover,
362-
maxCurrentTickOffset:
363-
_getMaxCurrentTickOffset(rightPadding),
362+
chartAxisConfig: ChartAxisConfig(
363+
maxCurrentTickOffset:
364+
_getMaxCurrentTickOffset(rightPadding),
365+
),
364366
msPerPx: configModel.startWithDataFitMode
365367
? null
366368
: configModel.msPerPx,

chart_app/lib/src/painters/blink_tick_painter.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ class BlinkingTickPainter<T extends BlinkingTickIndicator>
2626
double? dotX;
2727

2828
if (series.previousObject == null) {
29-
animatedValue = series.value;
29+
animatedValue = series.quote;
3030
if (series.epoch != null) {
3131
dotX = epochToX(series.epoch!);
3232
}
3333
} else {
3434
final BarrierObject previousBarrier = series.previousObject!;
35-
animatedValue = series.value;
35+
animatedValue = series.quote;
3636

3737
animatedValue = ui.lerpDouble(
38-
previousBarrier.value,
39-
series.value,
38+
previousBarrier.quote,
39+
series.quote,
4040
animationInfo.currentTickPercent,
4141
);
4242

chart_app/lib/src/series/time_interval_painter.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TimeIntervalPainter<T extends TimeIntervalIndicator>
3232
..strokeWidth = 1
3333
..color = style.color;
3434

35-
double y = quoteToY(series.value as double);
35+
double y = quoteToY(series.quote as double);
3636

3737
final double labelHalfHeight = style.labelHeight / 2;
3838

@@ -50,7 +50,6 @@ class TimeIntervalPainter<T extends TimeIntervalIndicator>
5050
//set Y axis below the marker
5151
y = y + style.labelHeight;
5252

53-
5453
// creating labelArea rectangle
5554
final Rect labelArea = Rect.fromCenter(
5655
center: Offset(

0 commit comments

Comments
 (0)