2015-06-30 32 views

回答

3

只需覆蓋以下CSS屬性的≥C3-的Xgrid對焦類: -

.c3-grid .c3-xgrid-focus { visibility : hidden !important; }

我不能很快找到一個配置參數的API文檔,以關閉此功能。

enter image description here

+0

,我不認爲這是一個很好的解決方案在CSS覆蓋的人數是C3許多方法來爲你做這個。 工具提示可以顯示被刪除:假 更多信息@ http://c3js.org/reference.html – BonifatiusK

-2
point: { 
show: false 
}, 

假隱藏點和表現出真正的點

注: 確保你會寫這之後的加載數據和連同其他設置在C3生成功能

下面是實施例: http://c3js.org/reference.html#point-show

在下面的代碼,我突出了代碼的註釋:

var chart = c3.generate({ 
    bindto: '#CYCLE_CHART', 
    data: { 
    columns: [ 
     ["Cycletime"].concat(objCycle.cData), ["Downtime"].concat(objDowntime.dData), ["StdCycletime"].concat(objStdCycle.stdCData), ["StdLoadunloadtime"].concat(objStdLUtime.stdLUData), 
    ], 
    type: 'spline', 
    types: { 
     Cycletime: 'bar', 
     Downtime: 'bar' 
    }, 
    names: { 
     Cycletime: 'Cycle time', 
     Downtime: 'Load time', 
     StdCycletime: 'Std Cycle time', 
     StdLoadunloadtime: 'Std Load time' 

    }, 
    }, 
    axis: { 
    x: { 
     label: { 
     text: 'Cycles', 
     position: 'outer-center' 
     }, 
     max: 10, 
     min: 1, 
    }, 
    y: { 
     label: { 
     text: 'Seconds', 
     position: 'outer-middle' 
     }, 
     max: Y_axis, 
     min: 1, 
    } 
    }, 

    // Here! 
    point: { 
    show: false 
    }, 

    tooltip: { 
    show: true 
    } 
}); 
11
grid:{ 
    focus:{ 
    show:false 
    } 
} 

可在那個時候的人回答沒有提供這個問題的配置參數,但現在你可以做到這一點通過上面提到的配置。參考下面

var chart = c3.generate({ 
    data: { 
     columns: [ 
      ['data1', 30, 200, 100, 400, 150, 250], 
      ['data2', 50, 20, 10, 40, 15, 25] 
     ] 
    }, 
    grid:{ 
     focus:{ 
     show:false 
     } 
    } 
}); 
+0

大家好,我用這個配置已經試過和它的工作原理。 事情是,雖然,它的不存在的API中了, 沒有人知道這是爲什麼? (不贊成,因錯誤等原因刪除) – GrizzlyMcBear

+0

@GrizzlyMcBear我已經嘗試過它,它仍然在工作。 – ni8mr

相關問題