Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions packages/charts/api/charts.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1589,6 +1589,19 @@ export type PartialTheme = RecursivePartial<Theme>;
// @public (undocumented)
export const Partition: React_2.FunctionComponent<SpecRequiredProps_7 & SpecOptionalProps_7>;

// Warning: (ae-forgotten-export) The symbol "StaticConfig" needs to be exported by the entry point index.d.ts
//
// @public @deprecated
export interface PartitionConfig extends StaticConfig {
// @alpha (undocumented)
animation: {
duration: TimeMs;
keyframes: Array<AnimKeyframe & {
keyframeConfig: Partial<StaticConfig>;
}>;
};
}

// @public (undocumented)
export type PartitionElementEvent = [Array<LayerValue>, SeriesIdentifier];

Expand Down Expand Up @@ -1888,6 +1901,18 @@ export type RelativeBandsPadding = {
inner: Ratio;
};

// @public (undocumented)
export interface RelativeMargins {
// (undocumented)
bottom: SizeRatio;
// (undocumented)
left: SizeRatio;
// (undocumented)
right: SizeRatio;
// (undocumented)
top: SizeRatio;
}

// @public
export type RenderChangeListener = (isRendered: boolean) => void;

Expand Down Expand Up @@ -2598,6 +2623,7 @@ export type YDomainRange = YDomainBase & DomainRange & LogScaleOptions;

// Warnings were encountered during analysis:
//
// src/chart_types/partition_chart/layout/types/config.ts:60:5 - (ae-forgotten-export) The symbol "TimeMs" needs to be exported by the entry point index.d.ts
// src/utils/themes/theme.ts:217:5 - (ae-forgotten-export) The symbol "TextAlign" needs to be exported by the entry point index.d.ts
// src/utils/themes/theme.ts:218:5 - (ae-forgotten-export) The symbol "TextBaseline" needs to be exported by the entry point index.d.ts

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import { Color } from '../../../../common/colors';
import { SizeRatio, Distance, Radian, Radius, Ratio, Pixels, TimeMs } from '../../../../common/geometry';
import { FontFamily } from '../../../../common/text_utils';
import { StrokeStyle } from '../../../../utils/common';
import { FillFontSizeRange, FillLabelConfig, LinkLabelConfig } from '../../../../utils/themes/partition';
import { AnimKeyframe, PartitionLayout } from './config_types';

/** @public */
export interface RelativeMargins {
left: SizeRatio;
right: SizeRatio;
top: SizeRatio;
bottom: SizeRatio;
}

interface StaticConfig extends FillFontSizeRange {
width: number;
height: number;
margin: RelativeMargins;
emptySizeRatio: SizeRatio;
outerSizeRatio: SizeRatio;
clockwiseSectors: boolean;
specialFirstInnermostSector: boolean;
partitionLayout: PartitionLayout;
drilldown: boolean;
fontFamily: FontFamily;
circlePadding: Distance;
radialPadding: Distance;
horizontalTextAngleThreshold: Radian;
horizontalTextEnforcer: Ratio;
maxRowCount: number;
fillOutside: boolean;
radiusOutside: Radius;
fillRectangleWidth: Distance;
fillRectangleHeight: Distance;
fillLabel: FillLabelConfig;
linkLabel: LinkLabelConfig;
backgroundColor: Color;
sectorLineWidth: Pixels;
sectorLineStroke: StrokeStyle;
}

/**
* Old config object for partition charts
*
* @deprecated assign values to theme.partition or PartitionSpec instead
* @public
*/
export interface PartitionConfig extends StaticConfig {
/** @alpha */
animation: {
duration: TimeMs;
keyframes: Array<
AnimKeyframe & {
keyframeConfig: Partial<StaticConfig>;
}
>;
};
}
3 changes: 3 additions & 0 deletions packages/charts/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ export { Layer as PartitionLayer } from './chart_types/partition_chart/specs/ind
export * from './chart_types/goal_chart/specs/index';
export * from './chart_types/wordcloud/specs/index';

// TODO: Remove deprecated config types. Need for eui alignment
export * from './chart_types/partition_chart/layout/types/config';

export {
Accessor,
AccessorFn,
Expand Down