Skip to content

Commit dbd3c83

Browse files
committed
added fontawesome date icons, fixed 99.9% label
1 parent d1161c6 commit dbd3c83

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

scout-ui/src/minicharts/d3fns/date.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ module.exports = function(opts) {
134134
});
135135

136136
var weekdayContainer = svg.append('g');
137+
137138
many(weekdays, weekdayContainer, width / (upperRatio + 1) - upperMargin, upperBarBottom, {
138139
bgbars: true,
139140
labels: {
@@ -144,6 +145,17 @@ module.exports = function(opts) {
144145
}
145146
});
146147

148+
// calendar icon
149+
weekdayContainer.append('text')
150+
.attr('class', 'date-icon fa-fw')
151+
.attr('x', 0)
152+
.attr('dx', '-0.6em')
153+
.attr('y', 0)
154+
.attr('dy', '1em')
155+
.attr('text-anchor', 'end')
156+
.attr('font-family', 'FontAwesome')
157+
.text('\uf133');
158+
147159
var hourContainer = svg.append('g')
148160
.attr('transform', 'translate(' + (width / (upperRatio + 1) + upperMargin) + ', 0)');
149161

@@ -156,5 +168,16 @@ module.exports = function(opts) {
156168
}
157169
});
158170

171+
// clock icon
172+
hourContainer.append('text')
173+
.attr('class', 'date-icon fa-fw')
174+
.attr('x', 0)
175+
.attr('dx', '-0.6em')
176+
.attr('y', 0)
177+
.attr('dy', '1em')
178+
.attr('text-anchor', 'end')
179+
.attr('font-family', 'FontAwesome')
180+
.text('\uf017');
181+
159182
};
160183

scout-ui/src/minicharts/d3fns/many.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = function(data, g, width, height, options) {
7878
.attr('y', height)
7979
.attr('dy', '0.3em')
8080
.attr('text-anchor', 'end')
81-
.text('99.9%');
81+
.text('0%');
8282

8383
legend.append('line')
8484
.attr('class', 'bg legend')

0 commit comments

Comments
 (0)