如何在Google Charts Api中更改烛台后面的烛台?
candlestick:{fallingColor:{fill:"red", strokeWidth:0.5,stroke:'black'},
risingColor:{fill:"yellowgreen",strokeWidth:0.5,stroke:'black'}}}
stroke
选项会更改框的颜色,但不会更改背后的粘贴。我得到了这个奇怪的黑色框与绿色或红色和蓝色stic的颜色组合。
无法在docs
答案 0 :(得分:4)
colors
参数将修改“棒”的颜色。这为图表中的每个系列指定了默认颜色。
E.g。将第一个系列的指针改为红色,将第二个系列的指针改为棕色:
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 options = {
legend: 'none',
colors: ['red','brown'],
candlestick: {
fallingColor:{ fill: "orange", strokeWidth:0.5, stroke:'black'},
risingColor:{ fill: "yellowgreen", strokeWidth:0.5, stroke:'black'}
}
};
var chart = new google.visualization.CandlestickChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
答案 1 :(得分:0)
这是不可能的,但是如果你想要加入,就会有一个GitHub issue。