Skip to content

Commit

Permalink
[DTRA]/ Merge flutter chart branch (#1472)
Browse files Browse the repository at this point in the history
* Bala/Flutter charts integration setup (#1325)

* chore: remove chartiq

* chore: add adapter store

* refactor timeperiod

* chore: add more calls in the adapter

* fix chartType

* savetoLocalstorage

* chore: remove unwanted fn

* update context

* chore: remove stx

* chore: update feed calls

* chore: remove unused core

* remove few props from timestore

* chore: remove unused code

* chore: remove chartiq related code

* chore: store changes

* chore: barriers integration #1

* remove barriers and integrate it with flutter

* fix: last digit

* feat: markers integration

* chore: fix fast markers

* feat: add crosshair integration

* chore: set crosshair cursor

* chore: fix crosshair hover

* chore: add ignore css

* Revert "remove barriers and integrate it with flutter"

This reverts commit b043b25.

* chore: barrier integration

* chore: fix digits markers placement

* fix: check chart load state

* fix: get interpolated tick

* chore: add dataFitEnabled flag

* chore: fix chart adapter granularity

* chore: update isLive & dateFitEnabled

* chore: add actions

* fix: duplicate tick

* add indicator config

* add guid

* feat: indicators integration

* chore: transform color codes

* fix: download as png and csv

* refactor: use html2canvas from npm

* fix: indicator configs

* refactor: chart adapter store

* refactor: chart interops

* chore: update chart props and fix studies

* refactor: remove current spot

* chore: remove stx

* chore: add flutter chart app

* remove: chartiq scripts

* chore: add chart_app to git

* chore: integrate more chart types

* chore: fix chart type and theme on int

* chore: add indicator bars

* add ma and fieldtype short code

* feat: add indicator options

* chore: update crosshair visibility

* chore: cleanup crosshair and fix issues

* chore: fix warnings

* refactor

* chore: remove chartiq injections

* chore: trackpad zoom

* chore: fix time store

* chore: add documentation

* refactor: currentClsoe

* refactor: stores

* refactor: remove ciq refs

* chore: update webpack and assets

* chore: format sass files

* chore: remove inline source map

* fix: more bugs

* chore: add copy pattern

* fix: contract replay request and remove comparison data

* chore: follow mode check

* fix: empty granularity set

* fix: review comments

* fix: bottom widgets height

* update name id to flutter_chart_id

* refactor: change name to flutter_chart_id

* chore: remove console

* add shortname

* refactor: move web related painters

* refactor: move marker icon painters

* refactor: move marker painting to smartcharts

* refactor: add web marker

* delete studies by index

* chore: add custom color for marker

* chore: update marker paintings

* feat: accumulators painter

* chore: update color from string

* restore layout after the chart is loaded

* fix: restore chart

* chore: add marker type

* add hasPersistentBorders config

* move isChartLoaded

* add maxCurrentTickOffset

* fix: late initialization error

* fix dart issues

* fix: unsubscribe issue

* gator series

* add macd config

* chore: add indicator options

* refactor: getDrawTools to func

* refactor: indicator configs

* fix: chartType change to undefined

* fix: granularity issue

* new layout id

* chore: remove CIQ

* chore: remove unused script

* refactor: adjust timer

* move epoch conversion

* chore: add title

* feat: add expand/collapse and move icons

* fix: indicator removal and title

* refactor: cleanup

* refactor: add_ons_repository

* fix: crosshair on restore

* chore: fix drawing tools icon in the main screen

* feat: add scale and scroll

* chore: prevent zooming on barriers

* chore: customize msPerPx and leftMargin

* chore: fix clear all indicators

* chore: add clear all indicators function

* chore: add rainbow colors

* refactor: indicators and add tooltip

* fix: tooltip bugs

* refoctor: fix typo and add gator tooltip

* chore: add macd tooltips and refactor

* chore: add smi tooltip values

* chore: add indicators

* fix: index out of bound exception

* chore: switch theme for indicators

* fix: tslint issue

* fix: channel fix and donchian

* chore: add pipsize

* fix: indicator bugs

* chore: change to upper case

* fix: feed issue for 2 second intervals

* fix: crosshair decimal places

* fix: new tick barrier

* chore: fix dark theme container

* fix: high/low barrier width

* fix: feed issue

* chore: fix draggable barrier

* chore: fix barrier issues and symbol close

* refactor: helpers

* fix: price line width

* fix: price line width

* fix: chart live status update on contract close

* chore: fix chart close issue

* chore: remove lodash dependency

* chore: add showLastIndicator config

* chore: add decimal places for indicator tooltip content

* fix: adx indicator config

* refactor: initial chart data loaded

* chore: set initial chart data

* chore: add mount prop

* chore: add yAxisWidth to api

* refactor: chart_app

* refactor: chart app

* chore: pass isMobile to drawings

* fix: indicator index and accumulator drawing

* chore: fix streams

* fix: feed issue

* refactor: controller functions

* refactor: scale

* fix: prevent datafit contract from being scrolled

* chore: add chart margin

* fix: tick contract issue

* fix: vertical padding fraction

* fix: granularity issues

* fix: offset issue

* chore: reset msPerPx on granularity change

* fix: chart type change reaction

* fix: chart type issue

* fix: contract close reload issue

* chore: paint on each line series paint

* fix: late init

* fix: template restore

* chore: ignore chart_app bundle

* fix: min interval width

* chore: fix tick animation in data fit mode

* chore: fix data fit mode in 2s ticks

* fix: accumulator height offset

* fix: alternative source

* refactor: controller getter

* fix: field options

* chore: check granularity for chart style

* refactor: accumulator contract painting

* chore: add fast marker limit

* chore: add fast marker limit #2

* chore: add wrapper controller

* chore: add PainterProps

* chore: add opacity and zoom

* fix: font size

* fix: types

* fix: lint errors

* fix: eslint errors

* chore: refactor chart controller

* fix: catch all errors

* chore: add binary search

* fix: crosshair position

* chore: add max interval width for candles style

* chore: add webpack ignore

* chore: simplify network reconnect

* chore: add loading animation color

* chore: fix mobile scaling

* chore: remove touch listeners

* chore: add scroll to recent component

* chore: add crosshair getter functions

* chore: indicator index

* chore: clamp deltaY values to fix scaling on wheel

* chore: add rainbow line styles

---------

Co-authored-by: balakrishna-binary <[email protected]>

* Feature adding hover on indicator (#1434)

* chore: remove chartiq

* chore: add adapter store

* refactor timeperiod

* chore: add more calls in the adapter

* fix chartType

* savetoLocalstorage

* chore: remove unwanted fn

* update context

* chore: remove stx

* chore: update feed calls

* chore: remove unused core

* remove few props from timestore

* chore: remove unused code

* chore: remove chartiq related code

* chore: store changes

* chore: barriers integration #1

* remove barriers and integrate it with flutter

* fix: last digit

* feat: markers integration

* chore: fix fast markers

* feat: add crosshair integration

* chore: set crosshair cursor

* chore: fix crosshair hover

* chore: add ignore css

* Revert "remove barriers and integrate it with flutter"

This reverts commit b043b25.

* chore: barrier integration

* chore: fix digits markers placement

* fix: check chart load state

* fix: get interpolated tick

* chore: add dataFitEnabled flag

* chore: fix chart adapter granularity

* chore: update isLive & dateFitEnabled

* chore: add actions

* fix: duplicate tick

* add indicator config

* add guid

* feat: indicators integration

* chore: transform color codes

* fix: download as png and csv

* refactor: use html2canvas from npm

* fix: indicator configs

* refactor: chart adapter store

* refactor: chart interops

* chore: update chart props and fix studies

* refactor: remove current spot

* chore: remove stx

* chore: add flutter chart app

* remove: chartiq scripts

* chore: add chart_app to git

* chore: integrate more chart types

* chore: fix chart type and theme on int

* chore: add indicator bars

* add ma and fieldtype short code

* feat: add indicator options

* chore: update crosshair visibility

* chore: cleanup crosshair and fix issues

* chore: fix warnings

* refactor

* chore: remove chartiq injections

* chore: trackpad zoom

* chore: fix time store

* chore: add documentation

* refactor: currentClsoe

* refactor: stores

* refactor: remove ciq refs

* chore: update webpack and assets

* chore: format sass files

* chore: remove inline source map

* fix: more bugs

* chore: add copy pattern

* fix: contract replay request and remove comparison data

* chore: follow mode check

* fix: empty granularity set

* fix: review comments

* fix: bottom widgets height

* update name id to flutter_chart_id

* refactor: change name to flutter_chart_id

* chore: remove console

* add shortname

* refactor: move web related painters

* refactor: move marker icon painters

* refactor: move marker painting to smartcharts

* refactor: add web marker

* delete studies by index

* chore: add custom color for marker

* chore: update marker paintings

* feat: accumulators painter

* chore: update color from string

* restore layout after the chart is loaded

* fix: restore chart

* chore: add marker type

* add hasPersistentBorders config

* move isChartLoaded

* add maxCurrentTickOffset

* fix: late initialization error

* fix dart issues

* fix: unsubscribe issue

* gator series

* add macd config

* chore: add indicator options

* refactor: getDrawTools to func

* refactor: indicator configs

* fix: chartType change to undefined

* fix: granularity issue

* new layout id

* chore: remove CIQ

* chore: remove unused script

* refactor: adjust timer

* move epoch conversion

* chore: add title

* feat: add expand/collapse and move icons

* fix: indicator removal and title

* refactor: cleanup

* refactor: add_ons_repository

* fix: crosshair on restore

* chore: fix drawing tools icon in the main screen

* feat: add scale and scroll

* chore: prevent zooming on barriers

* chore: customize msPerPx and leftMargin

* chore: fix clear all indicators

* chore: add clear all indicators function

* chore: add rainbow colors

* refactor: indicators and add tooltip

* fix: tooltip bugs

* refoctor: fix typo and add gator tooltip

* chore: add macd tooltips and refactor

* chore: add smi tooltip values

* chore: add indicators

* fix: index out of bound exception

* chore: switch theme for indicators

* fix: tslint issue

* fix: channel fix and donchian

* chore: add pipsize

* fix: indicator bugs

* chore: change to upper case

* fix: feed issue for 2 second intervals

* fix: crosshair decimal places

* fix: new tick barrier

* chore: fix dark theme container

* fix: high/low barrier width

* fix: feed issue

* chore: fix draggable barrier

* chore: fix barrier issues and symbol close

* refactor: helpers

* fix: price line width

* fix: price line width

* fix: chart live status update on contract close

* chore: fix chart close issue

* chore: remove lodash dependency

* chore: add showLastIndicator config

* chore: add decimal places for indicator tooltip content

* fix: adx indicator config

* refactor: initial chart data loaded

* chore: set initial chart data

* chore: add mount prop

* chore: add yAxisWidth to api

* refactor: chart_app

* refactor: chart app

* chore: pass isMobile to drawings

* fix: indicator index and accumulator drawing

* chore: fix streams

* fix: feed issue

* refactor: controller functions

* refactor: scale

* fix: prevent datafit contract from being scrolled

* chore: add chart margin

* fix: tick contract issue

* fix: vertical padding fraction

* fix: granularity issues

* fix: offset issue

* chore: reset msPerPx on granularity change

* fix: chart type change reaction

* fix: chart type issue

* fix: contract close reload issue

* chore: paint on each line series paint

* fix: late init

* fix: template restore

* chore: ignore chart_app bundle

* fix: min interval width

* chore: fix tick animation in data fit mode

* chore: fix data fit mode in 2s ticks

* fix: accumulator height offset

* fix: alternative source

* refactor: controller getter

* fix: field options

* chore: check granularity for chart style

* refactor: accumulator contract painting

* chore: add fast marker limit

* chore: add fast marker limit #2

* chore: add wrapper controller

* chore: add PainterProps

* chore: add opacity and zoom

* fix: font size

* fix: types

* fix: lint errors

* fix: eslint errors

* chore: refactor chart controller

* fix: catch all errors

* chore: add binary search

* fix: crosshair position

* chore: add max interval width for candles style

* chore: add webpack ignore

* chore: simplify network reconnect

* Overlay Series hover

* chore: add loading animation color

* chore: fix mobile scaling

* chore: remove touch listeners

* chore: add scroll to recent component

* chore: add crosshair getter functions

* chore: indicator index

* chore: clamp deltaY values to fix scaling on wheel

* Indicator hover for bottom

* opening config on click

* hover working

* small fix

* all indicators except double ones

* returning bottom indicator index

* chore: fix multiple indicator hover issue

* tooltip on indicators

* fix: inconsistent indicator hover issue

* debounce and ichimoku fix

* fixes on the ichimoku

* type change

* merge conflicts sort

* merge fix

* review fix

* Create CNAME

* Delete CNAME

* Throttling approach

* throttle to 10

* scaling fix

---------

Co-authored-by: balakrishna-binary <[email protected]>
Co-authored-by: balakrishna-binary <[email protected]>

* Add turbos contract type drawings (#1435)

* feat: add ibm font and turbos drawings

* Update src/components/Form.tsx

Co-authored-by: Bahar <[email protected]>

---------

Co-authored-by: Bahar <[email protected]>

* Feat drawing tool integration (#1443)

* remove: chartiq scripts

* chore: add chart_app to git

* chore: integrate more chart types

* chore: fix chart type and theme on int

* chore: add indicator bars

* add ma and fieldtype short code

* feat: add indicator options

* chore: update crosshair visibility

* chore: cleanup crosshair and fix issues

* chore: fix warnings

* refactor

* chore: remove chartiq injections

* chore: trackpad zoom

* chore: fix time store

* chore: add documentation

* refactor: currentClsoe

* refactor: stores

* refactor: remove ciq refs

* chore: update webpack and assets

* chore: format sass files

* chore: remove inline source map

* fix: more bugs

* chore: add copy pattern

* fix: contract replay request and remove comparison data

* chore: follow mode check

* fix: empty granularity set

* fix: review comments

* fix: bottom widgets height

* update name id to flutter_chart_id

* refactor: change name to flutter_chart_id

* chore: remove console

* add shortname

* refactor: move web related painters

* refactor: move marker icon painters

* refactor: move marker painting to smartcharts

* refactor: add web marker

* delete studies by index

* chore: add custom color for marker

* chore: update marker paintings

* feat: accumulators painter

* chore: update color from string

* restore layout after the chart is loaded

* fix: restore chart

* chore: add marker type

* add hasPersistentBorders config

* move isChartLoaded

* add maxCurrentTickOffset

* fix: late initialization error

* fix dart issues

* fix: unsubscribe issue

* gator series

* add macd config

* chore: add indicator options

* refactor: getDrawTools to func

* refactor: indicator configs

* fix: chartType change to undefined

* fix: granularity issue

* new layout id

* chore: remove CIQ

* chore: remove unused script

* refactor: adjust timer

* move epoch conversion

* chore: add title

* feat: add expand/collapse and move icons

* fix: indicator removal and title

* refactor: cleanup

* refactor: add_ons_repository

* fix: crosshair on restore

* chore: fix drawing tools icon in the main screen

* feat: add scale and scroll

* chore: prevent zooming on barriers

* chore: customize msPerPx and leftMargin

* chore: fix clear all indicators

* chore: add clear all indicators function

* chore: add rainbow colors

* refactor: indicators and add tooltip

* fix: tooltip bugs

* refoctor: fix typo and add gator tooltip

* chore: add macd tooltips and refactor

* chore: add smi tooltip values

* chore: add indicators

* fix: index out of bound exception

* chore: switch theme for indicators

* fix: tslint issue

* fix: channel fix and donchian

* chore: add pipsize

* fix: indicator bugs

* chore: change to upper case

* fix: feed issue for 2 second intervals

* fix: crosshair decimal places

* fix: new tick barrier

* chore: fix dark theme container

* fix: high/low barrier width

* fix: feed issue

* chore: fix draggable barrier

* chore: fix barrier issues and symbol close

* refactor: helpers

* fix: price line width

* fix: price line width

* fix: chart live status update on contract close

* chore: fix chart close issue

* chore: remove lodash dependency

* chore: add showLastIndicator config

* chore: add decimal places for indicator tooltip content

* fix: adx indicator config

* refactor: initial chart data loaded

* chore: set initial chart data

* chore: add mount prop

* chore: add yAxisWidth to api

* refactor: chart_app

* refactor: chart app

* chore: pass isMobile to drawings

* fix: indicator index and accumulator drawing

* chore: fix streams

* fix: feed issue

* refactor: controller functions

* refactor: scale

* fix: prevent datafit contract from being scrolled

* chore: add chart margin

* fix: tick contract issue

* fix: vertical padding fraction

* fix: granularity issues

* fix: offset issue

* chore: reset msPerPx on granularity change

* fix: chart type change reaction

* fix: chart type issue

* fix: contract close reload issue

* chore: paint on each line series paint

* fix: late init

* fix: template restore

* chore: ignore chart_app bundle

* fix: min interval width

* chore: fix tick animation in data fit mode

* chore: fix data fit mode in 2s ticks

* fix: accumulator height offset

* fix: alternative source

* refactor: controller getter

* fix: field options

* chore: check granularity for chart style

* refactor: accumulator contract painting

* chore: add fast marker limit

* chore: add fast marker limit #2

* chore: add wrapper controller

* chore: add PainterProps

* chore: add opacity and zoom

* fix: font size

* fix: types

* fix: lint errors

* fix: eslint errors

* chore: refactor chart controller

* fix: catch all errors

* chore: add binary search

* fix: crosshair position

* chore: add max interval width for candles style

* chore: add webpack ignore

* chore: simplify network reconnect

* Overlay Series hover

* chore: add loading animation color

* chore: fix mobile scaling

* chore: remove touch listeners

* chore: add scroll to recent component

* chore: add crosshair getter functions

* chore: indicator index

* chore: clamp deltaY values to fix scaling on wheel

* Indicator hover for bottom

* opening config on click

* hover working

* small fix

* all indicators except double ones

* returning bottom indicator index

* chore: fix multiple indicator hover issue

* tooltip on indicators

* fix: inconsistent indicator hover issue

* debounce and ichimoku fix

* fixes on the ichimoku

* type change

* drawingtool Model

* add drawing

* working drawing tool

* Revert "working drawing tool"

This reverts commit f72fc08.

* Drawing tool integrated with drag issue

* current changes

* updated changes

* restore drawing fix

* refactor: simplify drawing tool creation

* restore drawing working except channel,trend

* fix: drawing tools hover

* Restore Drawing Completed with Trend Updation issue

* fix: drawing tool hover

* fix: open indicator/drawing settings

* restore drawing completed

* small fix

* change color on theme change fix

* fix: drawing tool text

* chore: remove tooltip on doubleclick

* restore drawing by sharedPrefs

* optimize onUpdate and onDeleted Function

* fixing type error

* Kate / DTRA-383 / Improvement/ On the Chart "price info box", date is displayed in mm/dd format (#1446)

* refactor: change time format in crosshair store

* feat: add check for chart type

* chore: remove extra comma

* refactor: apply suggestions

* refactor: revert changes with moment library

* chore: add turkish language into smart charts (#1449)

Co-authored-by: Maryia <[email protected]>

* Maryia/dtra-369/Send chart events using stateChangeListener for analytics collection (#1439)

* feat: add action for choosing chart type

* feat: add state change events for chart type and interval

* feat: add open & close events for chart mode modal

* refactor: CHART_TYPE_CHANGE event

* chore: add event for opening and closing markets list

* feat: added symbol_change state change event

* chore: add more events

* chore: add more events

* chore: add more events

* feat: added event for adding indicator

* fix: symbol change & info redirect events

* refactor: getSymbolMarketCategory

* feat: added final events for indicators

* refactor: united info
open & close into INDICATOR_INFO_TOGGLE

* feat: add event for clear all button

* fix: delete event for indicators

* test: getSymbolMarketCategory & getTimeIntervalName

* refactor: linting

* fix: against empty initial chart type value

* fix: indicator events

* fix: send id instead of name since english version is needed for any language

* fix: set symbol instea
d of name to remain in english for any languages

* refactor: rename variables

* refactor: remove unnecessary empty object param

* Maryia/DTRA-388/fix: incorrect maxTicks value for dataset length < 7 ticks (#1448)

* fix: chart scroll for 1 tick

* fix: chart centering for big dataset length as well as for small one

* refactor: make logic explicitly dependent on dataset

* refactor: add constant

* Amir/feq 217/upgrade to react 17 (#1416)

* chore: remove unused packages

* build: migrate webpack version to 5

* build: upgrade node version from 12 to 18

* chore: remove unused packages

* build: update svgo-loader and svg-sprite-loader

* docs: update README.md

* docs: update README.md

* build: update node version in the yml file

* chore: update node version in circleci

* fix: circle ci node img

* chore: upgrade react to version 17

* chore: package lock file

* chore: update package version to 1.4.0

* chore: update package lock

---------

Co-authored-by: Maryia <[email protected]>

* refactor: load drawing tools

* feat: restore drawing specific to a symbol

* unselecting continuous tool on escape

* indicator tooltip fix

* chore: add onLoad to action

* fix: continuous color change

* chore: remove unused code

* removing unused function

* fix: crosshair hover

* chore: add eslint ignore

* fix: tooltip update position

* adding label field in vertical/horizontal drawing

* removing addOns

* chore: delete drawings using id

* clean up and review fixes

* removing tooltip when drawing is write beneath the setting dialog

* removing commented code

* working drawing on release version

* onload tooltip fix

* Indicator Search fix

* fix: prediction indicator dialog

* annotation label setup with painter (no timer)

* spacing fix

* fixing time for tick

* replacing barrier with horizontal barrier

* review comments and darkmode fix

---------

Co-authored-by: balakrishna-binary <[email protected]>
Co-authored-by: kate-deriv <[email protected]>
Co-authored-by: Sui Sin <[email protected]>
Co-authored-by: Maryia <[email protected]>
Co-authored-by: Amir Ali <[email protected]>

* Bala/Html renderer and performance improvement (#1452)

* chore: repaitn current tick on data fit enabled

* chore: customize animation timings

* fix: closest epoch error

* chore: prevent quote and epoch from being null

* chore: add webpackpreload

* chore: update chart version

* fix: scroll to last tick

* chore: fix fast marker

* fix: overlap issue in contract replay

* chore: update version

* feat: add accumulator barriers for closed contracts

* fix

* removing old changes

* chore: add formatting

* chore: fix style not updated issue

* chore: update package

* fix: indicator style not applied issue

* fix: stuttered scroll

* chore: update package

---------

Co-authored-by: ahmadtaimoor-deriv <[email protected]>

* fix indicator deletion on interval (#1454)

* flutter charts bug fixes (#1455)

* chore: fix routing issue

* chore: add debounce to indicator hover

* template incorrect indicator fix

* crosshair x and y pos fix

* fix: crosshair hover check

* fix: crosshair issues

* chore: package update

* fix: crosshair move on bottom indicators

* fix: navigation issue

* fix: clear layout when switching to dbot chart

* chore: update package

* fix: zero digit issue in digit contracts

* chore: safe parse json and remove gator indicator

* chore: remove gator #2

* refactor: rename variable

* chore: update package

* fix: indicator hovers

* chore: update package

* chore: fix undefined symbol

* fix: clean chart before init

* fix: iphone se issue with yaxis padding

---------

Co-authored-by: ahmadtaimoor-deriv <[email protected]>

* Ahmad/FEQ-948/Update Candle Color (#1460)

* fixing candle color

* changing color to exact hex

* remove comment and add isLive

* adding opacity

* [DTRA]Ahmad/FEQ-960/Strike Price movement with marker barrier and Price Info (#1461)

* Akmal / feat: remove relative indicator if it's blocking current price (#1387)

* feat: remove relative indicator if it's blocking current price

* chore: refactor code

* feat: parse the decimal

* feat: new UI for strike overlap

* feat: interim solution

* feature: updated UI and overlap behaviour for strike and barrier

* fix stylint issues

* fix: stylelint formatting

* fix broken styles in vercel development bundle

* feat: remove overlay from barrier

* fix: overlay style

* feat: trigger vercel

* chore: remove unused styles

* chore: apply review suggestion

* fix: add missing comma

* fix: inherit colors from deriv app for turbos

* feat: move div to a separate component

* chore: update version (#1458)

* chore: add portuguese language into SmartCharts (#1457)

* chore: update version 1.4.2 (#1459)

* setting price info crosshair on mobile

* fix: moving spot price barrier with marker

* fix: strike barrier moving with marker

* chore: update version

---------

Co-authored-by: Akmal Djumakhodjaev <[email protected]>
Co-authored-by: balakrishna-deriv <[email protected]>
Co-authored-by: Sui Sin <[email protected]>
Co-authored-by: balakrishna-binary <[email protected]>

* chore: add portuguese language into SmartCharts (#1457)

* chore: update package version

* Akmal / feat: implement new blue barrier in flutter charts (#1462)

* feat: implement new blue barrier in flutter charts

* feat: new barrier alignment on mobile

* chore: apply suggestions

* fix: merge with latest

* fix: failed merge cleanup

* [Dtra] Fix perf (#1466)

* fix: ttile issue

* chore: remove tick animation and fine tune animation duration

* refactor: move deriv-chart code

* refactor: remove minElapsedTimeToFollow

* chore: remove overrides

* chore: add lower animation check

* chore: add blink animation

* fix: scroll to latest epoch

* fix: repaint annotations

* chore: optimize animation

* chore: set max interval for tick contracts in contract replay

* chore: add condition for tick contracts

* fix: overlap fix

* fix: overlap

* chore: update right padding

* fix: padding issues in contract replay

* fix: background opacity

* chore: convert range

* Update chart_app/lib/src/series/blink_tick_indicator.dart

* fix: markers opacity when the contract is open

* chore: update animation interval for non graphic friendly os

* chore: update version

---------

Co-authored-by: ahmadtaimoor-deriv <[email protected]>

* [DTRA] Fix trackjs issue (#1468)

* fix: trackjs issue

* chore: add assetbase

* chore: update ts comment

* chore: update npm version

* [DTRA] Bala/Fix scaling issue (#1469)

* fix: scaling issue

* Update chart_app/lib/src/chart_app.dart

* chore: update version 2.0.0 (#1471)

---------

Co-authored-by: balakrishna-binary <[email protected]>
Co-authored-by: ahmadtaimoor-deriv <[email protected]>
Co-authored-by: Bahar <[email protected]>
Co-authored-by: kate-deriv <[email protected]>
Co-authored-by: Sui Sin <[email protected]>
Co-authored-by: Maryia <[email protected]>
Co-authored-by: Amir Ali <[email protected]>
Co-authored-by: Akmal Djumakhodjaev <[email protected]>
  • Loading branch information
9 people authored Dec 29, 2023
1 parent 37c29b8 commit e9ed6a6
Show file tree
Hide file tree
Showing 172 changed files with 11,020 additions and 89,901 deletions.
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dist
chartiq
node_modules
design
/**/*.d.ts
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"allowChildren": false
}
],
"react/require-default-props": "off",
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-var-requires": "off"
}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,5 @@ jsconfig.json
CNAME
.nyc_output
**/*.swp

chart_app/build/**
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.eslintrc
.tern-project
.travis.yml
chartiq/
chart_app/
crowdin.yml
css/
design-v1.js
Expand Down
225 changes: 139 additions & 86 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,88 +1,141 @@
{
"plugins": [
"stylelint-no-unsupported-browser-features"
],
"rules": {
"at-rule-name-case" : "lower",
"at-rule-name-space-after" : "always",
"at-rule-semicolon-newline-after" : "always",
"block-closing-brace-newline-after" : "always",
"block-closing-brace-newline-before" : "always",
"block-no-empty" : true,
"block-opening-brace-newline-after" : "always",
"block-opening-brace-space-before" : "always",
"color-hex-case" : "lower",
"color-named" : "never",
"color-no-invalid-hex" : true,
"declaration-bang-space-after" : "never",
"declaration-bang-space-before" : "always",
"declaration-block-no-duplicate-properties" : [true, { "ignore": ["consecutive-duplicates"] }],
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after" : "always",
"declaration-block-semicolon-newline-before" : "never-multi-line",
"declaration-block-semicolon-space-after" : "always-single-line",
"declaration-block-semicolon-space-before" : "never",
"declaration-block-trailing-semicolon" : "always",
"declaration-colon-space-after" : "always",
"declaration-colon-space-before" : "never",
"font-family-name-quotes" : "always-unless-keyword",
"function-calc-no-unspaced-operator" : true,
"function-comma-space-after" : "always",
"function-comma-space-before" : "never",
"function-name-case" : "lower",
"function-parentheses-space-inside" : "never",
"function-url-quotes" : "always",
"indentation" : 4,
"max-empty-lines" : 1,
"media-feature-colon-space-after" : "always",
"media-feature-colon-space-before" : "never",
"media-feature-range-operator-space-after" : "always",
"media-feature-range-operator-space-before" : "always",
"media-query-list-comma-newline-after" : "never-multi-line",
"media-query-list-comma-newline-before" : "never-multi-line",
"media-query-list-comma-space-after" : "always",
"media-query-list-comma-space-before" : "never",
"no-duplicate-selectors" : true,
"no-eol-whitespace" : true,
"no-extra-semicolons" : true,
"no-invalid-double-slash-comments" : true,
"number-leading-zero" : "always",
"number-max-precision" : 2,
"number-no-trailing-zeros" : true,
"property-case" : "lower",
"plugin/no-unsupported-browser-features" : [true, {
"severity": "error",
"ignore": ["calc", "user-select-none", "multicolumn", "css-appearance", "intrinsic-width"]
}],
"rule-empty-line-before" : ["always", { "ignore": ["after-comment"], "except": ["inside-block-and-after-rule", "first-nested"] }],
"selector-attribute-brackets-space-inside" : "never",
"selector-attribute-operator-space-after" : "never",
"selector-attribute-operator-space-before" : "never",
"selector-combinator-space-after" : "always",
"selector-combinator-space-before" : "always",
"selector-list-comma-newline-before" : "never-multi-line",
"selector-list-comma-space-before" : "never",
"selector-max-empty-lines" : 0,
"selector-pseudo-class-case" : "lower",
"selector-pseudo-class-no-unknown" : [true, {
"ignorePseudoClasses": ["export"]
}],
"selector-pseudo-class-parentheses-space-inside" : "never",
"selector-pseudo-element-case" : "lower",
"selector-pseudo-element-colon-notation" : "single",
"selector-pseudo-element-no-unknown" : true,
"selector-type-case" : "lower",
"selector-type-no-unknown" : [true, { "ignoreTypes": ["from", "to", "0%", "50%", "100%", "_"] }],
"shorthand-property-no-redundant-values" : true,
"string-no-newline" : true,
"string-quotes" : "single",
"time-min-milliseconds" : 100,
"unit-case" : "lower",
"unit-whitelist" : ["fr", "px", "em", "rem", "%", "vw", "vh", "deg", "ms", "s"],
"value-keyword-case" : "lower",
"value-list-comma-newline-after" : "never-multi-line",
"value-list-comma-newline-before" : "never-multi-line",
"value-list-comma-space-after" : "always",
"value-list-comma-space-before" : "never"
}
"plugins": [
"stylelint-no-unsupported-browser-features"
],
"rules": {
"at-rule-name-case": "lower",
"at-rule-name-space-after": "always",
"at-rule-semicolon-newline-after": "always",
"block-closing-brace-newline-after": "always",
"block-closing-brace-newline-before": "always",
"block-no-empty": true,
"block-opening-brace-newline-after": "always",
"block-opening-brace-space-before": "always",
"color-hex-case": "lower",
"color-named": "never",
"color-no-invalid-hex": true,
"declaration-bang-space-after": "never",
"declaration-bang-space-before": "always",
"declaration-block-no-duplicate-properties": [
true,
{
"ignore": [
"consecutive-duplicates"
]
}
],
"declaration-block-no-shorthand-property-overrides": true,
"declaration-block-semicolon-newline-after": "always",
"declaration-block-semicolon-newline-before": "never-multi-line",
"declaration-block-semicolon-space-after": "always-single-line",
"declaration-block-semicolon-space-before": "never",
"declaration-block-trailing-semicolon": "always",
"declaration-colon-space-after": "always",
"declaration-colon-space-before": "never",
"font-family-name-quotes": "always-unless-keyword",
"function-calc-no-unspaced-operator": true,
"function-comma-space-before": "never",
"function-name-case": "lower",
"function-url-quotes": "always",
"indentation": 4,
"max-empty-lines": 1,
"media-feature-colon-space-after": "always",
"media-feature-colon-space-before": "never",
"media-feature-range-operator-space-after": "always",
"media-feature-range-operator-space-before": "always",
"media-query-list-comma-newline-after": "never-multi-line",
"media-query-list-comma-newline-before": "never-multi-line",
"media-query-list-comma-space-after": "always",
"media-query-list-comma-space-before": "never",
"no-duplicate-selectors": true,
"no-eol-whitespace": true,
"no-extra-semicolons": true,
"no-invalid-double-slash-comments": true,
"number-leading-zero": "always",
"number-max-precision": 2,
"number-no-trailing-zeros": true,
"property-case": "lower",
"plugin/no-unsupported-browser-features": [
true,
{
"severity": "error",
"ignore": [
"calc",
"user-select-none",
"multicolumn",
"css-appearance",
"intrinsic-width"
]
}
],
"rule-empty-line-before": [
"always",
{
"ignore": [
"after-comment"
],
"except": [
"inside-block-and-after-rule",
"first-nested"
]
}
],
"selector-attribute-brackets-space-inside": "never",
"selector-attribute-operator-space-after": "never",
"selector-attribute-operator-space-before": "never",
"selector-combinator-space-after": "always",
"selector-combinator-space-before": "always",
"selector-list-comma-newline-before": "never-multi-line",
"selector-list-comma-space-before": "never",
"selector-max-empty-lines": 0,
"selector-pseudo-class-case": "lower",
"selector-pseudo-class-no-unknown": [
true,
{
"ignorePseudoClasses": [
"export"
]
}
],
"selector-pseudo-class-parentheses-space-inside": "never",
"selector-pseudo-element-case": "lower",
"selector-pseudo-element-colon-notation": "single",
"selector-pseudo-element-no-unknown": true,
"selector-type-case": "lower",
"selector-type-no-unknown": [
true,
{
"ignoreTypes": [
"from",
"to",
"0%",
"50%",
"100%",
"_"
]
}
],
"shorthand-property-no-redundant-values": true,
"string-no-newline": true,
"string-quotes": "single",
"time-min-milliseconds": 100,
"unit-case": "lower",
"unit-whitelist": [
"fr",
"px",
"em",
"rem",
"%",
"vw",
"vh",
"deg",
"ms",
"s"
],
"value-keyword-case": "lower",
"value-list-comma-newline-after": "never-multi-line",
"value-list-comma-newline-before": "never-multi-line",
"value-list-comma-space-after": "always",
"value-list-comma-space-before": "never"
}
}
34 changes: 17 additions & 17 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<!doctype html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="referrer" content="origin" />
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1" />
<meta
name="description"
content="Analyse the financial markets using beautiful visualisations and unique trading tools, powered by a fast and intuitive interface."
/>
<link rel="stylesheet" type="text/css" href="./dist/smartcharts.css" media="screen" />
<link rel="stylesheet" type="text/css" href="./dist/styles.css" media="screen" />
<title>Library Test</title>
</head>

<head>
<meta charset="utf-8" />
<meta name="referrer" content="origin">
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1" />
<meta name="description" content="Analyse the financial markets using beautiful visualisations and unique trading tools, powered by a fast and intuitive interface." />
<link rel="stylesheet" type="text/css" href="./dist/smartcharts.css" media="screen" />
<link rel="stylesheet" type="text/css" href="./dist/styles.css" media="screen" />
<title>Library Test</title>
</head>

<body>
<div id="root"></div>
<script src="./dist/chartiq.min.js"></script>
<script src="./dist/app.js"></script>
</body>

<body>
<div id="root"></div>
<script src="./dist/app.js"></script>
</body>
</html>
15 changes: 10 additions & 5 deletions app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,11 @@ const App = () => {
const memoizedValues = React.useMemo(() => {
let endEpoch: number | undefined,
granularity: number | undefined,
chartType = '';
chartType = '',
symbol = '';
if (settingsRef.current.historical) {
endEpoch = new Date(`${today}:00Z`).valueOf() / 1000;
chartType = 'mountain';
chartType = 'line';
granularity = 0;
if (layout) {
granularity =
Expand All @@ -153,25 +154,27 @@ const App = () => {
(layout.interval * IntervalEnum[layout.timeUnit as keyof typeof IntervalEnum]).toString(),
10
); // eslint-disable-line
if (layout.chartType === 'candle' && layout.aggregationType !== 'ohlc') {
if (layout.chartType === 'candles' && layout.aggregationType !== 'ohlc') {
chartType = layout.aggregationType;
} else {
chartType = layout.chartType;
}
symbol = layout.symbol;
}
}
return {
chartType,
granularity,
endEpoch,
symbol,
};
}, [layout]);
const [chartType, setChartType] = React.useState<string | undefined>(memoizedValues.chartType);
const [granularity, setGranularity] = React.useState<TGranularity>(memoizedValues.granularity as TGranularity);
const [endEpoch, setEndEpoch] = React.useState(memoizedValues.endEpoch);
const [isConnectionOpened, setIsConnectionOpened] = React.useState(true);
const [networkStatus, setNetworkStatus] = React.useState<TNetworkConfig>();
const [symbol, setSymbol] = React.useState<string>('');
const [symbol, setSymbol] = React.useState<string>(memoizedValues.symbol);
const allTicks: keyof AuditDetailsForExpiredContract | [] = [];
const contractInfo: keyof ProposalOpenContract | {} = {};
React.useEffect(() => {
Expand All @@ -192,7 +195,7 @@ const App = () => {
console.log('settings updated:', newSettings);
localStorage.setItem('smartchart-setting', JSON.stringify(newSettings));
if (!prevSetting.historical && newSettings.historical) {
setChartType('mountain');
setChartType('line');
setGranularity(0);
setEndEpoch(new Date(`${today}:00Z`).valueOf() / 1000);
} else if (!newSettings.historical) {
Expand Down Expand Up @@ -252,6 +255,7 @@ const App = () => {
});
}
};

return (
<SmartChart
id={chartId}
Expand All @@ -278,6 +282,7 @@ const App = () => {
networkStatus={networkStatus}
shouldFetchTradingTimes
shouldFetchTickHistory
isLive
enabledChartFooter
allTicks={allTicks}
contractInfo={contractInfo}
Expand Down
Loading

0 comments on commit e9ed6a6

Please sign in to comment.