Bar Chart - Error with ChartSeriesFactory

2 posts, 1 answers
  1. Reafidy
    Reafidy avatar
    1 posts
    Member since:
    Sep 2014

    Posted 16 Jan Link to this post

    I am using asp.net mvc 6 and your example chart code below.  I get an compile error on .bar -  ChartSeriesFactory' does not contain a definition for 'Bar' and no extension method 'Bar' accepting a first argument of type 'ChartSeriesFactory' could be found (are you missing a using directive or an assembly reference?

    I'm using your latest code 2016.1.112 trial version and set up exactly as described in your documentation.

    <div class="demo-section k-content wide">

        @(Html.Kendo().Chart()
            .Name("chart")
            .Title("Site Visitors Stats \n /thousands/")
            .Legend(legend => legend
                .Visible(false)
            )
            .ChartArea(chartArea => chartArea
                .Background("transparent")
            )
            .Series(series =>
            {
                series.Bar(new double[] { 56000, 63000, 74000, 91000, 117000, 138000 }).Name("Total Visits");
                series.Bar(new double[] { 52000, 34000, 23000, 48000, 67000, 83000 }).Name("Unique visitors");
            })
            .CategoryAxis(axis => axis
                .Categories("Jan", "Feb", "Mar", "Apr", "May", "Jun")
                .MajorGridLines(lines => lines.Visible(false))
            )
            .ValueAxis(axis => axis
                .Numeric()
                .Max(140000)
                .Line(line => line.Visible(false))
                .MajorGridLines(lines => lines.Visible(true))
            )
            .Tooltip(tooltip => tooltip
                .Visible(true)
                .Template("#= series.name #: #= value #")
            )
        )
    </div>

  2. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 20 Jan Link to this post

    Hello,

    The MVC 6 (or is it ASP.NET Core 1.0?) helpers are not functionally complete yet. They do not share code with our existing MVC 3/4/5 solution and we're rewriting them from scratch.

    That said, we'll have the full set ready in a short time-frame. Hopefully, in time for the official release.

    Apologies for the caused inconvenience.

    Regards,
    T. Tsonev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top