align top

3 posts, 1 answers
  1. Justin Lee
    Justin Lee avatar
    164 posts
    Member since:
    Dec 2009

    Posted 11 Jul Link to this post

    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. Answer
    Stamo Gochev
    Admin
    Stamo Gochev avatar
    186 posts

    Posted 13 Jul Link to this post

    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.
  3. Justin Lee
    Justin Lee avatar
    164 posts
    Member since:
    Dec 2009

    Posted 13 Jul in reply to Stamo Gochev Link to this post

    Perfect. Thank you.
Back to Top