DevExtreme Angular - Resize and Relocate
To change the size of the Tooltip, specify the height and width options. Note that the Tooltip's arrow takes its share of the overall size.
HTML
TypeScript
- <img id="image" src="https://url/to/an/image" />
- <dx-tooltip
- target="#image"
- showEvent="dxhoverstart"
- hideEvent="dxhoverend"
- [height]="70"
- [width]="200">
- <div *dxTemplate="let data of 'content'">
- <p>Tooltip content</p>
- </div>
- </dx-tooltip>
- import { DxTooltipModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- // ...
- }
- @NgModule({
- imports: [
- // ...
- DxTooltipModule
- ],
- // ...
- })
If you need to position the Tooltip against a certain side of the target element, set the position option.
HTML
TypeScript
- <img id="image" src="https://url/to/an/image" />
- <dx-tooltip
- target="#image"
- showEvent="dxhoverstart"
- hideEvent="dxhoverend"
- position="top"> <!-- or "bottom" | "left" | "right" -->
- <div *dxTemplate="let data of 'content'">
- <p>Tooltip content</p>
- </div>
- </dx-tooltip>
- import { DxTooltipModule } from "devextreme-angular";
- // ...
- export class AppComponent {
- // ...
- }
- @NgModule({
- imports: [
- // ...
- DxTooltipModule
- ],
- // ...
- })
See Also
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.