@gravity-ui/charts 1.28.1 → 1.28.2
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.
|
@@ -275,6 +275,9 @@ export function createXScale(args) {
|
|
|
275
275
|
if (typeof xMinPropsOrState === 'number' && !isPointDomain) {
|
|
276
276
|
xMin = xMinPropsOrState;
|
|
277
277
|
}
|
|
278
|
+
else if (xType === 'logarithmic') {
|
|
279
|
+
xMin = xMinDomain;
|
|
280
|
+
}
|
|
278
281
|
else {
|
|
279
282
|
const xMinDefault = getDefaultMinXAxisValue(series);
|
|
280
283
|
xMin = xMinDefault !== null && xMinDefault !== void 0 ? xMinDefault : xMinDomain;
|
|
@@ -5,7 +5,7 @@ import { getFormattedValue } from '../../../utils/chart/format';
|
|
|
5
5
|
import { getBarYLayout, groupBarYDataByYValue } from '../../utils';
|
|
6
6
|
export async function prepareBarYData(args) {
|
|
7
7
|
var _a;
|
|
8
|
-
const { boundsHeight, boundsWidth, series, seriesOptions, yAxis, xScale, yScale: [yScale], } = args;
|
|
8
|
+
const { boundsHeight, boundsWidth, series, seriesOptions, xAxis, yAxis, xScale, yScale: [yScale], } = args;
|
|
9
9
|
const stackGap = seriesOptions['bar-y'].stackGap;
|
|
10
10
|
const xLinearScale = xScale;
|
|
11
11
|
const yLinearScale = yScale;
|
|
@@ -43,7 +43,8 @@ export async function prepareBarYData(args) {
|
|
|
43
43
|
const stacks = Object.values(val);
|
|
44
44
|
const currentBarHeight = barSize * stacks.length + barGap * (stacks.length - 1);
|
|
45
45
|
stacks.forEach((measureValues, groupItemIndex) => {
|
|
46
|
-
const
|
|
46
|
+
const baseValue = xAxis.type === 'logarithmic' ? 0 : xLinearScale(0);
|
|
47
|
+
const base = baseValue - measureValues[0].series.borderWidth;
|
|
47
48
|
let stackSum = base;
|
|
48
49
|
const stackItems = [];
|
|
49
50
|
const sortedData = sortKey
|
|
@@ -275,6 +275,9 @@ export function createXScale(args) {
|
|
|
275
275
|
if (typeof xMinPropsOrState === 'number' && !isPointDomain) {
|
|
276
276
|
xMin = xMinPropsOrState;
|
|
277
277
|
}
|
|
278
|
+
else if (xType === 'logarithmic') {
|
|
279
|
+
xMin = xMinDomain;
|
|
280
|
+
}
|
|
278
281
|
else {
|
|
279
282
|
const xMinDefault = getDefaultMinXAxisValue(series);
|
|
280
283
|
xMin = xMinDefault !== null && xMinDefault !== void 0 ? xMinDefault : xMinDomain;
|
|
@@ -5,7 +5,7 @@ import { getFormattedValue } from '../../../utils/chart/format';
|
|
|
5
5
|
import { getBarYLayout, groupBarYDataByYValue } from '../../utils';
|
|
6
6
|
export async function prepareBarYData(args) {
|
|
7
7
|
var _a;
|
|
8
|
-
const { boundsHeight, boundsWidth, series, seriesOptions, yAxis, xScale, yScale: [yScale], } = args;
|
|
8
|
+
const { boundsHeight, boundsWidth, series, seriesOptions, xAxis, yAxis, xScale, yScale: [yScale], } = args;
|
|
9
9
|
const stackGap = seriesOptions['bar-y'].stackGap;
|
|
10
10
|
const xLinearScale = xScale;
|
|
11
11
|
const yLinearScale = yScale;
|
|
@@ -43,7 +43,8 @@ export async function prepareBarYData(args) {
|
|
|
43
43
|
const stacks = Object.values(val);
|
|
44
44
|
const currentBarHeight = barSize * stacks.length + barGap * (stacks.length - 1);
|
|
45
45
|
stacks.forEach((measureValues, groupItemIndex) => {
|
|
46
|
-
const
|
|
46
|
+
const baseValue = xAxis.type === 'logarithmic' ? 0 : xLinearScale(0);
|
|
47
|
+
const base = baseValue - measureValues[0].series.borderWidth;
|
|
47
48
|
let stackSum = base;
|
|
48
49
|
const stackItems = [];
|
|
49
50
|
const sortedData = sortKey
|