-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
197 additions
and
85 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
src/features/dashboard/components/Charts/chartsCommonSettings.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/** | ||
* @file React hook. | ||
* @copyright Yury Korotovskikh <[email protected]> | ||
*/ | ||
|
||
import type { | ||
CandlestickSeriesPartialOptions, | ||
DeepPartial, | ||
PriceScaleOptions, | ||
} from 'lightweight-charts'; | ||
|
||
/** | ||
* Series default options. | ||
*/ | ||
export const seriesDefaultOptions: CandlestickSeriesPartialOptions = { | ||
priceFormat: { | ||
type: 'price', | ||
precision: 4, | ||
minMove: 0.0001, | ||
}, | ||
}; | ||
|
||
/** | ||
* Volume series options. | ||
*/ | ||
export const volumeSeriesOptions: CandlestickSeriesPartialOptions = { | ||
...seriesDefaultOptions, | ||
priceScaleId: 'right', | ||
}; | ||
|
||
/** | ||
* Volume series price scale options. | ||
*/ | ||
export const volumeSPriceScaleOPtions: DeepPartial<PriceScaleOptions> = { | ||
scaleMargins: { | ||
top: 0.5, | ||
bottom: 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* @file Styles. | ||
*/ | ||
|
||
import { SPACE } from '@nilfoundation/ui-kit'; | ||
import type { StyleObject } from 'styletron-react'; | ||
|
||
const chartContainer: StyleObject = { | ||
flexGrow: 1, | ||
height: '100%', | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
flexDirection: 'column', | ||
}; | ||
|
||
const wrapper: StyleObject = { | ||
flexGrow: 1, | ||
width: '100%', | ||
}; | ||
|
||
const legend: StyleObject = { | ||
marginBottom: SPACE[8], | ||
height: '48px', | ||
flexShrink: 0, | ||
}; | ||
|
||
const timeIntervalToggle: StyleObject = { | ||
marginBottom: SPACE[16], | ||
}; | ||
|
||
export const styles = { | ||
legend, | ||
timeIntervalToggle, | ||
chartContainer, | ||
wrapper, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
src/features/dashboard/components/Dashboard/DashboardContext.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* @file React context. | ||
* @copyright Yury Korotovskikh <[email protected]> | ||
*/ | ||
|
||
import { createContext } from 'react'; | ||
import type { DashboardContext as DashboardContextType } from '../../models/DashboardContext'; | ||
|
||
export const DashboardContext = createContext({} as DashboardContextType); | ||
DashboardContext.displayName = 'DashboardContext'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** | ||
* @file Styles. | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/** | ||
* @file Styles for Trades component. | ||
* @file Styles. | ||
*/ | ||
|
||
import type { StyleObject } from 'styletron-react'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.