Hi.
Have tested timeline and thought about it in sports
To add:
contentPosition : [before/after] - if before, content is right aligned and when after, it's left aligned
Take a look at the imagefile attached
<body>
<div class="easyui-panel" style="padding:10px">
<div class="easyui-timeline" data-options="data:data,formatter:myFormatter"></div>
</div>
<script type="text/javascript">
$(document).ready(function(){
})
var data = [
{content:'Goal',contentPosition:'before',time:'10:30',playerName:'Player #1',info:''},
{content:'Penalty',contentPosition:'after',time:'12:00',playerName:'Player #2',info:'Yellow Card'},
{content:'Goal',contentPosition:'before',time:'14:30',playerName:'Player #3',info:''},
{content:'Goal',contentPosition:'after',time:'16:30',playerName:'Player #4',info:''}
]
function myFormatter(row){
var textContent = '<div>'+row.time+' - '+row.content+'</div>'
textContent += '<div style="font-size:12px;opacity:0.5">'+row.playerName+'</div>'
textContent += '<div style="font-size:12px;opacity:0.5">'+row.info+'</div>'
return textContent;
}
</script>
</body>
EasyUI

