@hpcc-js/chart
Advanced tools
Comparing version 2.82.0 to 2.83.1
{ | ||
"name": "@hpcc-js/chart", | ||
"version": "2.82.0", | ||
"version": "2.83.1", | ||
"description": "hpcc-js - Viz Chart", | ||
@@ -81,3 +81,3 @@ "main": "dist/index.js", | ||
"homepage": "https://github.com/hpcc-systems/Visualization", | ||
"gitHead": "58c474637fb65e0e0f7b22601b283df5fc77f0bd" | ||
"gitHead": "fed2428e5cdf328d07d8b5521e0ab9c18e2044fb" | ||
} |
export const PKG_NAME = "@hpcc-js/chart"; | ||
export const PKG_VERSION = "2.82.0"; | ||
export const BUILD_VERSION = "2.105.0"; | ||
export const PKG_VERSION = "2.83.1"; | ||
export const BUILD_VERSION = "2.105.2"; |
@@ -314,2 +314,3 @@ import { publish, SVGWidget } from "@hpcc-js/common"; | ||
} | ||
this.d3Axis | ||
@@ -554,3 +555,4 @@ .scale(this.d3Scale) | ||
const lowerPos: number = this.isHorizontal() ? overlap.left : this.height() - overlap.top - overlap.bottom; | ||
const upperPos: number = this.isHorizontal() ? this.width() - overlap.right : 0; | ||
const upperPos: number = this.isHorizontal() ? this.width() - overlap.right - this.padding() : 0 + this.padding(); | ||
this.range(this.reverse() ? [upperPos, lowerPos] : [lowerPos, upperPos]); | ||
@@ -708,2 +710,4 @@ | ||
ordinalMappings_exists(): boolean; | ||
padding(): number; | ||
padding(_: number): this; | ||
} | ||
@@ -732,1 +736,2 @@ | ||
Axis.prototype.publish("ordinalMappings", null, "object", "Alternative label mappings (icons)", null, { optional: true }); | ||
Axis.prototype.publish("padding", 0, "number", "Padding space at top of axis (pixels)", null, { optional: true }); |
@@ -91,2 +91,3 @@ import { INDChart, ITooltip } from "@hpcc-js/api"; | ||
} | ||
const formatPct = d3Format(context.showValueAsPercentFormat()); | ||
@@ -206,7 +207,7 @@ let dataLen = 10; | ||
const seriesSum = typeof dm.sum !== "undefined" ? dm.sum : seriesSums[d.idx]; | ||
valueText = d3Format(context.showValueAsPercentFormat())(valueText / seriesSum); | ||
valueText = formatPct(valueText / seriesSum); | ||
break; | ||
case "domain": | ||
const domainSum = typeof dm.sum !== "undefined" ? dm.sum : domainSums[d.idx - 1]; | ||
valueText = d3Format(context.showValueAsPercentFormat())(valueText / domainSum); | ||
const domainSum = typeof dm.sum !== "undefined" ? dm.sum : domainSums[dataRowIdx]; | ||
valueText = formatPct(valueText / domainSum); | ||
break; | ||
@@ -361,3 +362,3 @@ case null: | ||
if (isHorizontal) { // Column | ||
noRoomInside = context.yAxisStacked() ? false : dataRect.height < textSize.height; | ||
noRoomInside = dataRect.height < textSize.height; | ||
isOutside = !context.valueCentered() || noRoomInside; | ||
@@ -397,3 +398,3 @@ | ||
} else { // Bar | ||
noRoomInside = context.yAxisStacked() ? false : dataRect.width < textSize.width; | ||
noRoomInside = dataRect.width < textSize.width; | ||
isOutside = !context.valueCentered() || noRoomInside; | ||
@@ -438,3 +439,4 @@ | ||
const columns = context.columns(); | ||
const hideValue = isOutside && context.yAxisStacked() && columns.indexOf(d.column) !== columns.length - 1; | ||
const hideValue = (context.yAxisStacked() && noRoomInside) || | ||
(isOutside && context.yAxisStacked() && columns.indexOf(d.column) !== columns.length - 1); | ||
context.textLocal.get(this) | ||
@@ -441,0 +443,0 @@ .pos(pos) |
@@ -753,2 +753,6 @@ import { d3Event, select as d3Select, SVGWidget, Utility } from "@hpcc-js/common"; | ||
layers(_: XYAxis[]): this; | ||
xAxisPadding(): number; | ||
xAxisPadding(_: number): this; | ||
yAxisPadding(): number; | ||
yAxisPadding(_: number): this; | ||
} | ||
@@ -799,1 +803,3 @@ | ||
XYAxis.prototype.publish("layers", [], "widgetArray", "Layers", null, { render: false }); | ||
XYAxis.prototype.publishProxy("xAxisPadding", "domainAxis", "padding"); | ||
XYAxis.prototype.publishProxy("yAxisPadding", "valueAxis", "padding"); |
export declare const PKG_NAME = "@hpcc-js/chart"; | ||
export declare const PKG_VERSION = "2.82.0"; | ||
export declare const BUILD_VERSION = "2.105.0"; | ||
export declare const PKG_VERSION = "2.83.1"; | ||
export declare const BUILD_VERSION = "2.105.2"; | ||
//# sourceMappingURL=__package__.d.ts.map |
@@ -177,3 +177,5 @@ import { publish, SVGWidget } from "@hpcc-js/common"; | ||
ordinalMappings_exists(): boolean; | ||
padding(): number; | ||
padding(_: number): this; | ||
} | ||
//# sourceMappingURL=Axis.d.ts.map |
@@ -176,3 +176,7 @@ import { SVGWidget, Utility } from "@hpcc-js/common"; | ||
layers(_: XYAxis[]): this; | ||
xAxisPadding(): number; | ||
xAxisPadding(_: number): this; | ||
yAxisPadding(): number; | ||
yAxisPadding(_: number): this; | ||
} | ||
//# sourceMappingURL=XYAxis.d.ts.map |
export declare const PKG_NAME = "@hpcc-js/chart"; | ||
export declare const PKG_VERSION = "2.82.0"; | ||
export declare const BUILD_VERSION = "2.105.0"; | ||
export declare const PKG_VERSION = "2.83.1"; | ||
export declare const BUILD_VERSION = "2.105.2"; | ||
//# sourceMappingURL=__package__.d.ts.map |
@@ -177,3 +177,5 @@ import { publish, SVGWidget } from "@hpcc-js/common"; | ||
ordinalMappings_exists(): boolean; | ||
padding(): number; | ||
padding(_: number): this; | ||
} | ||
//# sourceMappingURL=Axis.d.ts.map |
@@ -176,3 +176,7 @@ import { SVGWidget, Utility } from "@hpcc-js/common"; | ||
layers(_: XYAxis[]): this; | ||
xAxisPadding(): number; | ||
xAxisPadding(_: number): this; | ||
yAxisPadding(): number; | ||
yAxisPadding(_: number): this; | ||
} | ||
//# sourceMappingURL=XYAxis.d.ts.map |
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 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
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
4524476
32143