0
我正在使用Google Visulization圖表。爲什麼谷歌燭臺fallingColor和risingColor不適合這個?
我想畫K線圖與樣本數據,我面臨的問題是,下降的顏色,提高色彩被代表了單一顏色只有
這是我的代碼
var mydata = [['13-Oct',1109.95,1132,1097.95,1113.45],['14-Oct',1113.45,1117,1095.6,1101.15],['15-Oct',1116,1132,1092.1,1129.2],['16-Oct',1130,1182.4,1130,1170.3],['19-Oct',1174,1182.2,1144.5,1162.15]];
function drawChart() {
var data = google.visualization.arrayToDataTable(mydata, 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);
}
這是我的小提琴
http://jsfiddle.net/pdmpb9w1/7/
能否請你讓我知道如何解決這個問題?
檢查您的數據,我認爲這是您的問題所在。見http://jsfiddle.net/pdmpb9w1/8/ –