2017-08-10 87 views

回答

1

所以經過多次挖掘,我們找到了答案。這裏是如何做到這一點的情況下,你遇到了同樣的問題:

在HTML文件中:

<kendo-stockchart [seriesColors]="['silver','cyan']"> 

<kendo-chart-value-axis> 
      <kendo-chart-value-axis-item [line]="{visible:true}" [plotBands]="plotBand1"> 
      <kendo-chart-value-axis-item-labels format='s'> 
      </kendo-chart-value-axis-item-labels> 

      </kendo-chart-value-axis-item> 
     </kendo-chart-value-axis> 

       <kendo-chart-series> 
       <kendo-chart-series-item type="column" [data]="series" field="High" categoryField="Date"> 
       </kendo-chart-series-item> 
      </kendo-chart-series> 
</kendo-stockchart> 

在你的.ts文件中定義plotBandValues就象這樣:

public plotBand1 = [{ 
"color": "darkorange", 
"from": 29, 
"opacity": 0.5, 
"to": 29.5 
}] 

和這應該顯示這樣一行:

enter image description here