on 04-18-2007 7:39 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.