From e90e518786e8a0d9af6fd11d69ed96f302287e9d Mon Sep 17 00:00:00 2001 From: "iMoses (Ido Moshe)" Date: Fri, 28 Jun 2024 17:18:17 +0100 Subject: [PATCH] Type fixes --- .../chart/series/cartesian/bubbleSeriesProperties.ts | 4 ++-- .../src/series/range-bar/rangeBarProperties.ts | 6 +++--- .../src/series/cartesian/bubbleOptions.ts | 8 ++++---- .../src/series/cartesian/heatmapOptions.ts | 2 +- .../src/series/cartesian/rangeBarOptions.ts | 10 +++++----- .../_examples/horizontal-range-bar-with-labels/main.ts | 2 +- .../gallery/_examples/range-bar-with-labels/main.ts | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesProperties.ts b/packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesProperties.ts index fe560dd4b8..289af50552 100644 --- a/packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesProperties.ts +++ b/packages/ag-charts-community/src/chart/series/cartesian/bubbleSeriesProperties.ts @@ -2,7 +2,7 @@ import type { AgBubbleSeriesLabelFormatterParams, AgBubbleSeriesOptions, AgBubbleSeriesOptionsKeys, - AgBubbleSeriesStyles, + AgBubbleSeriesStyle, AgBubbleSeriesTooltipRendererParams, BubbleSeriesItemStylerParams, LabelPlacement, @@ -126,7 +126,7 @@ export class BubbleSeriesProperties extends CartesianSeriesProperties, AgBubbleSeriesStyles>; + itemStyler?: Styler, AgBubbleSeriesStyle>; @Validate(OBJECT) readonly label = new BubbleSeriesLabel(); diff --git a/packages/ag-charts-enterprise/src/series/range-bar/rangeBarProperties.ts b/packages/ag-charts-enterprise/src/series/range-bar/rangeBarProperties.ts index baadf53a2a..bff5b01487 100644 --- a/packages/ag-charts-enterprise/src/series/range-bar/rangeBarProperties.ts +++ b/packages/ag-charts-enterprise/src/series/range-bar/rangeBarProperties.ts @@ -3,7 +3,7 @@ import type { AgRangeBarSeriesLabelFormatterParams, AgRangeBarSeriesLabelPlacement, AgRangeBarSeriesOptions, - AgRangeBarSeriesStyles, + AgRangeBarSeriesStyle, AgRangeBarSeriesTooltipRendererParams, Styler, } from 'ag-charts-community'; @@ -79,7 +79,7 @@ export class RangeBarProperties extends AbstractBarSeriesProperties, AgRangeBarSeriesStyles>; + itemStyler?: Styler, AgRangeBarSeriesStyle>; @Validate(OBJECT) readonly shadow = new DropShadow().set({ enabled: false }); @@ -88,5 +88,5 @@ export class RangeBarProperties extends AbstractBarSeriesProperties(); + readonly tooltip = new SeriesTooltip>(); } diff --git a/packages/ag-charts-types/src/series/cartesian/bubbleOptions.ts b/packages/ag-charts-types/src/series/cartesian/bubbleOptions.ts index 710c470ac0..341b457f78 100644 --- a/packages/ag-charts-types/src/series/cartesian/bubbleOptions.ts +++ b/packages/ag-charts-types/src/series/cartesian/bubbleOptions.ts @@ -20,14 +20,14 @@ export interface AgBubbleSeriesLabel extends AgChartLabelOptions = DatumCallbackParams & AgBubbleSeriesOptionsKeys & - Required; + Required; export interface AgBubbleSeriesThemeableOptions - extends AgBubbleSeriesStyles, + extends AgBubbleSeriesStyle, AgBaseCartesianThemeableOptions { /** Explicitly specifies the extent of the domain for series `sizeKey`. */ domain?: [number, number]; @@ -42,7 +42,7 @@ export interface AgBubbleSeriesThemeableOptions /** Series-specific tooltip configuration. */ tooltip?: AgSeriesTooltip>; /** Function used to return formatting for individual markers, based on the supplied information. If the current marker is highlighted, the `highlighted` property will be set to `true`; make sure to check this if you want to differentiate between the highlighted and un-highlighted states. */ - itemStyler?: Styler, AgBubbleSeriesStyles>; + itemStyler?: Styler, AgBubbleSeriesStyle>; } export interface AgBubbleSeriesOptionsKeys { diff --git a/packages/ag-charts-types/src/series/cartesian/heatmapOptions.ts b/packages/ag-charts-types/src/series/cartesian/heatmapOptions.ts index f22f56a997..52e0b58546 100644 --- a/packages/ag-charts-types/src/series/cartesian/heatmapOptions.ts +++ b/packages/ag-charts-types/src/series/cartesian/heatmapOptions.ts @@ -18,7 +18,7 @@ export type AgHeatmapSeriesTooltipRendererParams = AgSeriesTooltipRender AgHeatmapSeriesOptionsNames; export interface AgHeatmapSeriesThemeableOptions - extends AgHeatmapSeriesStyle, + extends StrokeOptions, AgBaseCartesianThemeableOptions { /** Options for the label in each cell. */ label?: AgChartAutoSizedSecondaryLabelOptions; diff --git a/packages/ag-charts-types/src/series/cartesian/rangeBarOptions.ts b/packages/ag-charts-types/src/series/cartesian/rangeBarOptions.ts index af100f153e..aa5cb0c2b8 100644 --- a/packages/ag-charts-types/src/series/cartesian/rangeBarOptions.ts +++ b/packages/ag-charts-types/src/series/cartesian/rangeBarOptions.ts @@ -8,14 +8,14 @@ import type { FillOptions, LineDashOptions, StrokeOptions } from './commonOption export type AgRangeBarSeriesItemStylerParams = DatumCallbackParams & AgRangeBarSeriesOptionsKeys & - Required; + Required; -export interface AgRangeBarSeriesStyles extends FillOptions, StrokeOptions, LineDashOptions { +export interface AgRangeBarSeriesStyle extends FillOptions, StrokeOptions, LineDashOptions { /** Apply rounded corners to each bar. */ cornerRadius?: PixelSize; } -export type AgRangeBarSeriesTooltipRendererParams = AgSeriesTooltipRendererParams & +export type AgRangeBarSeriesTooltipRendererParams = AgSeriesTooltipRendererParams & AgRangeBarSeriesOptionsKeys & AgRangeBarSeriesOptionsNames; @@ -31,7 +31,7 @@ export type AgRangeBarSeriesLabelPlacement = 'inside' | 'outside'; export interface AgRangeBarSeriesThemeableOptions extends AgBaseCartesianThemeableOptions, - AgRangeBarSeriesStyles { + AgRangeBarSeriesStyle { /** * Bar rendering direction. * @@ -47,7 +47,7 @@ export interface AgRangeBarSeriesThemeableOptions /** Configuration for the shadow used behind the series items. */ shadow?: AgDropShadowOptions; /** Function used to return formatting for individual RangeBar series item cells, based on the given parameters. If the current cell is highlighted, the `highlighted` property will be set to `true`; make sure to check this if you want to differentiate between the highlighted and un-highlighted states. */ - itemStyler?: Styler, AgRangeBarSeriesStyles>; + itemStyler?: Styler, AgRangeBarSeriesStyle>; } export type AgRangeBarSeriesLabelFormatterParams = AgRangeBarSeriesOptionsKeys & AgRangeBarSeriesOptionsNames; diff --git a/packages/ag-charts-website/src/content/gallery/_examples/horizontal-range-bar-with-labels/main.ts b/packages/ag-charts-website/src/content/gallery/_examples/horizontal-range-bar-with-labels/main.ts index b09694bf91..270e86e7b4 100644 --- a/packages/ag-charts-website/src/content/gallery/_examples/horizontal-range-bar-with-labels/main.ts +++ b/packages/ag-charts-website/src/content/gallery/_examples/horizontal-range-bar-with-labels/main.ts @@ -9,7 +9,7 @@ const numberFormatOptions: Intl.NumberFormatOptions = { currency: 'GBP', }; -const tooltip: AgSeriesTooltip = { +const tooltip: AgSeriesTooltip> = { renderer: ({ datum, xName, xKey, yLowKey, yHighKey, yLowName, yHighName }) => { return { content: `${xName}: ${datum[xKey]}
${yLowName}: ${datum[yLowKey].toLocaleString( diff --git a/packages/ag-charts-website/src/content/gallery/_examples/range-bar-with-labels/main.ts b/packages/ag-charts-website/src/content/gallery/_examples/range-bar-with-labels/main.ts index 0366d35eea..a16d9e99c5 100644 --- a/packages/ag-charts-website/src/content/gallery/_examples/range-bar-with-labels/main.ts +++ b/packages/ag-charts-website/src/content/gallery/_examples/range-bar-with-labels/main.ts @@ -8,7 +8,7 @@ import { import { getData } from './data'; -const tooltip: AgSeriesTooltip = { +const tooltip: AgSeriesTooltip> = { renderer: ({ datum, xName, xKey, yLowKey, yHighKey, yLowName, yHighName }) => { return { content: `${xName}: ${datum[xKey]}
${yLowName}: ${datum[yLowKey].toLocaleString('en-GB', {