Skip to content

Commit 03a90fa

Browse files
tweak timeline tick height and region width
ticks were shown half-height (could code be cleaned up?) region needs to include tick width
1 parent d02b92c commit 03a90fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "dc.graph",
3-
"version": "0.4.2",
3+
"version": "0.4.3",
44
"license": "Apache-2.0",
55
"copyright": "2017",
66
"description": "Graph visualizations integrated with crossfilter and dc.js",

timeline.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function timeline(parent) {
123123
var max = Math.max(_minHeight, d3.max(_events, function(e) {
124124
return e.value[0].key === 'adds' ? Math.max(e.value[0].height, e.value[1].height) : 0;
125125
}));
126-
_y.domain([max, -max]).range([0, bl]);
126+
_y.domain([max, -max]).range([0, _height]);
127127

128128
var axis = _g.selectAll('rect.timeline').data([0]);
129129
axis.enter().append('rect').attr('class', 'timeline');
@@ -143,7 +143,7 @@ function timeline(parent) {
143143
},
144144
y: 0,
145145
width: function(d) {
146-
return _x(d.x2) - _x(d.x1);
146+
return _x(d.x2) - _x(d.x1) + _tickWidth;
147147
},
148148
height: _height,
149149
fill: _region && _region.color || 'blue',

0 commit comments

Comments
 (0)