Skip to content

Commit

Permalink
industry average
Browse files Browse the repository at this point in the history
  • Loading branch information
mlisnic committed Sep 7, 2024
1 parent 2b28a4b commit 0892e44
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
20 changes: 4 additions & 16 deletions public/stage-3/config-stage-3.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"id": "agree",
"type": "likert",
"location": "belowStimulus",
"prompt": "The visualization supports the idea that stock C yielded the highest returns in the industry in 2023:",
"prompt": "The visualization supports the idea that stock C yielded the highest returns in the entire industry in 2023:",
"preset": 5,
"leftLabel": "Strongly disagree",
"rightLabel": "Strongly agree",
Expand Down Expand Up @@ -112,7 +112,7 @@
"id": "agree",
"type": "likert",
"location": "belowStimulus",
"prompt": "The visualization supports the idea that stock E yielded the highest returns in the industry in 2023:",
"prompt": "The visualization supports the idea that stock E yielded the highest returns in the entire industry in 2023:",
"preset": 5,
"leftLabel": "Strongly disagree",
"rightLabel": "Strongly agree",
Expand Down Expand Up @@ -177,7 +177,7 @@
"id": "agree",
"type": "likert",
"location": "belowStimulus",
"prompt": "The visualization supports the idea that stock A yielded the highest returns in the industry in 2023:",
"prompt": "The visualization supports the idea that stock A yielded the highest returns in the entire industry in 2023:",
"preset": 5,
"leftLabel": "Strongly disagree",
"rightLabel": "Strongly agree",
Expand Down Expand Up @@ -492,21 +492,9 @@
"order": "latinSquare",
"numSamples": 1,
"components": [
"stock-simple-a-n",
"stock-simple-a-sd",
"stock-simple-a-ss",
"stock-simple-a-jd",
"stock-simple-a-js",
"stock-simple-e-n",
"stock-simple-e-sd",
"stock-simple-e-ss",
"stock-simple-e-jd",
"stock-simple-e-js",
"stock-simple-c-n",
"stock-simple-c-sd",
"stock-simple-c-ss",
"stock-simple-c-jd",
"stock-simple-c-js"
"stock-simple-c-ss"
]
}
]
Expand Down
2 changes: 1 addition & 1 deletion src/public/viz-guardrails/DataExplorer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ export function DataExplorer({ parameters, setAnswer }: StimulusParams<ChartPara
{dataname === 'clean_stocks' ? 'Percent change in stock price' : 'Infections per million people'}
</Text>
{guardrail === 'super_summ' ? (
<Text fz="xs" c="dimmed">Shaded area represents the middle 50% of all values.</Text>
<Text fz="xs" c="dimmed">Shaded area contains the industry average and shows the middle 50% of all values in the industry.</Text>
) : null}
{guardrail === 'juxt_summ' ? (
<Text fz="xs" c="dimmed">Bar on the left highlights the range of selection among all data.</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/public/viz-guardrails/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export function LineChart({
};
}, [xScale, yScale, guardrail, avgData, dataname]);

const averageLabel = useMemo(() => (dataname === 'clean_stocks' ? 'Industry Index' : 'Average'), [dataname]);
const averageLabel = useMemo(() => (dataname === 'clean_stocks' ? 'Industry Average' : 'Average'), [dataname]);

const getPolicyLabel = (country: string) => {
if (country === 'Eldoril North') {
Expand Down Expand Up @@ -336,7 +336,7 @@ export function LineChart({
</g>
))}
{labelPos?.map((x) => (
<foreignObject key={`${x.country}_label`} x={width + margin.left + 5} y={x.label_pos - 7} width={margin.right + 60} height={20}>
<foreignObject key={`${x.country}_label`} x={width + margin.left - 3} y={x.label_pos - 7} width={margin.right + 60} height={20}>
<Text
px={2}
size={10}
Expand Down

0 comments on commit 0892e44

Please sign in to comment.