Skip to content

Commit

Permalink
Merge pull request #248 from caktus/develop
Browse files Browse the repository at this point in the history
Production release v1.14.0
  • Loading branch information
Afani97 authored Dec 6, 2023
2 parents b117ebe + a908ebb commit d7b40d3
Show file tree
Hide file tree
Showing 26 changed files with 6,557 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: deploy

on:
push:
branches: [main, develop, 112-deploy-fix]
branches: [main, develop, CU-8686edfh0-performance]

jobs:
deploy:
Expand Down
2 changes: 2 additions & 0 deletions frontend/src/Components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import * as S from './HomePage/HomePage.styled';
// New Charts
import {
ArcElement,
BarElement,
CategoryScale,
Chart as ChartJS,
Legend,
Expand All @@ -56,6 +57,7 @@ import {

ChartJS.register(
ArcElement,
BarElement,
CategoryScale,
LinearScale,
PointElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const LegendSection = styled.div`
margin-top: 2em;
display: flex;
flex-direction: column;
align-items: center;
align-items: start;
width: 100%;
flex: 0;
Expand Down
13 changes: 11 additions & 2 deletions frontend/src/Components/Charts/ChartSections/Legend/Legend.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,24 @@ import * as S from './Legend.styled';
import { ICONS } from '../../../../img/icons/Icon';
import { WEIGHTS } from '../../../../styles/StyledComponents/Typography';

function Legend({ keys, onKeySelect, isStatic, showNonHispanic, heading, direction = 'row' }) {
function Legend({
keys,
onKeySelect,
isStatic,
showNonHispanic,
heading,
direction = 'row',
legendColors = 'ethnicGroup',
}) {
const theme = useTheme();

return (
<S.Legend>
{heading && <S.LegendHeading weight={WEIGHTS[1]}>{heading}</S.LegendHeading>}
<S.KeysList direction={direction}>
{keys?.map((key) => {
const fill = key.selected ? theme.colors.ethnicGroup[key.value] : theme.colors.grey;
const colors = theme.colors[legendColors];
const fill = key.selected ? colors[key.value] : theme.colors.grey;
const iconProps = {
fill,
width: 25,
Expand Down
Loading

0 comments on commit d7b40d3

Please sign in to comment.