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

UI/bar chart horizontal #12437

Merged
merged 51 commits into from Sep 7, 2021
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
20eef6a
creates bar chart component
hellobontempo Aug 16, 2021
9c28a8b
WIP//starts styling
hellobontempo Aug 16, 2021
8b6251d
Merge branch 'main' into ui/bar-chart-horizontal
hellobontempo Aug 16, 2021
3095db0
fixes width of bars
hellobontempo Aug 16, 2021
0ec54d1
WIP//barchart
hellobontempo Aug 16, 2021
8f3b735
uses d3 max method instead of Math.max
hellobontempo Aug 17, 2021
0f03ffc
stacks data
hellobontempo Aug 17, 2021
83af87e
adds y axis
hellobontempo Aug 17, 2021
3611871
fixes styling and spacing
hellobontempo Aug 19, 2021
5f42ea6
adds spacing between bars
hellobontempo Aug 19, 2021
704bdfd
styling DONE
hellobontempo Aug 20, 2021
238d6ec
adds legend
hellobontempo Aug 20, 2021
3d96d6b
adds tooltip
hellobontempo Aug 20, 2021
9c7b764
tweaks styling adds pointer cursor to rects
hellobontempo Aug 20, 2021
05a1619
fixes tooltip placement
hellobontempo Aug 23, 2021
b54fa3c
moves starget from bar to whole area
hellobontempo Aug 23, 2021
e76666f
finishes hover selection styling
hellobontempo Aug 23, 2021
45f8192
cleans up
hellobontempo Aug 23, 2021
50dec44
cleans up a tiny bit
hellobontempo Aug 23, 2021
f747f89
stopping point
hellobontempo Aug 23, 2021
655cf01
adjusts tooltip placemnt
hellobontempo Aug 24, 2021
addc811
WIP//clean up time
hellobontempo Aug 24, 2021
64a1d90
sort of not broken
hellobontempo Aug 25, 2021
f07c9bd
unbroken, ish
hellobontempo Aug 26, 2021
373802e
tooltip position fixed
hellobontempo Aug 26, 2021
bdd4467
truncates text and adds tooltip
hellobontempo Aug 26, 2021
00fdd6c
changes tooltip width depending on content
hellobontempo Aug 27, 2021
79cdc3c
unbroken
hellobontempo Aug 27, 2021
18f8076
finishes initial refactor/cleanup
hellobontempo Aug 27, 2021
ad10d12
finishes documentation
hellobontempo Aug 28, 2021
95f5603
passes in map legend to component
hellobontempo Aug 28, 2021
684a302
more tidying
hellobontempo Aug 28, 2021
caa2a4a
add export option
hellobontempo Aug 30, 2021
4e2f168
Merge branch 'main' into ui/bar-chart-horizontal
hellobontempo Aug 30, 2021
e37ac0e
adds grid to header for export button option
hellobontempo Aug 30, 2021
b0aa9d5
updates comments
hellobontempo Aug 30, 2021
9802437
fix variable name change
hellobontempo Aug 30, 2021
461ee0f
moves dataset formatting to parent
hellobontempo Aug 30, 2021
f09efc6
removes unused code"
hellobontempo Aug 30, 2021
c7dd44b
adds assertions and empty state if no data
hellobontempo Aug 31, 2021
9c8aaa0
cleans up comments adds assertion to check for map legend
hellobontempo Aug 31, 2021
987125f
adds storybook
hellobontempo Sep 1, 2021
ec674a8
adds changelog
hellobontempo Sep 1, 2021
fa8099f
deletes dummy parent:
hellobontempo Sep 1, 2021
70bf01b
restores index.hbs
hellobontempo Sep 1, 2021
99a9170
uses scss variables instead
hellobontempo Sep 1, 2021
4f9d678
exchanges more variables
hellobontempo Sep 1, 2021
07e3b2b
Merge branch 'main' into ui/bar-chart-horizontal
hellobontempo Sep 1, 2021
3d4793e
remove unused variable in storybook
hellobontempo Sep 3, 2021
fab0db2
writes basic test
hellobontempo Sep 3, 2021
f936641
removes pauseTest()
hellobontempo Sep 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/12437.txt
@@ -0,0 +1,3 @@
```release-note:feature
ui: creates bar chart component for displaying client count data by namespace
```
68 changes: 68 additions & 0 deletions ui/app/styles/components/bar-chart.scss
@@ -0,0 +1,68 @@
.bar-chart-wrapper {
border: $light-border;
border-radius: $radius-large;
padding: $spacing-l $spacing-l $spacing-s $spacing-l;
height: 100%;
width: 100%;

> div.is-border {
border: 0.3px solid $ui-gray-200;
width: 94%;
margin-left: 3%;
margin-bottom: $spacing-xxs;
}
}

.chart-header {
margin-left: $spacing-l;
display: grid;
grid-template-columns: 3fr 1fr;

.header-left {
.chart-title {
font-size: $size-5;
font-weight: $font-weight-bold;
line-height: normal;
}

.chart-description {
font-size: $size-8;
font-weight: $font-weight-normal;
color: $ui-gray-700;
margin-bottom: $spacing-xs;
}
}

.header-right {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.header-right is where anything passed into the block is yielded (i.e. an export button). Should this styling be less specific since the button is no longer part of this component?

text-align: center;

> button {
font-size: $size-8;

&:hover {
text-decoration: underline;
}
}
}
}

.bar-chart-container {
padding: $spacing-m $spacing-l $spacing-m $spacing-l;
}

.bar-chart {
.tick > text {
font-weight: $font-weight-semibold;
font-size: $size-8;
}
}

.legend-container {
height: $spacing-l;
margin-top: $spacing-xs;
}

.legend {
width: 100%;
height: 100%;
}
1 change: 1 addition & 0 deletions ui/app/styles/core.scss
Expand Up @@ -45,6 +45,7 @@
@import './components/auth-buttons';
@import './components/auth-form';
@import './components/b64-toggle';
@import './components/bar-chart';
@import './components/box-label';
@import './components/box-radio';
@import './components/codemirror';
Expand Down