Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/442.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何更改剑道图';背景图像是什么?_Javascript_Kendo Ui_Telerik_Kendo Chart - Fatal编程技术网

Javascript 如何更改剑道图';背景图像是什么?

Javascript 如何更改剑道图';背景图像是什么?,javascript,kendo-ui,telerik,kendo-chart,Javascript,Kendo Ui,Telerik,Kendo Chart,如何使用此代码更改剑道图的背景?可能吗 .HtmlAttributes(new { style = "background: url('~/shared/pics/harita.png')" }) 有什么问题吗?请对图表进行以下更改,以便在后台显示图像 在图表定义中,确保已将图表区背景设置为transperant。 见下文: @(Html.Kendo().StockChart<ChartModel>() .Name("stockDemoChart") .............

如何使用此代码更改剑道图的背景?可能吗

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

有什么问题吗?

请对图表进行以下更改,以便在后台显示图像

  • 在图表定义中,确保已将图表区背景设置为transperant。 见下文:

    @(Html.Kendo().StockChart<ChartModel>()
     .Name("stockDemoChart")
     .................
     .................
     .ChartArea(chartArea => chartArea.Background("transparent"))
    
    @(Html.Kendo().StockChart())
    .名称(“股票数据图表”)
    .................
    .................
    .ChartArea(ChartArea=>ChartArea.Background(“透明”))
    
  • 不必在HtmlAttributes中指定图表背景,您可以根据图表名称对其进行样式设置。请参见以下内容:

    <style>
       #stockDemoChart {
       background: center no-repeat url('@Url.Content("~/shared/pics/demo.png")')
       }
    </style>
    
    
    #股票人口统计图{
    背景:中心无重复url('@url.Content(“~/shared/pics/demo.png”))
    }
    

  • 请对图表进行以下更改,以便在背景中显示图像

  • 在图表定义中,确保已将图表区背景设置为transperant。 见下文:

    @(Html.Kendo().StockChart<ChartModel>()
     .Name("stockDemoChart")
     .................
     .................
     .ChartArea(chartArea => chartArea.Background("transparent"))
    
    @(Html.Kendo().StockChart())
    .名称(“股票数据图表”)
    .................
    .................
    .ChartArea(ChartArea=>ChartArea.Background(“透明”))
    
  • 不必在HtmlAttributes中指定图表背景,您可以根据图表名称对其进行样式设置。请参见以下内容:

    <style>
       #stockDemoChart {
       background: center no-repeat url('@Url.Content("~/shared/pics/demo.png")')
       }
    </style>
    
    
    #股票人口统计图{
    背景:中心无重复url('@url.Content(“~/shared/pics/demo.png”))
    }