2016-04-14 5 views
0

Belirli bir öğeyi görsel zaman çizelgesi grafiğimin altına koymam gerekiyor. Öğeyi oluşturulduktan sonra grafiğin altına taşımak için jquery'yi kullanabilirim. Sorun şu ki, bir sonraki maddeyle kucağa çıkabilir. ve ayrıca diğer öğeler doğru şekilde hizalanmayabilir.zaman çizelgesi grafiğin altındaki belirli bir öğenin nasıl yerleştirileceğini ve tüm öğelerin hala düzgün şekilde hizalandığını gösterir

Bu konudaki yardımlarınız büyük beğeni topluyor.

Teşekkür

burada

kod

olduğunu https://jsfiddle.net/gbdjbdhv/28/

var container = document.getElementById('visualization'); 

var items = new vis.DataSet([ 
    {id: 1, className:'item4', content: 'item 1', start: '2016-04-10'}, 
    {id: 2, className:'item5', content: 'item 2', start: '2016-04-10'}, 
     {id: 3, className:'item4', content: 'item 3', start: '2016-04-10'}, 
     {id: 13, className:'item4', content: 'item 5', start: '2016-04-16'}, 
    {id: 4, className:'likeToBeBottom', content: 'like to put this item at bottom', start: '2016-04-16'}, 
     {id: 5, className:'item4', content: 'item 5', start: '2016-04-18'}, 
    {id: 6, className:'item5', content: 'item 6', start: '2016-04-18'}, 
     {id: 7, className:'item4', content: 'item 7', start: '2016-04-18'}, 
    {id: 8, className:'item5', content: 'item 8', start: '2016-04-18'}, 
     {id: 9, className:'item4', content: 'item 9', start: '2016-04-25'}, 
    {id: 10, className:'item5', content: 'item 10', start: '2016-04-25'}, 
    {id: 11, className:'item6', content: 'item 11', start: '2016-04-25'} 
    ]); 

    var options = { 
    showCurrentTime: true, 
      align: 'left', 
    orientation: {axis: 'both', item: 'top'}, 
    height: 400, 
    margin: { 
     axis: 100 
    } 
    }; 
    var timeline = new vis.Timeline(container, items, options); 
    if ($('.vis-current-time')){ 
     var height = $('.vis-current-time').height(); 
     $('div.vis-item.vis-box.likeToBeBottom').css({'top': height -180}); 
    } 

The problem is that the item I moved to bottom overlap with other items

[enter image description here]

cevap

0

İki gruplarını kullanabilir ve istediğiniz öğeyi koymak olabilir yatak ikinci grupta altta görüntülenir. Grupları kullandığınızı gizlemek istiyorsanız, sol tarafta görüntülenen ızgaraları ve grup etiketlerini gizlemek için bazı CSS kullanabilirsiniz.

İlgili konular