This is a migrated thread and some comments may be shown as answers.

Sparkline graph opacity with MVC

3 Answers 38 Views
Sparkline
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 26 Jul 2013, 06:24 PM
Anyway to change the opacity for the background the sparkline graphs in MVC. I would even accept changing the background color.

3 Answers, 1 is accepted

Sort by
0
Iliana Nikolova
Telerik team
answered on 30 Jul 2013, 12:47 PM
Hello Andrew,

You could change the background via Background option of the plotArea / chartArea. I.e.: 
@(Html.Kendo().Sparkline()
  //....
  .ChartArea(c=>c.Background("red"))
  .PlotArea(p=>p.Background("green"))
)
As for the background opacity, it appears there is a bug in the current version of Kendo UI Chart for ASP.NET MVC and it is not possible to set opacity to the chartArea / plotArea. I forwarded the issue to our developers - we will do our best to provide a fix as soon as possible. Please excuse us for the inconvenience caused. 
 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Travis
Top achievements
Rank 1
answered on 30 Apr 2015, 04:45 PM
Did this ever get fixed?  I have the same need.  I want to set the background and chart are to be transparent, while keeping the databar itself NOT transparent.  Today it seems that setting the opacity changes both to be transparent... can you tell me the fix?
0
Iliana Nikolova
Telerik team
answered on 04 May 2015, 10:35 AM
Hi Travis,

You could set transparent background to the ChartArea while keeping the series not transparent:
@(Html.Kendo().Sparkline()
    //....
    .ChartArea(ch => ch.Background("transparent"))
)


Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Sparkline
Asked by
Andrew
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Travis
Top achievements
Rank 1
Share this question
or