Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Bar Chart - Error with ChartSeriesFactory

$
0
0

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>


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>