Merge LineGraph + WordCloudWidth change

This commit is contained in:
e26chiu 2022-12-04 19:02:53 -05:00
parent d02b4b0eff
commit 5b019ef005
1 changed files with 16 additions and 7 deletions

View File

@ -20,7 +20,7 @@ import {
import { pageRoutes } from "data/routes";
import React from "react";
import { Color } from "utils/Color";
import { DefaultProp, pieChartProps } from "utils/defaultProps";
import { DefaultProp, pieChartProps, wordCloudWidth } from "utils/defaultProps";
import { useWindowDimensions } from "utils/getWindowDimensions";
import { useIsMobile } from "utils/isMobile";
@ -78,6 +78,12 @@ export default function CoopPage() {
left: 30,
right: 20,
}}
colorRange={[
Color.primaryAccent,
Color.secondaryAccentLight,
Color.primaryAccentLight,
Color.secondaryAccent,
]}
/>
</ComponentWrapper>
@ -89,8 +95,7 @@ export default function CoopPage() {
>
<WordCloud
data={C2}
// For components that we don't want to match the width necessarily we can provide direct values
width={isMobile ? pageWidth / 1.5 : 900}
width={wordCloudWidth(isMobile, pageWidth)}
height={DefaultProp.graphHeight * 0.7}
wordPadding={15}
desktopMaxFontSize={75}
@ -106,8 +111,7 @@ export default function CoopPage() {
>
<WordCloud
data={C7i}
// For components that we don't want to match the width necessarily we can provide direct values
width={isMobile ? pageWidth / 1.5 : 800}
width={wordCloudWidth(isMobile, pageWidth)}
height={DefaultProp.graphHeight}
wordPadding={7}
desktopMaxFontSize={75}
@ -122,8 +126,7 @@ export default function CoopPage() {
>
<WordCloud
data={C4}
// For components that we don't want to match the width necessarily we can provide direct values
width={isMobile ? pageWidth / 1.5 : 800}
width={wordCloudWidth(isMobile, pageWidth)}
height={DefaultProp.graphHeight}
wordPadding={14}
desktopMaxFontSize={75}
@ -270,6 +273,12 @@ export default function CoopPage() {
left: 30,
right: 20,
}}
colorRange={[
Color.primaryAccent,
Color.secondaryAccentLight,
Color.primaryAccentLight,
Color.secondaryAccent,
]}
/>
</div>
</ComponentWrapper>