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 line charts page
  • Loading branch information
robgannon-eaton committed Nov 21, 2024
commit c80d6dbacebd91e209df9fee75fa3868bacceda8
Binary file added src/app/assets/visualizations/area-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/app/assets/visualizations/blcbuttonicon.svg
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.
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/deviationline.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/fewerlines.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/horizontalline.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/largeaxislabels.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.
Binary file added src/app/assets/visualizations/manylines.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.
Binary file added src/app/assets/visualizations/multipleline.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.
Binary file added src/app/assets/visualizations/nozerolinevalue.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.
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/related-bar.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/ridgelineplot.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/sparkline.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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions src/docs/visualizations/barcharts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import Rounderbars from '../../app/assets/visualizations/rounderbars.png';
import Orderedbars from '../../app/assets/visualizations/orderedbars.png';
import Unorderedbars from '../../app/assets/visualizations/unorderedbars.png';
import RelatedLine from '../../app/assets/visualizations/relatedline.png';
import RelatedPie from '../../app/assets/visualizations/relatedpie.png';

import RelatedPie from '../../app/assets/visualizations/related-pie.png';
import { ReactComponent as BLCIcon } from '../../app/assets/visualizations/blcicon.svg';
import { ReactComponent as CodeIcon } from '../../app/assets/visualizations/codeicon.svg';

Expand Down
210 changes: 209 additions & 1 deletion src/docs/visualizations/linecharts.mdx
Original file line number Diff line number Diff line change
@@ -1 +1,209 @@
# linecharts
import { ImageGrid, BLCIconButton, VariantIllustration } from '../../app/components';
import LinechartComponentImage from '../../app/assets/visualizations/linechartcomponent.png';
import HorizontalLine from '../../app/assets/visualizations/horizontalline.png';
import MultipleLine from '../../app/assets/visualizations/multipleline.png';
import Sparkline from '../../app/assets/visualizations/sparkline.png';
import RidgelinePlot from '../../app/assets/visualizations/ridgelineplot.png';
import Deviation from '../../app/assets/visualizations/deviationline.png';
import CombinationChart from '../../app/assets/visualizations/combinationchart.png';
import Fewerlines from '../../app/assets/visualizations/fewerlines.png';
import Manylines from '../../app/assets/visualizations/manylines.png';
import Overstylingtabs from '../../app/assets/visualizations/overstylinglinetabs.png';
import OverstylingAvoid from '../../app/assets/visualizations/overstylingavoid.png';
import LargeAxisLabels from '../../app/assets/visualizations/largeaxislabels.png';
import NoZeroLineValue from '../../app/assets/visualizations/nozerolinevalue.png';
import DashedOpacityLine from '../../app/assets/visualizations/dashed-opacity-line.png';
import MultiStylingOptions from '../../app/assets/visualizations/multi-styling-options.png';
import UnevenAxMultiCat from '../../app/assets/visualizations/uneven-ax-multi-cat.png';
import UnevenAxIntervals from '../../app/assets/visualizations/uneven-ax-intervals.png';
import AreaChart from '../../app/assets/visualizations/area-chart.png';
import NoLineAccData from '../../app/assets/visualizations/no-line-acc-data.png';
import RelatedBar from '../../app/assets/visualizations/related-bar.png';
import RelatedPie from '../../app/assets/visualizations/related-pie.png';



import { ReactComponent as BLCIcon } from '../../app/assets/visualizations/blcbuttonicon.svg';
import { ReactComponent as CodeIcon } from '../../app/assets/visualizations/codeicon.svg';

# Line Charts

Line charts are used to visualise and compare trends over time. They are highly customisable and a popular option for dashboards.

### Component

<ImageGrid
images={[LinechartComponentImage]}
regularWidth
/>

<BLCIconButton
icon={BLCIcon}
label={'View in Figma sticker sheet'}
url={'/'}
/>
<BLCIconButton
icon={CodeIcon}
label={'View in Storybook'}
url={'/'}
/>

### When to use

Line charts work well for satisfying the following user needs, among others:

- Observe trends over time, such as a growth in EV charging stations usage;
- Identify changes or events, such as power outages or peak demand;
- Show data distribution in order to identify possible outliers;
- Compare related data over time, such as EV charging station consumption over July.

They’re usually shown as data points connected by straight lines, commonly used to express variations on data over equal intervals of time. While the base axis displays categorical/time-based variables, the vertical axis should display numeric values, which determines the line variation in height.

### Layout options

Line charts are commonly presented in the following layouts:

<div
style={{
display: 'flex',
flexWrap: 'wrap',
maxWidth: '43rem',
gap: '40px',
marginTop: '2rem'
}}
>
<VariantIllustration
iconImage={HorizontalLine}
label='Horizontal'
description='Standard option to see trends and compare data over time.'
/>
<VariantIllustration
iconImage={MultipleLine}
label='Multiple'
description='Multiple lines allow for comparing different data distributions.'
/>
<VariantIllustration
iconImage={Sparkline}
label='Sparkline'
description='Small line chart usually within a table, useful for information at a glance'
/>
<VariantIllustration
iconImage={RidgelinePlot}
label='Ridgeline Plot'
description='Overlapping line/area charts displayed at different depths, used to visualise the distribution of groups of data.'
/>
<VariantIllustration
iconImage={Deviation}
label='Deviation'
description='Display uncertainty in the data with the help of shaded area.'
/>
<VariantIllustration
iconImage={CombinationChart}
label='Combination'
description='Combining two or more chart types, to show the relationship of data over a shared time frame.'
/>
</div>


### Best practices

<p style={{fontSize: '20px',fontWeight: 'bold',}}>Avoid comparing too many datasets in a single chart</p>

The goal of a chart is to communicate trends and changes over time clearly. If the plot area is cluttered with too many datasets, the chart will be less effective at reaching this goal and harder to understand for users.

For most cases, we recommend displaying 1 to 5 plots in a single Line chart. There is no ideal number of lines to include, as this depends on the chart size or the presence of other elements (such as reference lines and underlays) that can increase cognitive load.

<ImageGrid
images={[Fewerlines, Manylines]}
captionsUnderImages={[
'DO:Use five or fewer related values for optimal data analysis.',
'DONT:Do not use more than five values as it will compromise readability and data analysis. Choose another chart if you need to present more related values.'
]}
/>

<p style={{fontSize: '20px',fontWeight: 'bold',}}>Avoid over-styling bars</p>

Do not choose aesthetic over readability. Anything that could mislead the user and their interpretation of the data should not be altered or added.




<ImageGrid
images={[Overstylingtabs, OverstylingAvoid]}
captionsUnderImages={[
'DO:Use tab menus to separate your charts by context, allowing the use of less lines in a single plot area',
'DO:If you can’t avoid showing more than 8 datasets in the same chart, show the top results in color and group the remaining datasets in grey (for edge cases only)'
]}
/>

<p style={{fontSize: '20px',fontWeight: 'bold',}}>Choosing a baseline</p>

You don't always need to use a zero-value baseline. As the main goal for the line chart is to display changes over time, you don't always have to show data from the zero-value, if it's not meaningful - you can zoom the vertical axis range.

<ImageGrid
images={[LargeAxisLabels, NoZeroLineValue]}
captionsUnderImages={[
'DO:Zoom in the axis labels so you can have better readability to analyse the graph, in cases where the zero line is not meaningful.',
'DONT:Do not show the zero-line value if it doesn’t add context or is useful to analyse the results. You’re compromising readability on the actual data.'
]}
/>

<p style={{fontSize: '20px',fontWeight: 'bold',}}>Using additional features to show variability</p>

Add dashed lines, line with varying opacity, filled space or bar charts to deliver additional information such as deviations, uncertain measures or bounds (e.g. max. & min.)

<ImageGrid
images={[DashedOpacityLine, MultiStylingOptions]}
captionsUnderImages={[
'DO:Use dashed or varied opacity lines to show different data types for the same values.',
'DONT:Do not mix every styling option available. Choose one that fits your data better and use it through all of your chart.'
]}
/>

<p style={{fontSize: '20px',fontWeight: 'bold',}}>Making sure the line chart is the right type for your data</p>

There are several chart types that are visually similar to line charts, that you may want to consider. Make sure you choose the chart type that displays the data in the most meaningful way for your end user.

<ImageGrid
images={[UnevenAxMultiCat, UnevenAxIntervals]}
captionsUnderImages={[
'DO:Use connected scatterplot if you need to correlate sets of data related to multiple categories on uneven axis intervals.',
"DONT:Don't use line charts if you need to connect data points that are spreaded into uneven axis intervals."
]}
/>

<ImageGrid
images={[AreaChart, NoLineAccData]}
captionsUnderImages={[
'DO:Use area charts to show accumulative data or parts to whole data over time and use low opacity fills to avoid obscuring data points.',
"DONT:Avoid line charts if the volume below the line is meaningful to the data set, because it is hard to quantify this volume if it is not filled."
]}
/>

### Additional resources

For more in-depth information on how to design bar charts for Eaton, please refer to:

<BLCIconButton
label={'Foundations'}
url={'/visualizations/foundations'}
/>
<BLCIconButton
label={'Colors In Data Viz'}
url={'/visualizations/colors'}
/>

### Related Components

<div style={{display: 'flex', gap: '3.5rem'}}>
<VariantIllustration
iconImage={RelatedBar}
label='Bar Chart'
description='Compare values within a data category'
/>
<VariantIllustration
iconImage={RelatedPie}
label='Pie Chart'
description='Compare relationships between parts of a whole'
/>
</div>
4 changes: 3 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ p.MuiTypography-h5.MuiTypography-paragraph {

/* Remove border from ImageGrid for BrightlayerCharts integration images*/
img[src*="foundations-chart"],
img[src*="datagranularity"] {
img[src*="datagranularity"],
img[src*="barcharts-component"],
img[src*="linechartcomponent"] {
border: none;
}