@gravity-ui/charts 1.49.0 → 1.49.1

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.
@@ -26,7 +26,8 @@ async function getSvgAxisLabel({ getTextSize, text, axis, top, left, labelMaxWid
26
26
  else {
27
27
  textMaxWidth = Math.min(axis.labels.height / calculateSin(a) - textSize.height * calculateSin(90 - a),
28
28
  // leftmost label: may extend into the left Y-axis area but not into the left margin
29
- (boundsOffsetLeft - chartMarginLeft + left) / calculateSin(a));
29
+ // subtract textSize.height / 2 to account for the height component in the x calculation
30
+ (boundsOffsetLeft - chartMarginLeft + left) / calculateSin(a) - textSize.height / 2);
30
31
  }
31
32
  if (textSize.width > textMaxWidth) {
32
33
  rowText = await getTextWithElipsis({
@@ -40,7 +40,7 @@ export interface BasicHoverState {
40
40
  export interface BasicInactiveState {
41
41
  /**
42
42
  * Enable separate styles for the inactive series.
43
- * @default true
43
+ * @default false for most series types; true for radar
44
44
  */
45
45
  enabled?: boolean;
46
46
  /**
@@ -207,12 +207,12 @@ export interface ChartSeriesOptions {
207
207
  dashStyle?: DashStyle;
208
208
  /**
209
209
  * Options for line cap style
210
- * @default 'round' when dashStyle is not 'solid', 'none' when dashStyle is not 'solid'
210
+ * @default 'round' when dashStyle is 'Solid', 'none' when dashStyle is not 'Solid'
211
211
  */
212
212
  linecap?: `${LineCap}`;
213
213
  /**
214
214
  * Defines the shape to be used at the corners of the line
215
- * @default 'round' when dashStyle is not 'solid', 'unset' when dashStyle is not 'solid'
215
+ * @default 'round' when dashStyle is 'Solid', 'unset' when dashStyle is not 'Solid'
216
216
  */
217
217
  linejoin?: `${LineJoin}`;
218
218
  /** Default annotation settings for all line data points */
@@ -26,7 +26,8 @@ async function getSvgAxisLabel({ getTextSize, text, axis, top, left, labelMaxWid
26
26
  else {
27
27
  textMaxWidth = Math.min(axis.labels.height / calculateSin(a) - textSize.height * calculateSin(90 - a),
28
28
  // leftmost label: may extend into the left Y-axis area but not into the left margin
29
- (boundsOffsetLeft - chartMarginLeft + left) / calculateSin(a));
29
+ // subtract textSize.height / 2 to account for the height component in the x calculation
30
+ (boundsOffsetLeft - chartMarginLeft + left) / calculateSin(a) - textSize.height / 2);
30
31
  }
31
32
  if (textSize.width > textMaxWidth) {
32
33
  rowText = await getTextWithElipsis({
@@ -40,7 +40,7 @@ export interface BasicHoverState {
40
40
  export interface BasicInactiveState {
41
41
  /**
42
42
  * Enable separate styles for the inactive series.
43
- * @default true
43
+ * @default false for most series types; true for radar
44
44
  */
45
45
  enabled?: boolean;
46
46
  /**
@@ -207,12 +207,12 @@ export interface ChartSeriesOptions {
207
207
  dashStyle?: DashStyle;
208
208
  /**
209
209
  * Options for line cap style
210
- * @default 'round' when dashStyle is not 'solid', 'none' when dashStyle is not 'solid'
210
+ * @default 'round' when dashStyle is 'Solid', 'none' when dashStyle is not 'Solid'
211
211
  */
212
212
  linecap?: `${LineCap}`;
213
213
  /**
214
214
  * Defines the shape to be used at the corners of the line
215
- * @default 'round' when dashStyle is not 'solid', 'unset' when dashStyle is not 'solid'
215
+ * @default 'round' when dashStyle is 'Solid', 'unset' when dashStyle is not 'Solid'
216
216
  */
217
217
  linejoin?: `${LineJoin}`;
218
218
  /** Default annotation settings for all line data points */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/charts",
3
- "version": "1.49.0",
3
+ "version": "1.49.1",
4
4
  "description": "A flexible JavaScript library for data visualization and chart rendering using React",
5
5
  "license": "MIT",
6
6
  "main": "dist/cjs/index.js",