UNPKG

@syncfusion/ej2-heatmap

Version:

Feature rich data visulization control used to visualize the matrix data where the individual values are represented as colors

110 lines (92 loc) 3.34 kB
import { Property, ChildProperty, Complex, Browser, createElement, isNullOrUndefined, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { LinearGradient, TooltipTheme } from '@syncfusion/ej2-svg-base';import { HeatMap } from '../heatmap';import { DrawSvgCanvas, TextOption, TextBasic, PathOption, Line, LineOption, GradientPointer, textTrim, getSanitizedTexts } from '../utils/helper';import { Size, measureText, getTitle, getElement, CanvasTooltip, formatValue, LegendRange, ToggleVisibility, sum } from '../utils/helper';import { LegendPosition, Alignment, LabelDisplayType } from '../utils/enum';import { BorderModel, FontModel, TitleModel } from '../model/base-model';import { Font, LegendColorCollection, BubbleTooltipData, ColorCollection, Title } from '../model/base';import { Rect, RectOption, Gradient, GradientColor, showTooltip, stringToNumber, CurrentLegendRect, removeElement } from '../utils/helper';import { Axis } from '../axis/axis';import { Theme } from '../model/theme';import { CurrentRect } from '../utils/helper';import { Tooltip as tool } from '@syncfusion/ej2-svg-base';import { ILegendRenderEventArgs } from '../model/interface'; /** * Interface for a class LegendSettings */ export interface LegendSettingsModel { /** * Sets and gets the height of the legend. * * @default '' */ height?: string; /** * Sets and gets the width of the legend. * * @default '' */ width?: string; /** * Sets and gets the options to customize the title of the legend. * * @default '' */ title?: TitleModel; /** * Sets and gets the position of the legend. * * @default 'Right' */ position?: LegendPosition; /** * Specifies whether the legend should be visible or not. * * @default true */ visible?: boolean; /** * Specifies the alignment of the legend. * * @default 'Center' */ alignment?: Alignment; /** * Specifies whether the labels in the legend should be visible or not. * * @default true */ showLabel?: boolean; /** * Enables or disables the visibility of the gradient pointer in the gradient legend. * * @default true */ showGradientPointer?: boolean; /** * Specifies whether smart legend should be displayed or not when palette type is fixed. * * @default false */ enableSmartLegend?: boolean; /** * Specifies the display mode for label for smart legend. The available display types are, * * All: All the labels in the legend are displayed. * * Edge: Labels will be displayed only at the edges of the legend. * * None: No labels are displayed. * * @default 'All' */ labelDisplayType?: LabelDisplayType; /** * Sets and gets the options to customize the font style of the legend label. * * @default '' */ textStyle?: FontModel; /** * Used to format the legend label. * * @default '' */ labelFormat?: string; /** * Enables or disables the toggle visibility of heatmap cells based on legend item selection. * * @default true */ toggleVisibility?: boolean; } /** * Interface for a class Legend */ export interface LegendModel { }