@evergis/charts 3.0.25 → 3.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/charts.esm.js
CHANGED
|
@@ -2661,15 +2661,16 @@ const resizeBarWidth = _ref => {
|
|
|
2661
2661
|
return barWidth;
|
|
2662
2662
|
};
|
|
2663
2663
|
|
|
2664
|
+
const MIN_BAR_HEIGHT = 2;
|
|
2664
2665
|
const getBars = _ref => {
|
|
2665
2666
|
let {
|
|
2666
2667
|
groups,
|
|
2667
2668
|
barWidth
|
|
2668
2669
|
} = _ref;
|
|
2669
|
-
return groups.selectAll('rect').data(item => item).join('rect').attr('x', item => item.x).attr('y', item => item.y).attr('width', barWidth).attr('height', item => item.height).style('fill', item => item.color);
|
|
2670
|
+
return groups.selectAll('rect').data(item => item).join('rect').attr('x', item => item.x).attr('y', item => item.y).attr('width', barWidth).attr('height', item => item.value === null ? 0 : Math.max(item.height, MIN_BAR_HEIGHT)).style('fill', item => item.color);
|
|
2670
2671
|
};
|
|
2671
2672
|
|
|
2672
|
-
const MIN_BAR_HEIGHT = 2;
|
|
2673
|
+
const MIN_BAR_HEIGHT$1 = 2;
|
|
2673
2674
|
const draw$4 = (node, props) => {
|
|
2674
2675
|
const {
|
|
2675
2676
|
data,
|
|
@@ -2817,7 +2818,7 @@ const draw$4 = (node, props) => {
|
|
|
2817
2818
|
});
|
|
2818
2819
|
xAxis.attr('transform', "translate(0, " + (yScale(yTicks[0]) + (xAxisPadding || 0)) + ")");
|
|
2819
2820
|
const maskId = "height-limit-mask-" + uniqueId();
|
|
2820
|
-
svg.append('defs').append('mask').attr('id', maskId).append('rect').attr('width', '100%').attr('height', height - marginBottom + MIN_BAR_HEIGHT).attr('fill', 'white');
|
|
2821
|
+
svg.append('defs').append('mask').attr('id', maskId).append('rect').attr('width', '100%').attr('height', height - marginBottom + MIN_BAR_HEIGHT$1).attr('fill', 'white');
|
|
2821
2822
|
const gSvg = svg.append('g').attr('class', barChartClassNames.barChartBarGlobal).attr('mask', "url(#" + maskId + ")");
|
|
2822
2823
|
const groups = gSvg.selectAll('g').data(marshalledData).enter().append('g').attr('transform', (_, i) => "translate(" + Math.round(xScale(i)) + "," + -(marginTop || 0) + ")");
|
|
2823
2824
|
const bars = drawBars ? drawBars({
|