How to create Gantt Chart with Time scale on top?
How do I convert a date in Ole Automation Date Value?
Is there some function I can use?
DateTime.ToOADate and DateTime.FromOADate
There is no such method as Datetime.ToOADate…
How can I convert a datetime to OADate?
Sorry, already got it
DateTime.ToOaDate is not a static method.
It must be called from within an instance of a Datetime object.
Thank you very much.
I got it.
But I’m having a little problem.
When two events are in the same datetime they get on top of each other.
For layout I used ForceDigraphLayout, but it messed the Y-axis of my nodes, so after the forcedlayout I arranged the Y’s of the nodes one by one. That works great if two events don’t happen at the same time.
I want to change my vertical timeline to a horizontal timeline, but I’m looking for some way that the Goview diagram will autolayout my events even if they happen at the same time. HELP ANYONE? PLEASE? hehehehe I’m desperate.
Thank you very much all for the help,
I’m not familiar with your application, but it seems unlikely that you would want to use GoLayoutForceDirected instead of GoLayoutLayeredDigraph.
To change the timeline class to work horizontally, you’ll need to change the value of GetLabelCenter. Depending on which way you want to go, you may also need to reverse the direction of the long tick marks, swapping Right and Left.
Sorry, i’m using GolayoutLayeredDigraph.
But anyway, i’m creating a regular timeline. And i want the nodes to be added based on a date.
How can I make sure that even if two nodes are added on the same datetime they don’t get on top of each other…
Thanks for the quick help,
If two nodes have the same date, aren’t they in the same (layered-digraph) layer? If they are, the autolayout will position them with the same Y coordinate if you are doing a vertical layout.
If you do allow two (or more) nodes have the same date but also have a source/destination relationship between each other, then you will have multiple nodes on the same date, but in different (layout) layers. Basically, each date is going to need a different height, because there could be arbitrarily complex and large graphs for one date, whereas other dates might have one or even no nodes. Furthermore there can no longer be a simple one-to-one relationship between layout layers and your application-specific dates.
When you can’t guarantee the vertical spacing for the dates will be uniform, you can’t use a GraduatedScale, since GraduatedScale assumes a linear scale (simple distance for GraduatedScaleLinear and angle for GraduatedScaleElliptical). You’ll need to calculate the actual date demarcations and paint or generate background rectangles correspondingly.