trackforce-nvd3
Advanced tools
Comparing version 1.9.3 to 1.9.4
{ | ||
"name": "trackforce-nvd3", | ||
"version": "1.9.3", | ||
"version": "1.9.4", | ||
"description": "A reusable charting library written in d3.js", | ||
@@ -12,3 +12,3 @@ "url": "https://github.com/anjmao/nvd3", | ||
"build:ts": "rm -rf ts-out && tsc", | ||
"release": "yarn build:ts && grunt release" | ||
"release": "grunt release" | ||
}, | ||
@@ -15,0 +15,0 @@ "repository": { |
@@ -31,2 +31,3 @@ nv.models.multiChart = function () { | ||
showValues = false, | ||
valueFormat = d3.format(',.1f'), | ||
interactiveLayer = nv.interactiveGuideline(), | ||
@@ -141,6 +142,6 @@ useInteractiveGuideline = false, | ||
x.domain(d3.extent(d3.merge(series1.concat(series2)), function (d) { | ||
return d.x | ||
})) | ||
.range([0, availableWidth]); | ||
x.domain(d3.extent(d3.merge(series1.concat(series2)), function (d) { | ||
return d.x | ||
})) | ||
.range([0, availableWidth]); | ||
@@ -590,16 +591,13 @@ var wrap = container.selectAll('g.wrap.multiChart').data([data]); | ||
.forEach(function (series, i) { | ||
var extent = x.domain(); | ||
var currentValues = series.values.filter(function (d, i) { | ||
return chart.x()(d, i) >= extent[0] && chart.x()(d, i) <= extent[1]; | ||
}); | ||
var currentValues = series.values; | ||
pointIndex = nv.interactiveBisect(currentValues, e.pointXValue, chart.x()); | ||
pointIndex = e.pointXValue;; | ||
var point = currentValues[pointIndex]; | ||
var pointYValue = chart.y()(point, pointIndex); | ||
if (pointYValue !== null && !isNaN(pointYValue) && !series.noHighlightSeries) { | ||
highlightPoint(series, pointIndex, true); | ||
} | ||
if (point === undefined) return; | ||
if (singlePoint === undefined) singlePoint = point; | ||
if (pointXLocation === undefined) pointXLocation = x(chart.x()(point, pointIndex)); | ||
if (pointXLocation === undefined) { | ||
pointXLocation = x(chart.x()(point, pointIndex)) + x.rangeBand() / 2; | ||
} | ||
allData.push({ | ||
@@ -733,6 +731,4 @@ key: series.key, | ||
showValues: { | ||
get: function () { | ||
return showValues; | ||
}, | ||
set: function (_) { | ||
get: () => showValues, | ||
set: (_) => { | ||
showValues = _; | ||
@@ -743,2 +739,10 @@ bars1.showValues(_); | ||
}, | ||
valueFormat: { | ||
get: () => valueFormat, | ||
set: (_) => { | ||
valueFormat = _; | ||
bars1.valueFormat(_); | ||
bars2.valueFormat(_); | ||
} | ||
}, | ||
xScale: { | ||
@@ -745,0 +749,0 @@ get: function () { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
7227785
48717