Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve chart margins #958

Merged
merged 1 commit into from
Dec 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/pages/Chart/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3423,7 +3423,7 @@ export default function Chart(props: ChartData) {
<d3fc-svg
className='y-axis'
ref={d3Yaxis}
style={{ flexGrow: 1 }}
style={{ width: '4rem' }}
></d3fc-svg>
</div>

Expand Down Expand Up @@ -3504,7 +3504,7 @@ export default function Chart(props: ChartData) {
<d3fc-svg
ref={d3Xaxis}
className='x-axis'
style={{ height: '2em', width: '100%' }}
style={{ height: '1.1em', width: '100%' }}
></d3fc-svg>
</div>
</d3fc-group>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/Trade/Trade.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@
/* grid-gap: 1em; */
}
.middle_col {
padding: 1rem;
padding: 0.5rem 0rem 0rem 0.5rem;
background: var(--dark3);

display: grid;
Expand Down Expand Up @@ -396,10 +396,10 @@
left: 0;
top: 0;
z-index: 10;

/* background-image: radial-gradient(circle,var(--dark3), var(--dark1) );
background-image: radial-gradient(circle,rgb(0, 25, 51), rgba(4, 12, 24, 1) ); */
background: var(--chart-gradient)
background: var(--chart-gradient);
/* background:radial-gradient(circle at 3% 25%, rgb(1, 28, 56) 0%, rgba(4, 12, 24, 1) 25%); */
/* padding: 1rem; */
}
Expand Down
25 changes: 10 additions & 15 deletions src/pages/Trade/TradeCharts/TradeCharts.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,15 @@
z-index: 1;
pointer-events: none;
} */
.main_container_chart{
.main_container_chart {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
/* padding: 1rem; */
height: 100%;
display: flex;
flex-direction: column;
/* padding: 1rem; */
}


.graph_style{
.graph_style {
z-index: 2;
}

Expand All @@ -32,14 +31,14 @@
/* display: grid;
grid-template-columns: repeat(3, 1fr); */
align-items: center;
padding: 0.3rem 0;
padding: 0.3rem 0.7rem 0 0;
}

.tokens_info {
display: flex;
flex-direction: row;
align-items: center;

gap: 1rem;
}

Expand Down Expand Up @@ -368,8 +367,6 @@
text-align: flex-start;
}



/* .chart_item_container input[type=checkbox]:disabled + label:before {
transform: scale(1);
border-color: #7371FC;
Expand All @@ -384,7 +381,7 @@
*/

.current_data_info {
padding: 0.3rem 0;
padding: 0.3rem 0 0 0.3rem;

/* extra small */

Expand Down Expand Up @@ -434,7 +431,6 @@

.graph_style {
width: 100%;

}
/* .full_screen_gradient{

Expand Down Expand Up @@ -494,6 +490,5 @@
display: grid;
grid-template-columns: repeat(2, 1fr);
align-items: center;
padding: 0.3rem 0;
padding: 0.5rem 0.5rem 0.5rem 0;
}

2 changes: 1 addition & 1 deletion src/utils/numbers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const formatAmountChartData = (num: number | undefined, digits = 2) => {

const a = numbro(num).format({
average: num > 0 || num < 10000 ? false : true,
mantissa: num > 1000 ? 2 : num < 1 ? 7 : num < 100 ? 5 : digits,
mantissa: num > 1000 ? 2 : num < 1 ? 5 : num < 100 ? 5 : digits,

// mantissa: num > 1000 ? 2 : digits,
abbreviations: {
Expand Down