leora
leora

Reputation: 196861

Google Visualization API - Org Chart Layout

Using the Org Chart in the Google Visualization API, is there a way to flip the chart to a vertical layout instead of horizontal.

Upvotes: 7

Views: 8050

Answers (2)

Plamen Peshev
Plamen Peshev

Reputation: 410

GetOrgChart jQuery widget has oeriantation option to show vertical org chart

Orientation of the GetOrgChart widget.

  • getOrgChart.RO_TOP
  • getOrgChart.RO_BOTTOM
  • getOrgChart.RO_RIGHT
  • getOrgChart.RO_LEFT

Default value: getOrgChart.RO_TOP

Code examples:

$("#people").getOrgChart({          
    orientation: getOrgChart.RO_LEFT,
    dataSource: [
        { id: 1, parentId: null, Name: "Amber McKenzie"},
        { id: 2, parentId: 1, Name: "Ava Field"},
        { id: 3, parentId: 1, Name: "Evie Johnson"}]
});

JSFIDDLE Demo

Upvotes: 1

Daniel Vassallo
Daniel Vassallo

Reputation: 344521

Unfortunately no. It is not possible at the moment.

This feature has been requested in Issue #47 on the Google Visualization API issue tracker.

You may want to star the issue to let Google know about your interest in this feature.

Upvotes: 7

Related Questions