UNPKG

@syncfusion/ej2-treemap

Version:
672 lines (671 loc) 17.8 kB
/** * Maps base doc */ import { ChildProperty } from '@syncfusion/ej2-base'; import { LabelPosition, Alignment, HighLightMode, SelectionMode, LabelIntersectAction, LabelPlacement } from '../utils/enum'; import { LabelAlignment, LegendShape, LegendPosition, LegendMode, LegendOrientation, MarkerShape } from '../utils/enum'; import { BorderModel, FontModel, SubTitleSettingsModel, ColorMappingModel, CommonTitleSettingsModel } from './base-model'; import { Location } from '../utils/helper'; /** * Sets and gets the options for customizing the color and width of the border in treemap. */ export declare class Border extends ChildProperty<Border> { /** * Sets and gets the color of the border. This property accepts the value in hex code and rgba string as a valid CSS color string. * * @default '#808080' */ color: string; /** * Defines the width of the border in the treemap. * * @default 0 */ width: number; } /** * Sets and gets the margin for the treemap. */ export declare class Margin extends ChildProperty<Margin> { /** * Sets and gets the left margin for the treemap. * * @default 10 */ left: number; /** * Sets and gets the right margin for the treemap. * * @default 10 */ right: number; /** * Sets and gets the top margin for the treemap. * * @default 10 */ top: number; /** * Sets and gets the bottom margin for the treemap. * * @default 10 */ bottom: number; } /** * Sets and gets the options to customize the style of the text contents in the treemap. */ export declare class Font extends ChildProperty<Font> { /** * Sets and gets the size for the text in the treemap. * * @default null */ size: string; /** * Sets and gets the color for the text in the treemap. * * @default null */ color: string; /** * Sets and gets the font family for the text in the treemap. * * @default '' */ fontFamily: string; /** * Sets and gets the font weight for the text in the treemap. * * @default null */ fontWeight: string; /** * Sets and gets the font style for the text in the treemap. * * @default 'Normal' */ fontStyle: string; /** * Sets and gets the opacity of the text in the treemap. * * @default 1 */ opacity: number; } /** * Sets and gets the options for customizing the title of the treemap. */ export declare class CommonTitleSettings extends ChildProperty<CommonTitleSettings> { /** * Sets and gets the text for the title in the treemap. * * @default '' */ text: string; /** * Define the description of the title for the accessibility in the treemap. * * @default '' */ description: string; } /** * Sets and gets the options for customizing the subtitle of the treemap. */ export declare class SubTitleSettings extends CommonTitleSettings { /** * Sets and gets the options to customize the text style for the subtitle in the treemap. */ textStyle: FontModel; /** * Sets and gets the alignment of the subtitle text in the treemap. * * @default 'Center' */ alignment: Alignment; } /** * Sets and gets the options for customizing the title of the treemap. */ export declare class TitleSettings extends CommonTitleSettings { /** * Sets and gets the options to customize the text style of the title of the treemap. */ textStyle: FontModel; /** * Sets and gets the text position of the title text in the treemap. * * @default 'Center' */ alignment: Alignment; /** * Sets and gets the options to customize the subtitle for the treemap. */ subtitleSettings: SubTitleSettingsModel; } /** * Sets and gets the options to customize the color-mapping in treemap. */ export declare class ColorMapping extends ChildProperty<ColorMapping> { /** * Sets and gets the value from which the range of color mapping starts. * * @default null */ from: number; /** * Sets and gets the value to which the range of color mapping ends. * * @default null */ to: number; /** * Sets and gets the color for the color-mapping in treemap. * * @default null */ color: string | string[]; /** * Sets and gets the label text for the legend when it is rendered based on color mapping. * * @default null */ label: string; /** * Sets and gets the value for the color-mapping from the data source. * * @default null */ value: string | number; /** * Sets and gets the minimum opacity for the color-mapping in the treemap. * * @default null */ minOpacity: number; /** * Sets and gets the maximum opacity for the color-mapping in the treemap. * * @default null */ maxOpacity: number; /** * Enables or disables the visibility of the legend for color mapping in the treemap. * * @default true */ showLegend: boolean; } /** * Sets and gets the options for customizing the legend of the treemap. */ export declare class LegendSettings extends ChildProperty<LegendSettings> { /** * Enables or disables the visibility of legend in the treemap. * * @default false */ visible: boolean; /** * Sets and gets the mode of legend in the treemap. The modes available are default and interactive modes. * * @default 'Default' */ mode: LegendMode; /** * Sets and gets the background color of legend in the treemap. * * @default 'transparent' */ background: string; /** * Sets and gets the shape of legend in the treemap. * * @default 'Circle' */ shape: LegendShape; /** * Sets and gets the width of legend in the treemap. * * @default '' */ width: string; /** * Sets and gets the height of legend in the treemap. * * @default '' */ height: string; /** * Sets and gets the options to customize the text style of legend in the treemap. */ textStyle: FontModel; /** * Sets and gets the shape color of legend in the treemap. * * @default null */ fill: string; /** * Sets and gets the opacity of the legend in the treemap. * * @default 1 */ opacity: number; /** * Sets and gets the width of the shapes in legend in the treemap. * * @default 15 */ shapeWidth: number; /** * Sets and gets the height of the shapes of legend in the treemap. * * @default 15 */ shapeHeight: number; /** * Sets and gets the shape padding of legend in the treemap. * * @default 10 */ shapePadding: number; /** * Sets and gets the URL path of the legend shapes that is set as image. * * @default null */ imageUrl: string; /** * Sets and gets the options for customizing the color and width of the border of the legend in the treemap. */ border: BorderModel; /** * Sets and gets the options for customizing the color and width of the border of the legend shape in the treemap. */ shapeBorder: BorderModel; /** * Sets and gets the options to customize the title of the legend in the treemap. */ title: CommonTitleSettingsModel; /** * Sets and gets the options to customize the text style of the legend item text in the treemap. */ titleStyle: FontModel; /** * Sets and gets the position of legend in the treemap. * * @default 'Bottom' */ position: LegendPosition; /** * Sets and gets the orientation of legend in the treemap. * * @default 'None' */ orientation: LegendOrientation; /** * Enables or disables the pointer for interactive legend in the treemap. * * @default false */ invertedPointer: boolean; /** * Sets and gets the label position for interactive legend in the treemap. * * @default 'After' */ labelPosition: LabelPlacement; /** * Sets and gets the action of legend item text when they intersect with each other. * * @default 'None' */ labelDisplayMode: LabelIntersectAction; /** * Sets and gets the alignment of legend in the treemap. * * @default 'Center' */ alignment: Alignment; /** * Sets and gets the location to place the legend in a custom location in the treemap. */ location: Location; /** * Sets and gets the value path from the data source for the visibility state of the legend item in the treemap. * * @default null */ showLegendPath: string; /** * Sets and gets the value path from the data source to render legend in the treemap. * * @default null */ valuePath: string; /** * Enables or disables to remove the duplicate legend item. * * @default false */ removeDuplicateLegend: boolean; } /** * Sets and gets the settings for drill down to visualize the treemap rendered in the initial state. */ export declare class InitialDrillSettings extends ChildProperty<InitialDrillSettings> { /** * Sets and gets the initial rendering level index in the treemap. * * @default null */ groupIndex: number; /** * Sets and gets the initial rendering level name in the treemap. * * @default null */ groupName: string; } /** * Sets and gets the options for customizing the leaf item of the treemap. */ export declare class LeafItemSettings extends ChildProperty<LeafItemSettings> { /** * Sets and gets the fill color of leaf items in the treemap. * * @default null */ fill: string; /** * Enables or disables automatic filling of colors from the palette in the leaf items of the treemap. * * @default false */ autoFill: boolean; /** * Sets and gets the options for customizing the color and width of the border of the leaf item in the treemap. */ border: BorderModel; /** * Sets and gets the gap between the leaf item in the treemap. * * @default 0 */ gap: number; /** * Sets and gets the padding of leaf item in the treemap. * * @default 10 */ padding: number; /** * Sets and gets the opacity of leaf item in the treemap. * * @default 1 */ opacity: number; /** * Shows or hides the labels in the treemap. * * @default true */ showLabels: boolean; /** * Sets and gets the value path from the data source for label of leaf item in the treemap. * * @default null */ labelPath: string; /** * Sets and gets the string to format the label text of leaf item in the treemap. * * @default null */ labelFormat: string; /** * Sets and gets the position of the labels in the treemap. * * @default 'TopLeft' */ labelPosition: LabelPosition; /** * Sets and gets the options to customize the style of the labels of treemap leaf item. */ labelStyle: FontModel; /** * Sets and gets the label template of leaf item in the treemap to render custom elements in the labels. * * @default null * @aspType string */ labelTemplate: string | Function; /** * Sets and gets the position of the label template of treemap leaf item. * * @default 'Center' */ templatePosition: LabelPosition; /** * Sets and gets the actions to perform when labels intersects with other labels in a treemap leaf item. * * @default 'Trim' */ interSectAction: LabelAlignment; /** * Sets and gets the options to customize color-mapping of the treemap leaf items. */ colorMapping: ColorMappingModel[]; } /** * Sets and gets the options for customizing the tooltip of the treemap. */ export declare class TooltipSettings extends ChildProperty<TooltipSettings> { /** * Enables or disables the visibility of the tooltip in the treemap. * * @default false */ visible: boolean; /** * Sets and gets the template for tooltip in the treemap. * * @default '' * @aspType string */ template: string | Function; /** * Sets and gets the string to format the tooltip in the treemap. * * @default null */ format: string; /** * Sets and gets the background color of tooltip in the treemap. * * @default null */ fill: string; /** * Sets and gets the opacity of tooltip in the treemap. * * @default 0.75 */ opacity: number; /** * Sets and gets the marker shapes in the treemap. * * @default '[Circle]' * @private */ markerShapes: MarkerShape[]; /** * Sets and gets the options for customizing the color and width of the border of the tooltip. */ border: BorderModel; /** * Sets and gets the options for customizing the text style of tooltip of the treemap. */ textStyle: FontModel; } /** * Sets and gets the options for customizing the selection of the leaf items in treemap. */ export declare class SelectionSettings extends ChildProperty<SelectionSettings> { /** * Enables or disables the selection functionality in the treemap. * * @default false */ enable: boolean; /** * Sets and gets the color of the selection when the leaf item is selected in the treemap. * * @default null */ fill: string; /** * Sets and gets the opacity of the selection when the leaf item is selected in the treemap. * * @default '0.5' */ opacity: string; /** * Sets and gets the options to customize the border of the selected items in the treemap. */ border: BorderModel; /** * Sets and gets the type of the elements in which selection must be done in the treemap. * * @default 'Item' */ mode: SelectionMode; } /** * Sets and gets the options for customizing the highlighting of the treemap item, * when the mouse hover is performed in it. */ export declare class HighlightSettings extends ChildProperty<HighlightSettings> { /** * Enables or disables the highlight functionality of the treemap. * * @default false */ enable: boolean; /** * Sets and gets the highlight color of the treemap. * * @default '#808080' */ fill: string; /** * Sets and gets the opacity of the treemap. * * @default '0.5' */ opacity: string; /** * Sets and gets the options for customizing the color and width of the border of the * highlighted item in the treemap. */ border: BorderModel; /** * Sets and gets the element in which highlight must be done in the treemap. * * @default 'Item' */ mode: HighLightMode; } /** * Sets and gets the options for customizing the level leaf items of the treemap. */ export declare class LevelSettings extends ChildProperty<LevelSettings> { /** * Sets and gets the value path from the data source in the treemap to render the item. * * @default null */ groupPath: string; /** * Sets and gets the gap between the level leaf items in the treemap. * * @default 0 */ groupGap: number; /** * Sets and gets the padding of level leaf items in the treemap. * * @default 10 */ groupPadding: number; /** * Sets and gets the options for customizing the color and width of the border of * the level leaf items of the treemap. */ border: BorderModel; /** * Sets and gets the fill color of the level leaf item in the treemap. * * @default null */ fill: string; /** * Enables or disables the automatic filling of the colors from the palette in the items of the treemap. * * @default false */ autoFill: boolean; /** * Sets and gets the opacity in the level leaf item of the treemap. * * @default 1 */ opacity: number; /** * Shows or hides the header in level leaf item of the treemap. * * @default true */ showHeader: boolean; /** * Sets and gets the height of header in the treemap. * * @default 20 */ headerHeight: number; /** * Sets and gets the template for header in the treemap. * * @default null * @aspType string */ headerTemplate: string | Function; /** * Sets and gets the string to format the header label of the level leaf items in the treemap. * * @default null */ headerFormat: string; /** * Sets and gets the alignment of the header of the treemap. * * @default 'Near' */ headerAlignment: Alignment; /** * Sets and gets the options for customizing the text style of header label of the level leaf item. */ headerStyle: FontModel; /** * Sets and gets the options for customizing the template position of the treemap. * * @default 'TopLeft' */ templatePosition: LabelPosition; /** * Sets and gets the options for customizing the color-mapping of the level leaf items in the treemap. */ colorMapping: ColorMappingModel[]; }