@density/chart-historical-counts
Advanced tools
Comparing version 1.3.0 to 1.3.1
@@ -62,8 +62,8 @@ const axisYMaximumLineDashWidth = 2; | ||
// Render a dotted line at the top-most item in the y axis. | ||
yAxisEnterSelectionGroup.select('.axis-y-maximum-line') | ||
.attr('y', scale(largestCount)) | ||
.attr('d', `M0,0${(function(graphWidth) { | ||
const maximumLineYPos = scale(largestCount) - 2; | ||
yAxisMergeSelection.select('.axis-y-maximum-line') | ||
.attr('d', `M0,${maximumLineYPos} ${(function(graphWidth) { | ||
let linePath = ''; | ||
for (let i = 0; i < graphWidth; i += axisYMaximumLineDashWidth + axisYMaximumLineDashSpacing) { | ||
linePath += `H${i+axisYMaximumLineDashWidth} M${i+axisYMaximumLineDashWidth+axisYMaximumLineDashSpacing},0`; | ||
linePath += `H${i+axisYMaximumLineDashWidth} M${i+axisYMaximumLineDashWidth+axisYMaximumLineDashSpacing},${maximumLineYPos}`; | ||
} | ||
@@ -70,0 +70,0 @@ return linePath; |
@@ -45,6 +45,7 @@ 'use strict'; | ||
// Render a dotted line at the top-most item in the y axis. | ||
yAxisEnterSelectionGroup.select('.axis-y-maximum-line').attr('y', scale(largestCount)).attr('d', 'M0,0' + function (graphWidth) { | ||
var maximumLineYPos = scale(largestCount) - 2; | ||
yAxisMergeSelection.select('.axis-y-maximum-line').attr('d', 'M0,' + maximumLineYPos + ' ' + function (graphWidth) { | ||
var linePath = ''; | ||
for (var i = 0; i < graphWidth; i += axisYMaximumLineDashWidth + axisYMaximumLineDashSpacing) { | ||
linePath += 'H' + (i + axisYMaximumLineDashWidth) + ' M' + (i + axisYMaximumLineDashWidth + axisYMaximumLineDashSpacing) + ',0'; | ||
linePath += 'H' + (i + axisYMaximumLineDashWidth) + ' M' + (i + axisYMaximumLineDashWidth + axisYMaximumLineDashSpacing) + ',' + maximumLineYPos; | ||
} | ||
@@ -51,0 +52,0 @@ return linePath; |
{ | ||
"name": "@density/chart-historical-counts", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Historical Counts chart", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
608051
1937