在多窗格Highstock图表中仅为一个窗格设置背景色 [英] Set background color for only one pane in multi-pane Highstock chart

查看:65
本文介绍了在多窗格Highstock图表中仅为一个窗格设置背景色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在此示例中: http://www.highcharts.com/stock/demo/candlestick-and-volume ,是否可以设置第二个窗格的背景颜色?

In this example: http://www.highcharts.com/stock/demo/candlestick-and-volume, is there a way to set the background color of the second pane?

例如,如果在图表定义中添加 plotBackgroundColor:'#FCFFC5',则两个窗格都将变为黄色.

For example, if you add plotBackgroundColor: '#FCFFC5' to the chart definition, then both panes become yellow.

是否可以仅将第二个(下部)窗格设为黄色?

Is it possible to make only the second (lower) pane yellow?

推荐答案

可以使用plotBands在第二个窗格中更改特定范围的背景颜色.

it's possible to change the background color for a specific range in your second pane using plotBands.

例如yAxis:{[...plotBands:{color:'#f7d724',from:-50,to:50},...]}

e.g. yAxis : {[ ... plotBands : {color : '#f7d724', from : -50, to : 50}, ... ]}

这篇关于在多窗格Highstock图表中仅为一个窗格设置背景色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆