Wednesday, 23 April 2014

hierarchy chart on vf page by using google chart.






Hi Guys,
I am writing this post to show how we can create a beautiful chart showing hierarchy level for Account on detail page, 
all Contacts shows according to their reporting managers for an Account.

here I am using Google chart in VF page and apex class,
for this requirement i am creating a string "ContactData" and using it on VF page that's it.

following is code for extension class and vf page:-

Screen shoot:-



Note:- chart is shows only if you fill the "Reports To" field at contact level.
Happy coding...
Thanks
Anurag Jain.

4 comments:

  1. Hi Anurag,
    We came across your blog post and the code worked perfectly but however, we are hopefully looking to render the vf page into PDF and to still show the hierarchy of contacts but unfortunately it does not show the chart. Would you have any advice? Any help would be greatly appreciated! :)
    Thanks, Snita

    ReplyDelete
    Replies
    1. This is out of the context. Since you wanted an PDF based output it is suggested that usage of a org chart maker could be the answer. There are several output formats that's been announced and my suggestion is Creately.

      Delete
  2. Creating a hierarchy chart on a VF page using Google Chart is a visually engaging way to represent organizational charts. By leveraging Google Chart API, developers can easily display relationships and roles, enhancing data visualization for users. This fosters a clearer understanding of hierarchical structures within the organization.

    ReplyDelete
  3. Your blog contains lots of valuable data. It is a factual and beneficial article for us. Thankful to you for sharing an article like this.
    pharmaceutical manufacturing companies list

    ReplyDelete