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

Update master after blui cli removal #780

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2f8f4d4
Bump http-proxy-middleware from 2.0.6 to 2.0.7
dependabot[bot] Oct 25, 2024
f249000
Merge pull request #772 from etn-ccis/dependabot/npm_and_yarn/http-pr…
JeffGreiner-eaton Oct 28, 2024
ca7f66b
Bump webpack from 5.76.2 to 5.95.0
dependabot[bot] Oct 28, 2024
070fecf
Merge pull request #773 from etn-ccis/dependabot/npm_and_yarn/webpack…
JeffGreiner-eaton Oct 28, 2024
008f8fc
Bump @emotion/css from 11.11.2 to 11.13.4
dependabot[bot] Nov 1, 2024
0a6a721
Merge pull request #774 from etn-ccis/dependabot/npm_and_yarn/dev/emo…
JeffGreiner-eaton Nov 4, 2024
ab7abf0
Start foundations page
robgannon-eaton Nov 12, 2024
8503afa
Complete foundations page to current designs
robgannon-eaton Nov 13, 2024
06d67d1
Update sitemap and run indexer script
robgannon-eaton Nov 14, 2024
ce4ed4f
Removed blui cli and angular cli templates
surajeaton Nov 14, 2024
89a5482
Add all placeholder pages and update navigation. Update sitemap and r…
robgannon-eaton Nov 14, 2024
ea9527d
Add colors in data viz page
robgannon-eaton Nov 14, 2024
e995580
Merge pull request #776 from etn-ccis/feature/6297-remove-blui-cli
JeffGreiner-eaton Nov 15, 2024
b835f0f
Correct foundations and colors pages to match designs after review.
robgannon-eaton Nov 18, 2024
0c8f5d9
Bump cross-spawn from 7.0.3 to 7.0.6
dependabot[bot] Nov 19, 2024
00d0964
Add barchart page
robgannon-eaton Nov 19, 2024
247d37a
Merge pull request #777 from etn-ccis/dependabot/npm_and_yarn/cross-s…
JeffGreiner-eaton Nov 20, 2024
b435e94
Complete new project guide page and getting started tab component
robgannon-eaton Nov 21, 2024
c80d6db
Add line charts page
robgannon-eaton Nov 21, 2024
2550ebd
Rename images to kebab case
robgannon-eaton Nov 21, 2024
c91eee9
Organize images into folders by page and icons
robgannon-eaton Nov 21, 2024
709bb28
refactor component styling
robgannon-eaton Nov 21, 2024
2ffb3e3
Update VariantIllustration to nav to url if set
robgannon-eaton Nov 21, 2024
4e7c2d1
Removed Supported Frameworks section from templates and corrected the…
surajeaton Nov 22, 2024
494cd9c
Merge pull request #778 from etn-ccis/feature/6297-remove-blui-cli-re…
surajeaton Nov 22, 2024
407b98a
Remove previous viz page. Update componentss to use theme colors
robgannon-eaton Nov 22, 2024
48b381c
update component links, copy, data granularity image, and fix mui er…
robgannon-eaton Nov 22, 2024
8e58b6a
Check for and remove unnecessary !important tags
robgannon-eaton Nov 22, 2024
b26845d
Add Piecharts page and update VArianIllustration component style options
robgannon-eaton Nov 22, 2024
e69d27b
regenerate database
robgannon-eaton Nov 22, 2024
b150c64
delete old visualizations page
robgannon-eaton Nov 22, 2024
72f590a
correct prettier formatting issues
robgannon-eaton Nov 22, 2024
ec5b1e1
fix import issue
robgannon-eaton Nov 22, 2024
2325054
Replaced blui cli templates with templates
surajeaton Nov 26, 2024
4507ba7
address PR 779 comment
robgannon-eaton Nov 27, 2024
793cf61
Merge pull request #781 from etn-ccis/bug/remove-blui-cli-references
surajeaton Nov 28, 2024
83c870f
Merge pull request #779 from etn-ccis/feature/CIPUI-1960-blcharts-int…
surajeaton Nov 28, 2024
a39d439
Bump @types/color from 3.0.6 to 4.2.0
dependabot[bot] Dec 1, 2024
51a27f6
Merge pull request #782 from etn-ccis/dependabot/npm_and_yarn/dev/typ…
surajeaton Dec 2, 2024
bbc6071
Review changes - Removed lui cli references
surajeaton Dec 5, 2024
ab6a107
Merge pull request #783 from etn-ccis/feature/remove-blui-cli-references
surajeaton Dec 5, 2024
24f8641
Bump nanoid from 3.3.4 to 3.3.8
dependabot[bot] Dec 10, 2024
d07c60b
Merge pull request #784 from etn-ccis/dependabot/npm_and_yarn/nanoid-…
JeffGreiner-eaton Dec 11, 2024
3d069bd
update firebase deploy on pull request
JeffGreiner-eaton Dec 11, 2024
77070a4
Merge pull request #785 from etn-ccis/feature/blui-6355-firebase-deploy
surajeaton Dec 13, 2024
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
Prev Previous commit
Next Next commit
Add colors in data viz page
  • Loading branch information
robgannon-eaton committed Nov 14, 2024
commit ea9527d5e8ae4ee296847e016d506dffe40e28db
Binary file added src/app/assets/visualizations/colorpatch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/app/assets/visualizations/consistency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/app/assets/visualizations/datarel1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/app/assets/visualizations/datarel2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/app/assets/visualizations/infohierarchy1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/app/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ export * from './contributors';
export * from './faq';
export * from './typography';
export * from './theme';
export * from './foundations';
export * from './visualizations';
93 changes: 93 additions & 0 deletions src/app/components/visualizations/ColorRowBlock.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import React from 'react';
import { styled } from '@mui/material/styles';
import colorpatch from '../../assets/visualizations/colorpatch.png';

const Container = styled('div')({
width: '100%',
borderRadius: '12px',
backgroundColor: '#F7F8F8',
padding: '16px',
gap: '16px',
color: '#192024',
fontFamily: 'Open Sans',
fontSize: '20px;',
fontWeight: '600',
});

const ColsWrapper = styled('div')({
display: 'flex',
flexDirection: 'row',
justifyContent: 'flex-start',
});

const Column = styled('div')({
display: 'flex',
flexDirection: 'column',
gap: '8px',
padding: '16px',
});

const ItemContainer = styled('div')({
display: 'flex',
alignItems: 'center',
width: '240px',
color: '#192024',
fontFamily: 'Open Sans',
fontSize: '14px',
fontWeight: '600',
padding: '16px',
gap: '8px',
});

const Circle = styled('div')<{ color: string }>(({ color }) => ({
width: '16px',
height: '16px',
borderRadius: '50%',
backgroundColor: color,
marginRight: '8px',
backgroundImage: `url(${colorpatch})`,
backgroundSize: 'cover',
}));

const Label = styled('span')({
fontSize: '14px',
});

type Item = {
color: string;
label: string;
};

type BlockLabel = { label: string };

type ColorRowBlockProps = {
col1: Item[];
col2: Item[];
label: BlockLabel[];
};

export const ColorRowBlock: React.FC<ColorRowBlockProps> = ({ col1, col2, label }) => (
<Container>
<span style={{ display: 'block', width: '200px' }}>{label.toString()}</span>
<ColsWrapper>
<Column>
{col1.map((item, index) => (
<ItemContainer key={index}>
<Circle color={item.color} />
<Label>{item.label}</Label>
</ItemContainer>
))}
</Column>
<Column>
{col2.map((item, index) => (
<ItemContainer key={index}>
<Circle color={item.color} />
<Label>{item.label}</Label>
</ItemContainer>
))}
</Column>
</ColsWrapper>
</Container>
);

export default ColorRowBlock;
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './BLCAccordian';
export * from './ColorRowBlock';
2 changes: 1 addition & 1 deletion src/database/index-database.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/database/sitemap-database.json

Large diffs are not rendered by default.

122 changes: 121 additions & 1 deletion src/docs/visualizations/colors.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,121 @@
# colors
import { ColorRowBlock, ImageGrid } from '../../app/components';
import Consistency from '../../app/assets/visualizations/consistency.png';
import datarel1 from '../../app/assets/visualizations/datarel1.png';
import datarel2 from '../../app/assets/visualizations/datarel2.png';
import infohierarchy1 from '../../app/assets/visualizations/infohierarchy1.png';
import infohierarchy2 from '../../app/assets/visualizations/infohierarchy2.png';

# Colors in Data Visualization

The colors used in Eaton visualizations are a subset of the Eaton color palette.
They are part of the [Eaton Branding Guidelines](https://eaton.sharepoint.com/sites/CommunicationsBrandCenter),
and all charts added to Eaton interfaces follow the same rules.

## Color Tokens

Our data viz components make use of the color tokens listed in the Brightlayer UI sticker sheet. This allows
automatic switching between Light and Dark modes, and ensure your designs are always using standard Eaton
palettes. We offer token support to 5 of the 16 Branding colors.

**Data Series** - these are the hues from the Branding palette that we recommend using for data viz, for having
the best contrast relationships and accessibility scores.

These tokens are also ordered from 1 to 5, which is the preferred order of use:
\- If you need a single color Bar chart, we recommend using Data Series 1.
\- If your Line chart displays 3 lines, we recommend using Data Series 1, 2 and 3.

If you want to use more than 5 hues in a single chart, feel free to use colors from the
[Branding palette](https://brightlayer-ui.github.io/style/color#branding-colors) at your discretion. For most
cases, we recommend using the 500 values.

<ColorRowBlock
label={'Data Series'}
col1={[
{ color: '#005EB8', label: 'Data Series 1' },
{ color: '#FFC72C', label: 'Data Series 2' },
{ color: '#ED8B00', label: 'Data Series 3' },
{ color: '#B5BD00', label: 'Data Series 4' },
{ color: '#4C8D2B', label: 'Data Series 5' },
]}
col2={[
{ color: '#FFFFFF', label: 'On Data Series 1' },
{ color: '#524700', label: 'On Data Series 2' },
{ color: '#4B2800', label: 'On Data Series 3' },
{ color: '#524700', label: 'On Data Series 4' },
{ color: '#FFFFFF', label: 'On Data Series 5' },
]}
/>

**Axis and Grids** - These are the color tokens used on ancillary elements of charts, such as axis, grids and
reference lines.

<ColorRowBlock
label={'Axis and Grids'}
col1={[
{ color: '#192024', label: 'Axis' },
]}
col2={[
{ color: '#74777F40', label: 'Grid Line' },
]}
/>

**Underlays** - These are the color tokens used on the Underlay component, which conveys additional data insights
by outlining data ranges through the use of color.

<ColorRowBlock
label={'Underlays'}
col1={[
{ color: '#BA1B1A1A', label: 'Underlay Danger' },
{ color: '#1989001A', label: 'Underlay Healthy' },
{ color: '#71B2C914', label: 'Underlay Night' },
]}
col2={[
{ color: '#FBE3651A', label: 'Underlay Warning' },
{ color: '#FFC72C14', label: 'Underlay Day' },
]}
/>

# Color Guidelines

Color has a substantial influence on how quickly and accurately the audience derives meaning from data. When
used correctly, color can help communicate the following;

## Consistency

Using our recommended color palette ensures user experience is consistent across different products and systems.
Within a given product or dashboard, ensure that the meaning associated with each color is consistent through all
screens.

<ImageGrid
images={[Consistency]}
regularWidth
caption='The meaning associated with Purple (EV Chargers) stays consistent throughout different charts'
/>

## Data Relationships

Color can be used to communicate the relationship between data. Related data should have similar colors, and unrelated
data should have distinct colors.

<ImageGrid
images={[datarel1, datarel2]}
captionsUnderImages={[
'Bar charts showing related \n data use a single color',
'Donut charts use distinct colors for quick understanding'
]}
/>

# Information Hierarchy

Color can effectively communicate the information hierarchy of data visuals by making the most important information
vibrant and eye-catching, and the less important information muted (Gray 200).



<ImageGrid
images={[infohierarchy1, infohierarchy2]}
captionsUnderImages={[
'Line chart using a highlight to guide storytelling and help users focus on most relevant info',
'Bar chart with a single bar highlighted to represent This Week (past weeks are shown in grey for reference)'
]}
/>