Skip to Content

How to dynamically change height of my Gantt Chart

Hi all

How to dynamically change height of my Gantt Chart? Is there any solution for that? Actually I have a Gantt chart having height 400. Now when I have too many number of records the display bars are very small and when I have one or two records the display bars are utilizing total 400 height having 200 each that looks

very fat. Any help will be highly appreciated.

regards

Kam

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 18, 2007 at 07:02 AM

    I hope help you.

    IWDGantt ganttVarName = (IWDGantt)view.getElement("GanttID"); 
             ganttVarName .setHeight("200px");
    

    If you would change this height when you are creating the content you cant get the Heigth of the gantt and augmented it.

    Sorry for my english

    Regards,

    Gabriel

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 18, 2007 at 07:11 AM

    Hi Sunit

    you can change the height of the UI element using

    IWDBusinessGraphics bg = null; // declare in global area
     bg = (IWDBusinessGraphics) view.getElement("BusinessGraphics1"); // this code line to be written in wdModifyView();
    bg.setHeight();// can be used anywhere in the code in any method
    

    But as your data may vary for every reading, depending upon the size of your node to which the chart is linked, try setting approximate values for a given range using the above code by checking a condition. i am not sure for each n every different set of values you can change it dynamically.

    Thanks & regards,

    Anupreet

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi Kam,

      You can declare global variables for your view between...

      //@@begin others

      IWDBusinessGraphics bg = null;

      //@@end

      ... at the end of the wiew code. Be carreful, because any code put out of these marks will be deleted.

      Another way to use goblal variables is using the view context... You can create an IWDGantt attribute and use it everywhere:

      // this code line to be written in wdModifyView()

      if(firstTime){

      wdContext.currentContextElement.setMyGanttReference((IWDGantt)view.getElement("GanttID"));

      }

      // and then, anywhere in the code in any method

      wdContext.currentContextElement.getMyGanttReference().setHeight(...);

      I hope it helps!

      jc!

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.