@syncfusion/ej2-charts
Version:
Feature-rich chart control with built-in support for over 25 chart types, technical indictors, trendline, zooming, tooltip, selection, crosshair and trackball.
131 lines (112 loc) • 3.51 kB
TypeScript
import { extend, Browser, remove, ChildProperty, Property, Complex } from '@syncfusion/ej2-base';import { ChartLocation, Point3D } from '../../common/utils/helper';import { Rect } from '@syncfusion/ej2-svg-base';import { Chart3DAxis } from '../axis/axis';import { tooltipRender } from '../../common/model/constants';import { isNullOrUndefined } from '@syncfusion/ej2-base';import { Chart3D } from '../chart3D';import {Chart3DSeries , Chart3DPoint } from '../series/chart-series';import { Chart3DFadeOutMode, Chart3DTooltipRenderEventArgs } from '../model/chart3d-Interface';import { BorderModel, FontModel, LocationModel } from '../../common/model/base-model';import { Border, Font } from '../../common/model/base';import { Location } from '../../common/model/base';import { valueToCoefficients } from '../utils/chart3dRender';
/**
* Interface for a class Chart3DTooltipSettings
*/
export interface Chart3DTooltipSettingsModel {
/**
* If set to true, enables the tooltip for the data points.
*
* @default false.
*/
enable?: boolean;
/**
* If set to true, enables the marker in the chart tooltip.
*
* @default true.
*/
enableMarker?: boolean;
/**
* The fill color of the tooltip, specified as a valid CSS color string in hex or rgba format.
*
* @default null
*/
fill?: string;
/**
* The header text for the tooltip. By default, it displays the series name.
*
* @default null
*/
header?: string;
/**
* The opacity of the tooltip, expressed as a numerical value.
*
* @default null
*/
opacity?: number;
/**
* Options for customizing the tooltip text appearance.
*/
textStyle?: FontModel;
/**
* The format for customizing the tooltip content.
*
* @default null.
*/
format?: string;
/**
* A custom template used to format the Tooltip content. You can use ${x} and ${y} as placeholder text to display the corresponding data points.
*
* @default null.
* @aspType string
*/
template?: string | Function;
/**
* If set to true, tooltip will animate while moving from one point to another.
*
* @default true.
*/
enableAnimation?: boolean;
/**
* Duration for the Tooltip animation.
*
* @default 300
*/
duration?: number;
/**
* Duration of the fade-out animation for hiding the Tooltip.
*
* @default 1000
*/
fadeOutDuration?: number;
/**
* Fade Out duration for the Tooltip hide.
*
* @default Move
*/
fadeOutMode?: Chart3DFadeOutMode ;
/**
* To wrap the tooltip long text based on available space.
* This is only application for chart tooltip.
*
* @default false
*/
enableTextWrap?: boolean;
/**
* Options for customizing the tooltip borders.
*/
border?: BorderModel;
/**
* Specifies the location of the tooltip, relative to the chart.
* If x is 20, tooltip moves by 20 pixels to the right of the chart
* ```html
* <div id='Chart'></div>
* ```
* ```typescript
* let chart: Chart = new Chart({
* ...
* tooltipSettings: {
* enable: true,
* location: { x: 100, y: 150 },
* },
* ...
* });
* chart.appendTo('#Chart');
* ```
*/
location?: LocationModel;
}
/**
* Interface for a class Tooltip3D
*/
export interface Tooltip3DModel {
}