@carbon/charts
Advanced tools
Comparing version 0.15.3 to 0.15.4
@@ -45,3 +45,3 @@ import { ScaleBand, ScaleLinear } from "d3-scale"; | ||
/** | ||
* Draws the background for the chart grid | ||
* Draws the background for the chart grid. Uses the axis to get the bounds and position of the backdrop. | ||
*/ | ||
@@ -48,0 +48,0 @@ drawBackdrop(): void; |
@@ -164,2 +164,3 @@ var __extends = (this && this.__extends) || (function () { | ||
this.dispatchEvent("resize"); | ||
this.drawBackdrop(); | ||
}; | ||
@@ -403,14 +404,13 @@ /************************************** | ||
/** | ||
* Draws the background for the chart grid | ||
* Draws the background for the chart grid. Uses the axis to get the bounds and position of the backdrop. | ||
*/ | ||
BaseAxisChart.prototype.drawBackdrop = function () { | ||
// Get height from the grid | ||
var xGridHeight = this.innerWrap.select(".x.grid").node().getBBox().height; | ||
var yGridBBox = this.innerWrap.select(".y.grid").node().getBBox(); | ||
var backdrop = Tools.appendOrSelect(this.innerWrap, "rect.chart-grid-backdrop"); | ||
var _a = this.x.range(), xScaleStart = _a[0], xScaleEnd = _a[1]; | ||
var _b = this.y.range(), yScaleEnd = _b[0], yScaleStart = _b[1]; | ||
backdrop | ||
.attr("x", yGridBBox.x) | ||
.attr("y", yGridBBox.y) | ||
.attr("width", yGridBBox.width) | ||
.attr("height", xGridHeight) | ||
.attr("x", xScaleStart) | ||
.attr("y", yScaleStart) | ||
.attr("width", xScaleEnd) | ||
.attr("height", yScaleEnd) | ||
.lower(); | ||
@@ -514,5 +514,2 @@ }; | ||
} | ||
// use the set timeout to queue drawing the backdrop after the X and Y Grid have properly updated | ||
// needed because there is a settimeout for repositioning the grid, this needs to run after that | ||
setTimeout(function () { return _this.drawBackdrop(); }, 0); | ||
}, 0); | ||
@@ -519,0 +516,0 @@ }; |
@@ -6,2 +6,10 @@ # Change Log | ||
## [0.15.3](https://github.com/IBM/carbon-charts/compare/v0.15.2...v0.15.3) (2019-08-16) | ||
**Note:** Version bump only for package @carbon/charts | ||
## [0.15.2](https://github.com/IBM/carbon-charts/compare/v0.15.1...v0.15.2) (2019-08-12) | ||
@@ -8,0 +16,0 @@ |
{ | ||
"name": "@carbon/charts", | ||
"version": "0.15.2", | ||
"version": "0.15.3", | ||
"description": "Carbon charting components", | ||
@@ -5,0 +5,0 @@ "main": "./index.umd.js", |
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
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
2015329
6499