6r4phy / simile-widgets

Automatically exported from code.google.com/p/simile-widgets
0 stars 0 forks source link

TIMELINE. Missing event when same starting date #268

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
First of all, thank you for the timeline project. I really appreciate this
function. I use it to convert a MS Project Timeline file into a web timline.

I have an XML with the following contents (excerpt):

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Monday, August 25, 2008 8:00:00 AM" title="Ready for SFAT GES
function Arboga"> <![CDATA[ 500 ]]> </event>

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Monday, August 25, 2008 8:00:00 AM" title="Ready for SFAT GES
function Linköping"><![CDATA[ 500 ]]> </event>

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Monday, August 25, 2008 8:00:00 AM" end="Friday, August 29, 2008
3:42:00 PM" title="SFAAT GES function Arboga">- <![CDATA[ 500 ]]> </event>

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Monday, August 25, 2008 8:00:00 AM" end="Friday, August 29, 2008
3:42:00 PM" title="SFAAT GES function Linköping">- <![CDATA[ 500 ]]> </event>

Consider the previous code. The first 4 events have the same start time.
Number 3 and 4 have an endtime, but not 1 and 2. The problem is that only
event number 4 is showing on the timeline.

The same problem occurs several times, for instance using the following XML:

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Friday, August 29, 2008 3:42:00 PM" title="Delivery GES-function
Arboga to PM">- <![CDATA[ 500 ]]> </event>

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Friday, August 29, 2008 3:42:00 PM" title="Delivery GES-function
Linköping to PM">- <![CDATA[ 500 ]]> </event>

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Friday, August 29, 2008 3:42:00 PM" title="GES-function Arboga start
of operation">- <![CDATA[ 500 ]]> </event>

<event color="blue"
icon="http://simile.mit.edu/timeline/api/images/blue-circle.png"
start="Friday, August 29, 2008 3:42:00 PM" title="GES-function Linköping
start of operation">- <![CDATA[ 500 ]]>

The start time is the same for the previous 4 events, but only number 3 and
4 are showing.

I use the following script to show the timeline:

<script language="javascript" type="text/javascript">
var tl;
function onLoad() {
var thisDate = Date();
var eventSource = new Timeline.DefaultEventSource();
var bandInfos = [
Timeline.createBandInfo({
eventSource: eventSource,
date: thisDate ,
width: "80%",
intervalUnit: Timeline.DateTime.MONTH,
intervalPixels: 100
}),
Timeline.createBandInfo({
showEventText: false,
trackHeight: 0.5,
trackGap: 0.2,
eventSource: eventSource,
date: thisDate ,
width: "20%",
intervalUnit: Timeline.DateTime.YEAR,
intervalPixels: 200
})
];
bandInfos[1].syncWith = 0;
bandInfos[1].highlight = true;
bandInfos[1].eventPainter.setLayout(bandInfos[0].eventPainter.getLayout());

var theme = Timeline.ClassicTheme.create();
        theme.event.label.width = 250; // px
        theme.event.bubble.width = 250;
        theme.event.bubble.height = 200;

/**/

for (var i = 0; i < bandInfos.length; i++) {
            bandInfos[i].decorators = [
                new Timeline.PointHighlightDecorator({
                    date: thisDate,
                    color: "#FFC080",
                    opacity: 50,
                    theme: theme
                })
            ];
        }
/**/

tl = Timeline.create(document.getElementById("my-timeline"), bandInfos);
Timeline.loadXML("ParseMilestones.asp", function(xml, url) {
eventSource.loadXML(xml, url); });
}

var resizeTimerID = null;
function onResize() {
if (resizeTimerID == null) {
resizeTimerID = window.setTimeout(function() {
resizeTimerID = null;
tl.layout();
}, 500);
}
}
</script>

Tested on IE6 and FF 2 on Windows XP 

[Submitted by Jonas Gustafsson on simile.mit.edu] 

Original issue reported on code.google.com by GabrielR...@googlemail.com on 14 Apr 2009 at 12:00

GoogleCodeExporter commented 8 years ago
I have noticed a similar issue. The bottom timeline will not display more than 4
vertical rows of events. They overlap and you lose the details for the lower 
level
projects.

As you can see on the attachment, there are 7 events on the top timeline, but 
only 3
rows are being displayed on the bottom timeline. 

Original comment by lastpix...@gmail.com on 17 Jun 2009 at 4:19

Attachments:

GoogleCodeExporter commented 8 years ago
Any chance you could share the code that converts the Microsoft project file to 
a data 
source, or does it read directly from an .mpp file.

Original comment by bradsu...@gmail.com on 5 Jan 2010 at 6:48