This is a migrated thread and some comments may be shown as answers.

align top

2 Answers 99 Views
Diagram
This is a migrated thread and some comments may be shown as answers.
Justin Lee
Top achievements
Rank 1
Justin Lee asked on 11 Jul 2017, 07:40 PM

Hello,

Currently, I am centering the content of the diagram using:

diagram.bringIntoView(diagram.shapes);

However, I would like the shapes to be vertically aligned to the top.  So horizontally centered, but vertically aligned at the top.

How would I achieve this?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Accepted
Stamo Gochev
Telerik team
answered on 13 Jul 2017, 11:02 AM
Hi Justin,

The bringIntoView method allows specifying align settings as described in the documentation:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/diagram#methods-bringIntoView


diagram.bringIntoView(diagram.shapes, {
    align: "center middle"
});
In addition, the Layout options can also be used for alignment:

http://docs.telerik.com/kendo-ui/api/javascript/dataviz/diagram/layout

The following Dojo example is a modified version of our Basic Usage demo and demonstrates the above ideas:

http://dojo.telerik.com/@stamo/ivAcu

If none of the above suggestions works for you, can you send me a runnable Dojo example, so i can have a look at it?

Regards,
Stamo Gochev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Justin Lee
Top achievements
Rank 1
answered on 13 Jul 2017, 01:04 PM
Perfect. Thank you.
Tags
Diagram
Asked by
Justin Lee
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
Justin Lee
Top achievements
Rank 1
Share this question
or