2017-09-02 43 views
0

我正在嘗試在anystock圖表中更改軸行程和軸字體顏色。我嘗試使用anycharts的正常方法,它沒有奏效。 有沒有辦法改變這些值?任何在股票軸心卒中?

回答

0

您可能正在尋找這些方法:

https://api.anychart.com/7.14.3/anychart.core.stock.Plot#yAxis https://api.anychart.com/7.14.3/anychart.core.stock.Plot#xAxis

這裏有一個例子:https://jsfiddle.net/vmgwemws/

chart.plot(0).yAxis().stroke("Red"); 
    chart.plot(0).yAxis().ticks().stroke("Red"); 
    chart.plot(0).yAxis().labels().fontColor("Red"); 
    chart.plot(0).yAxis().labels().fontFamily("Courier"); 

    chart.plot(0).xAxis().labels().fontColor("Red"); 
    chart.plot(0).xAxis().labels().fontFamily("Courier"); 

    chart.plot(0).xAxis().minorLabels().fontColor("Red"); 
    chart.plot(0).xAxis().minorLabels().fontFamily("Courier"); 

    chart.plot(0).xAxis().background("Gray 0.5"); 
+0

這似乎只是我的圖上部分工作。我不確定有什麼問題。 Screenshot 爲什麼只有一些標籤會變紅? – Joshacola

+0

@Joshacola是否添加了chart.plot(0).xAxis()。minorLabels()。fontColor(「Red」); 和 –

+0

以及chart.plot(0).xAxis()。labels()。fontColor(「Red」); ? –