import { Browser, isNullOrUndefined, Animation, AnimationOptions, Property, Complex, ChildProperty } from '@syncfusion/ej2-base';import { CircularChart3DPoints, CircularChart3DSeries } from '../renderer/series';import { BorderModel, ContainerPaddingModel, FontModel, MarginModel } from '../../common/model/base-model';import { CircularChart3D } from '../circularchart3d';import { Border, ContainerPadding, Font, Margin } from '../../common/model/base';import { Rect, Size, measureText } from '@syncfusion/ej2-svg-base';import { Alignment, LabelOverflow, LegendPosition, LegendTitlePosition, TextWrap } from '../../common/utils/enum';import { ChartLocation, textTrim, getElement } from '../../common/utils/helper';import { CircularChart3DLegendRenderEventArgs, CircularChart3DLegendClickEventArgs } from '../model/pie-interface';import { textWrap } from '../../common/utils/helper';import { legendClick } from '../../common/model/constants';import { LocationModel } from '../../common/model/base-model';import { Location } from '../../common/model/base'; /** * Interface for a class CircularChart3DLegendSettings */ export interface CircularChart3DLegendSettingsModel { /** * If set to true, the legend will be displayed for the chart. * * @default true */ visible?: boolean; /** * The height of the legend in pixels. * * @default null */ height?: string; /** * The width of the legend in pixels. * * @default null */ width?: string; /** * Specifies the location of the legend, relative to the chart. * If x is 20, legend moves by 20 pixels to the right of the chart. It requires the `position` to be `Custom`. * ```html *
* ``` * ```typescript * let pie: CircularChart3D = new CircularChart3D({ * ... * legendSettings: { * visible: true, * position: 'Custom', * location: { x: 100, y: 150 }, * }, * ... * }); * pie.appendTo('#Chart'); * ``` */ location?: LocationModel; /** * Position of the legend in the chart. Available options include: * * Auto: Places the legend based on the area type. * * Top: Displays the legend at the top of the chart. * * Left: Displays the legend at the left of the chart. * * Bottom: Displays the legend at the bottom of the chart. * * Right: Displays the legend at the right of the chart. * * Custom: Displays the legend based on the given x and y values. * * @default 'Auto' */ position?: LegendPosition; /** * Option to customize the padding around the legend items. * * @default 8 */ padding?: number; /** * Option to customize the padding between legend items. * * @default null */ itemPadding?: number; /** * Legend in chart can be aligned as follows: * * Near: Aligns the legend to the left of the chart. * * Center: Aligns the legend to the center of the chart. * * Far: Aligns the legend to the right of the chart. * * @default 'Center' */ alignment?: Alignment; /** * Options to customize the legend text. */ textStyle?: FontModel; /** * Shape height of the legend in pixels. * * @default 10 */ shapeHeight?: number; /** * Shape width of the legend in pixels. * * @default 10 */ shapeWidth?: number; /** * Options to customize the border of the legend. */ border?: BorderModel; /** * Options to customize left, right, top and bottom margins of the chart. */ margin?: MarginModel; /** * Options to customize left, right, top and bottom padding for legend container of the chart. */ containerPadding?: ContainerPaddingModel; /** * Padding between the legend shape and text. * * @default 8 */ shapePadding?: number; /** * The background color of the legend that accepts value in hex and rgba as a valid CSS color string. * * @default 'transparent' */ background?: string; /** * Opacity of the legend. * * @default 1 */ opacity?: number; /** * If set to true, series visibility collapses based on the legend visibility. * * @default true */ toggleVisibility?: boolean; /** * If set to true, the series get highlighted, while hovering the legend. * * @default false */ enableHighlight?: boolean; /** * Description for legends. * * @default null */ description?: string; /** * TabIndex value for the legend. * * @default 3 */ tabIndex?: number; /** * Title for legends. * * @default null */ title?: string; /** * Options to customize the legend title. */ titleStyle?: FontModel; /** * Legend title position. * * @default 'Top' */ titlePosition?: LegendTitlePosition; /** * Defines the text wrap behavior to employ when the individual legend text overflows. * * `Normal`: Specifies to break words only at allowed break points. * * `Wrap`: Specifies to break a word once it is too long to fit on a line by itself. * * `AnyWhere`: Specifies to break a word at any point if there are no otherwise-acceptable break points in the line. * * @default 'Normal' */ textWrap?: TextWrap; /** * Defines the text overflow behavior to employ when the individual legend text overflows * * `Clip`: Specifies the text is clipped and not accessible. * * `Ellipsis`: Specifies an ellipsis (“...”) to the clipped text. * * @default 'Ellipsis' */ textOverflow?: LabelOverflow; /** * Maximum width for the legend title. * * @default 100 */ maximumTitleWidth?: number; /** * Minimum label width for the legend text. * * @default null */ maximumLabelWidth?: number; /** * If set to true, legend will be visible using pages. * * @default true */ enablePages?: boolean; /** * If `isInversed` set to true, then it inverses legend item content (image and text). * * @default false. */ isInversed?: boolean; /** * If `reverse` is set to true, it reverses the order of legend items. * * @default false */ reverse?: boolean; } /** * Interface for a class CircularChartLegend3D */ export interface CircularChartLegend3DModel { }