用类别轴绘制垂直线jqPlot

时间:2020-04-29 13:59:00

标签: javascript jquery jqplot

您好,我想在jqplot图表中绘制垂直线,该轴已在Java Bean中以系列设置

我正在使用此扩展程序:

    this.cfg.grid = {             
        background: '#FFFFFF',
        borderColor: '#A8A8A8',
        gridLineColor: '#E6E6E6',
        borderWidth: 0.3,
        shadow: false       
};


this.cfg.seriesDefaults.rendererOptions = {
        barMargin: 3,
        barPadding: 1
};  

var lines = [];
try {
    var dates= JSON.parse($('#vertical').val());
    for(var i = 0; i<fechas.length ;i++){
        alert(fechas[i]);
        lines.push(
                {verticalLine: {
                    name: 'timeline' + i,
                    x: dates[i],
                    yOffset: 0,
                    lineWidth: 3,
                    color: '#144B65',
                    shadow: false
                }}
        );

    }   
}
catch(err) {
}

$('#graphEvolucion').height($('#graphContainer').height() * 0.93);
$('#graphEvolucion').width($('#graphContainer').width() * 0.98);

this.cfg.canvasOverlay = {
        show: true,
        objects: lines 
 };

This is what i got

有什么建议吗?

非常感谢

0 个答案:

没有答案