Javascript 谷歌床单烛台图修改高低线宽?
我一直在使用谷歌的烛台图表,并根据我的需要定制一切,只是烛台上下线条的宽度不能修改,或者我根本没有找到这样做的方法。我的代码如下所示:Javascript 谷歌床单烛台图修改高低线宽?,javascript,css,google-apps-script,google-visualization,candlestick-chart,Javascript,Css,Google Apps Script,Google Visualization,Candlestick Chart,我一直在使用谷歌的烛台图表,并根据我的需要定制一切,只是烛台上下线条的宽度不能修改,或者我根本没有找到这样做的方法。我的代码如下所示: <script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['corechart']}]}"></script> <s
<script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1.1','packages':['corechart']}]}"></script>
<script>
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Mon', 20, 28, 38, 45],
['Tue', 31, 38, 55, 66],
['Wed', 50, 55, 77, 80],
['Thu', 77, 77, 66, 50],
['Fri', 68, 66, 22, 15]
// Treat first row as data as well.
], true);
var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div'));
chart.draw(data, {
selectionMode: 'multiple',
backgroundColor: {
strokeWidth: 3,
stroke: 'black',
},
vAxis: {
gridlines: {
count: -1,
},
minorGridlines: {
count: 4,
}
},
hAxis: {
textStyle: {
color: 'white',
}
},
focusTarget: 'category',
colors: ['black', 'black'],
legend: 'none',
theme: 'maximized',
candlestick: {
hollowIsRising: 'false',
risingColor: {
fill: 'green',
stroke: 'black',
strokeWidth: 1, // Here you can clearly see that I changed the candlestick's stroke to a smaller value which would basically be the same as decreasing the "border width".
},
fallingColor: {
fill: 'red',
stroke: 'black',
strokeWidth: 1, // Here you can clearly see that I changed the candlestick's stroke to a smaller value which would basically be the same as decreasing the "border width".
}
}
});
}
</script>
<div id="chart_div" style="width: 900px; height: 500px;"></div>
可悲的是,它不起作用。希望你们有一些想法。国王问候 我对那些图表不熟悉,上面和下面的线叫什么?以防万一你想看一看。嗨@hoshhunt,我已经读了10遍烛台API了,没有发现任何东西。我也研究过其他网站,但没有哪个网站给出具体的说明。我从金融学知道的是,顶线是高的,下面是低的。“高”将等同于“上”阴影,“低”将等同于“下”阴影,这些是业务中提到的术语。就javascript而言,我真的不知道该寻找什么。谢谢你的快速回复!!有可能没有办法改变它,API显然没有提到任何东西。
bar: {
strokeWidth: 1,
},