-
Notifications
You must be signed in to change notification settings - Fork 815
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
feat: add data viz section to website #287
Merged
Merged
Changes from all commits
Commits
Show all changes
137 commits
Select commit
Hold shift + click to select a range
37f8cc3
feat: update charts nav
alisonjoseph e00a5fd
feat: add stacked bar example (from codepen)
alisonjoseph a5e5daf
chore: add donut
alisonjoseph 4c6a40c
chore: remove donut chart
alisonjoseph 3bc5209
chore: remove chart import
alisonjoseph 694d23d
Merge pull request #232 from alisonjoseph/charts
alisonjoseph a8f15e7
Merge branch 'master' of github.com:carbon-design-system/carbon-www i…
alisonjoseph b98a2b6
chore: attempt to get charts working
alisonjoseph a653007
chore: add bar chart types
alisonjoseph cb82df9
chore: cleanup old file
alisonjoseph b27940c
chore: upgrade carbon charts
alisonjoseph 0d7234b
Merge branch 'master' into charts
alisonjoseph 7dbaff6
chore: add d3
alisonjoseph 28dcd99
chore: update nav
alisonjoseph 7f0a4d9
Merge branch 'master' of github.com:carbon-design-system/carbon-www i…
alisonjoseph 7c07971
chore: test
alisonjoseph 265d711
feat: import charts directly to mdx
alisonjoseph 172d2d9
chore: add width and height
alisonjoseph d549525
chore: missing style import
alisonjoseph 9f74f75
chore: simplify demo data files
alisonjoseph b9cfb41
chore: fix
alisonjoseph cbc0a2e
chore: update yarn lock
alisonjoseph 5575cf3
chore: update data
alisonjoseph 5ee6b5a
chore: move data file
alisonjoseph e683c20
Merge pull request #257 from alisonjoseph/charts
alisonjoseph 27b836e
chore: merge master
alisonjoseph 3de74a2
add content Overview/elements
shixiedesign 33f2d49
chore: add card
alisonjoseph 1bab41b
no message
alisonjoseph 9cc985c
add meter & gauge
shixiedesign ae4e1ed
img update
shixiedesign 90e44f9
a few content fixes
shixiedesign 6d917fb
add content / images / h2s
shixiedesign 9b44d3a
feat: add overview card
alisonjoseph 096ff60
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-www…
alisonjoseph 0de1c93
chore: cleanup unused css
alisonjoseph ee98f76
chore: merge master
alisonjoseph ba46107
chore: update content
alisonjoseph 4ebbdd8
chore: update first chart example
alisonjoseph 01d4258
chore: test
alisonjoseph d5bdc1f
image update, content tweaks
shixiedesign 39e6c05
move scatterplot to coorelation
shixiedesign dc63595
add content & horiz bar
shixiedesign 58dbf2d
renamed files
shixiedesign 58ff2ae
chore: add develop pages for data viz
alisonjoseph 78a6531
chore: add dummy content
alisonjoseph b1d3435
docs: copy changes
connor-leech e2d040c
docs: copy tweaks
connor-leech 72dc14e
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech 78645f5
chore: update to latest theme (to get notifications)
alisonjoseph 31f6ca4
fix: tab order
alisonjoseph b71f393
add palette page
shixiedesign 7808ed5
mobile layout sweep
shixiedesign b68119d
chore: merge
alisonjoseph d4f810d
chore: merge from master
alisonjoseph d1018ac
docs: copy clean up
connor-leech 89a96e5
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-www…
alisonjoseph 611995d
chore: fix tab order
alisonjoseph 0bba9ea
mobile sweep
shixiedesign 12e9f62
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
shixiedesign d3c90a0
docs: more copy tweaks
connor-leech 973e018
adv charts img, layout
shixiedesign d5b9e88
resolve palette page conflict
shixiedesign e9a1169
bugfix so page builds
shixiedesign bc57d24
chore: pull upstream
alisonjoseph 661e058
chore: remove old files
alisonjoseph baa3d3f
fix: typo and update to latest theme
alisonjoseph 0c22357
fix: typo
alisonjoseph 43cf5eb
fix: typo
alisonjoseph 21836d8
docs: nav adjustment
connor-leech 4260861
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech 1d9a0bd
anatomy pg mobile style, legend page start
shixiedesign 33d1986
legend continues
shixiedesign 6238054
inline notification set to info
shixiedesign 3bb9125
fix: broken links
alisonjoseph 2ee77ce
legend ends
shixiedesign 4cda5c2
docs: copy tweaks
connor-leech bb508b7
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech 6917c2f
legends img fix
shixiedesign 7aa9f07
notification fix
shixiedesign 22c86df
docs: nav update
connor-leech dadaca3
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech ca12ff6
docs: fix
connor-leech cd7f07e
add datavis getting started instructions & demo updates (#401)
theiliad 0a78a9b
chore: merge master
alisonjoseph c4fc3a9
img update
shixiedesign b3f4bba
dashboard
shixiedesign 94701c6
axislabel start
shixiedesign 71f689f
axis&label
shixiedesign 224d75d
chart types img
shixiedesign 1cd12c0
more chart type img
shixiedesign 3da8ed7
chart type img all
shixiedesign 6878c47
svg tweaks
shixiedesign 2eba762
first 3 pages small fixes
shixiedesign 30f0721
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
theiliad 81e51fa
palette page + tweaks
shixiedesign 6cfa3b8
add scatter demos
theiliad 8873c77
move scatter demo to the right place on page
theiliad 9cf440b
docs: more edits
connor-leech f55e4f8
typo img fix
shixiedesign 7bc180f
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign 1cf4b88
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign 32eb36d
Update src/pages/data-visualization/getting-started/shared-data-optio…
shixiedesign 66de751
Update src/pages/data-visualization/legends/index.mdx
shixiedesign 31b801f
Update src/pages/data-visualization/legends/index.mdx
shixiedesign ce91f10
Update src/pages/data-visualization/legends/index.mdx
shixiedesign c2fc2bf
Update src/pages/data-visualization/legends/index.mdx
shixiedesign d141974
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign 59662a1
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
shixiedesign 8b88812
palette page polish
shixiedesign 29956f3
img sweep legends & axes
shixiedesign eb526a2
mobile imgs
shixiedesign 09c1cab
Merge branch 'data-viz' into data-viz-updates
theiliad 7105141
example charts img pass
shixiedesign 5bf46c6
Update src/pages/data-visualization/axis-and-labels/index.mdx
shixiedesign 2a1a7b2
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech c6f6bfe
Merge pull request #413 from theiliad/data-viz-updates
connor-leech 700c579
Merge branch 'master' into data-viz
connor-leech dfe3623
img clean, chart types fixes
shixiedesign d5d6039
more fixes
shixiedesign c69f20b
img tweaks
shixiedesign 939da61
palette page final + fixes
shixiedesign 87e7f85
mobile img, svg fix
shixiedesign a3f7acd
svg fix
shixiedesign 48966bc
Merge branch 'master' into data-viz
alisonjoseph 795d628
dark palette fix
shixiedesign 36e3eee
Merge branch 'data-viz' of github.com:carbon-design-system/carbon-web…
shixiedesign 35c3637
small fixes, add resource cards
shixiedesign d40e4f0
update charts version to reflect new color palette (#424)
theiliad 0dad004
Update OverviewCard.js
alisonjoseph f24d7f4
Update data-visualization.scss
alisonjoseph 1788b08
Update index.mdx
alisonjoseph 5b59ead
Update src/pages/data-visualization/color-palettes/index.mdx
alisonjoseph 2bceda0
spelling fix
alisonjoseph 683a57d
docs: final copy pass
connor-leech 3131d90
Merge branch 'data-viz' of https://github.com/carbon-design-system/ca…
connor-leech 40803e5
Merge branch 'master' into data-viz
shixiedesign File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import classnames from 'classnames'; | ||
import { Link } from 'gatsby'; | ||
import { Tag } from 'carbon-components-react'; | ||
|
||
export default class OverviewCard extends React.Component { | ||
static propTypes = { | ||
children: PropTypes.node, | ||
|
||
/** | ||
* Add tag | ||
*/ | ||
tag: PropTypes.string, | ||
|
||
/** | ||
* Set url for card | ||
*/ | ||
href: PropTypes.string, | ||
|
||
/** | ||
* LTitle | ||
*/ | ||
title: PropTypes.string, | ||
|
||
/** | ||
* Use for disabled card | ||
*/ | ||
disabled: PropTypes.bool, | ||
|
||
/** | ||
* Specify a custom class | ||
*/ | ||
className: PropTypes.string, | ||
}; | ||
|
||
static defaultProps = { | ||
disabled: false, | ||
}; | ||
|
||
render() { | ||
const { children, href, title, disabled, className, tag } = this.props; | ||
|
||
let isLink; | ||
if (href !== undefined) { | ||
isLink = href.charAt(0) === '/'; | ||
} | ||
|
||
const OverviewCardClassNames = classnames([`overview-card`], { | ||
[className]: className, | ||
[`overview-card--disabled`]: disabled, | ||
}); | ||
|
||
const carbonTileclassNames = classnames( | ||
[`bx--tile`], | ||
[`bx--tile--clickable`] | ||
); | ||
|
||
const cardContent = ( | ||
<> | ||
<h4 className="overview-card__title">{title}</h4> | ||
{tag && <Tag type="teal">{tag}</Tag>} | ||
<div className={`overview-card__img`}>{children}</div> | ||
</> | ||
); | ||
|
||
let cardContainer; | ||
if (disabled === true) { | ||
cardContainer = <div className={carbonTileclassNames}>{cardContent}</div>; | ||
} else if (isLink === true) { | ||
cardContainer = ( | ||
<Link to={href} className={carbonTileclassNames}> | ||
{cardContent} | ||
</Link> | ||
); | ||
} else { | ||
cardContainer = ( | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
href={href} | ||
className={carbonTileclassNames}> | ||
{cardContent} | ||
</a> | ||
); | ||
} | ||
|
||
return ( | ||
<div className={OverviewCardClassNames}> | ||
<div className="bx--aspect-ratio--1x1"> | ||
<div className="bx--aspect-ratio--object">{cardContainer}</div> | ||
</div> | ||
</div> | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import OverviewCard from './OverviewCard'; | ||
|
||
export default OverviewCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.overview-card-group { | ||
margin: $spacing-05 0 $spacing-07; | ||
} | ||
|
||
.overview-card-group .overview-card { | ||
border-top: 1px solid $carbon--gray-20; | ||
border-left: 1px solid $carbon--gray-20; | ||
} | ||
|
||
.overview-card-group .#{$prefix}--col-sm-2:nth-child(-n + 2) .overview-card { | ||
border-top: 0px solid transparent; | ||
} | ||
|
||
@include carbon--breakpoint('md') { | ||
.overview-card-group .#{$prefix}--col-lg-3:nth-child(-n + 4) .overview-card { | ||
border-top: 0px solid transparent; | ||
} | ||
|
||
.overview-card-group .#{$prefix}--col-lg-3:nth-child(4n-7) .overview-card { | ||
border-left: 0px solid transparent; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
.overview-card { | ||
position: relative; | ||
} | ||
|
||
.overview-card .#{$prefix}--tile { | ||
height: 100%; | ||
padding: $spacing-05; | ||
position: relative; | ||
text-decoration: none; | ||
background: $carbon--white-0; | ||
transition: background $transition--base; | ||
display: flex; | ||
justify-content: space-between; | ||
|
||
&:hover { | ||
background: $hover-ui; | ||
} | ||
|
||
&:active { | ||
background: $active-ui; | ||
} | ||
} | ||
|
||
.overview-card__title { | ||
@include carbon--type-style('body-short-01'); | ||
text-decoration: none; | ||
color: $text-01; | ||
position: relative; | ||
z-index: 1; | ||
} | ||
|
||
.overview-card .bx--tag { | ||
margin-top: -0.25rem; | ||
white-space: nowrap; | ||
} | ||
|
||
// Image | ||
.overview-card__img { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
width: 100%; | ||
height: 100%; | ||
overflow: hidden; | ||
} | ||
|
||
.overview-card__img .gatsby-resp-image-wrapper, | ||
.overview-card__img img[src*='svg'], | ||
.overview-card__img img[src*='gif'] { | ||
position: relative; | ||
width: 100%; | ||
height: 100%; | ||
max-width: 100% !important; | ||
top: -1px; | ||
left: -1px; | ||
background: transparent; | ||
} | ||
|
||
.overview-card .#{$prefix}--tile:hover .overview-card__img:after { | ||
opacity: 1; | ||
} | ||
|
||
// Disabled | ||
.overview-card--disabled .#{$prefix}--tile:hover { | ||
background: $carbon--white-0; | ||
cursor: not-allowed; | ||
} | ||
|
||
.overview-card--disabled .overview-card__title { | ||
color: $disabled-03; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to use our
rem()
function here?