Javascript plotBands使绘图线在图表中消失
当我在X轴上的两点之间使用PlotBand,并使用点线在这两点之间绘制一条线时,它不会出现,但如果在Y轴上使用相同的方法,则一切都会正常工作 这是我的密码Javascript plotBands使绘图线在图表中消失,javascript,jquery,highcharts,highstock,Javascript,Jquery,Highcharts,Highstock,当我在X轴上的两点之间使用PlotBand,并使用点线在这两点之间绘制一条线时,它不会出现,但如果在Y轴上使用相同的方法,则一切都会正常工作 这是我的密码 $(function () { var chart = new Highcharts.Chart({ chart: { renderTo: 'container' }, xAxis: { plotBands: [{ // mark the weekend
$(function () {
var chart = new Highcharts.Chart({
chart: {
renderTo: 'container'
},
xAxis: {
plotBands: [{ // mark the weekend
color: 'rgba(68, 170, 213, 0.2)',
from: Date.UTC(2010, 0, 2),
to: Date.UTC(2010, 0, 4)
}],
plotLines:[{
value: Date.UTC(2010, 0, 3),
color: 'green',
dashStyle: 'shortdash',
width: 2,
}],
plotLines:[{
value: Date.UTC(2010, 0, 6),
color: 'green',
dashStyle: 'shortdash',
width: 2,
}],
tickInterval: 24 * 3600 * 1000, // one day
type: 'datetime'
},
yAxis:{
plotLines:[{
value : 200,
color: 'green',
dashStyle: 'shortdash',
width: 2,
}] ,
plotBands: [{ // mark the weekend
color: 'rgba(68, 170, 213, 0.2)',
from: 150,
to: 250,
}],
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4 , 255.7],
pointStart: Date.UTC(2010, 0, 1),
pointInterval: 24 * 3600 * 1000
}]
});
});
我还对其进行了修改我认为您的问题是,如果要设置两条绘制线,必须将它们通过一个数组,如以下代码:
plotLines:[{
value: Date.UTC(2010, 0, 3),
color: 'green',
dashStyle: 'shortdash',
width: 2,
}, {
value: Date.UTC(2010, 0, 6),
color: 'green',
dashStyle: 'shortdash',
width: 2,
}]
如何添加一条以上的打印线:如何编辑绘图线的zindex:我认为您的问题是,如果要设置2条绘图线,必须将它们通过数组传递,如以下代码所示:
plotLines:[{
value: Date.UTC(2010, 0, 3),
color: 'green',
dashStyle: 'shortdash',
width: 2,
}, {
value: Date.UTC(2010, 0, 6),
color: 'green',
dashStyle: 'shortdash',
width: 2,
}]
如何添加一条以上的打印线:如何编辑绘图线的zindex:使用zindex绘制线或绘图带位置
plotLines: [{
width: 3,
color: "#808080"
},{
value: "200",
width: 4,
color: "#FF0000",
zIndex: 4}],
使用zIndex打印线或打印带位置
plotLines: [{
width: 3,
color: "#808080"
},{
value: "200",
width: 4,
color: "#FF0000",
zIndex: 4}],
编辑行的zIndex并将它们放在Band@MinaGabriel看第二把小提琴。我还有一个难题,如果你能帮助我,我很感激Zindex编辑是一个强大的解决方案。谢谢:)你让我开心!编辑行的zIndex并将它们放在Band@MinaGabriel看第二把小提琴。我还有一个难题,如果你能帮助我,我很感激Zindex编辑是一个强大的解决方案。谢谢:)你让我开心!