d3-trial-line
Advanced tools
Comparing version 1.0.1 to 1.1.0
16
index.js
@@ -129,2 +129,18 @@ import { select as d3select, | ||
if (!this.enableAxis) return | ||
const { xScale, yScale, xAxis, yAxis, axisPadding } = this | ||
const [w, h] = this.dimensions() | ||
xScale.domain(d3extent(data, d => d.bin)) | ||
yScale.domain(d3extent(data, d => d.value)) | ||
this.chart.append('g') | ||
.attr('class', 'x axis') | ||
.attr('transform', `translate(0, ${h + axisPadding})`) | ||
.call(xAxis) | ||
this.chart.append('g') | ||
.attr('class', 'y axis') | ||
.attr('transform', `translate(${-axisPadding}, 0)`) | ||
.call(yAxis) | ||
} | ||
@@ -131,0 +147,0 @@ |
{ | ||
"name": "d3-trial-line", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "D3 trial line chart", | ||
@@ -10,3 +10,4 @@ "main": "index.js", | ||
"test": "test", | ||
"install": "npm run build" | ||
"install": "npm run build", | ||
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags" | ||
}, | ||
@@ -13,0 +14,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8119
207