Sparkline graph opacity with MVC

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    15 posts
    Member since:
    Feb 2013

    Posted 26 Jul 2013 Link to this post

    Anyway to change the opacity for the background the sparkline graphs in MVC. I would even accept changing the background color.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 30 Jul 2013 Link to this post

    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!
  3. Kendo UI is VS 2017 Ready
  4. Travis
    Travis avatar
    11 posts
    Member since:
    Jul 2011

    Posted 30 Apr 2015 in reply to Iliana Nikolova Link to this post

    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?
  5. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2593 posts

    Posted 04 May 2015 Link to this post

    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!
     
Back to Top
Kendo UI is VS 2017 Ready