簡體   English   中英

如何更改劍道圖的背景圖像?

[英]How can I change Kendo Chart's Background Image?

如何使用此代碼更改劍道圖表的背景? 可能嗎?

.HtmlAttributes(new { style = "background: url('~/shared/pics/harita.png')" })

怎么了

請對圖表進行以下更改,以在后台顯示圖像。

  1. 在圖表定義中,確保已將“圖表區域”背景設置為透明。 見下文:

     @(Html.Kendo().StockChart<ChartModel>() .Name("stockDemoChart") ................. ................. .ChartArea(chartArea => chartArea.Background("transparent")) 
  2. 無需在HtmlAttributes中指定圖表背景,而是可以根據圖表名稱設置樣式。 見下文:

     <style> #stockDemoChart { background: center no-repeat url('@Url.Content("~/shared/pics/demo.png")') } </style> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM