.SeriesColors array syntax is wrong using Json data

2 posts, 0 answers
  1. Cindy
    Cindy avatar
    10 posts
    Member since:
    Nov 2012

    Posted 04 Nov 2013 Link to this post

    using syntax to bind to JSON series data, .SeriesColors array syntax error

    .Title("IV Capture")
    .DataSource(dataSource => dataSource.Read(read => read.Action("FetchChartData", "Home"))
    .Group(group => group.Add(model => model.SModality))
    .Sort(sort => sort.Add(model => model.Zone).Ascending())
    .Series(series =>
    series.Column(model => model.IValue)
    .CategoryAxis(axis =>
    axis.Categories(model => model.Zone)
    .Labels(labels => labels.ToString())
    .ValueAxis(axis => axis
    .Numeric().Labels(labels => labels.Format("{0}"))
      .SeriesColors(["#cd1533", "#d43851", "#dc5c71", "#e47f8f", "#eba1ad","#99d7ef"])

    above syntax is wrong for .SeriesColors

  2. Iliana Nikolova
    Iliana Nikolova avatar
    2622 posts

    Posted 06 Nov 2013 Link to this post

    Hi Cindy,

    The correct syntax for seriesColors is as follows:

       "#cd1533", "#d43851", "#dc5c71", "#e47f8f", "#eba1ad",
       "#009bd7", "#26aadd", "#4db9e3", "#73c8e9", "#99d7ef"
    For working example take a look at this online demo

    Iliana Nikolova
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top