DataViz Chart - Showing Values?

2 posts, 1 answers
  1. Richard Weeks
    Richard Weeks avatar
    95 posts
    Member since:
    Oct 2009

    Posted 11 Jul 2012 Link to this post

    If I have a column in a chart with a value of "20", how do I show that value (e.g. sitting above the column)?

    Can't see it anywhere and none of the demos show this...

    In the demos, the value is present in the tooltip but my users might be far too lazy for that! They just want to see the value over each column.

    Here's what I have in the context of Kendo for MVC Razor:
    @using MyNamespace
     
    @model Totals
                
    @{
        ViewBag.Title = "Chart";
    }
     
    @(Html.Kendo().Chart<Totals>()
        .Name("chart")
        .Title("Totals")
        .DataSource(ds => ds.Read(read => read.Action("GetTotals", "Home")))
        .Series(series =>
        {
            series.Column(model => model.Total).Name("Total");
        })
    )

    Thanks!

    Richard
  2. Answer
    Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2595 posts

    Posted 16 Jul 2012 Link to this post

    Hi Richard,

    To achieve the desired behavior you could configure the labels of the series. For example: 
    @(Html.Kendo().Chart<Totals>()
        .Name("chart")
        .Title("Totals")
        .DataSource(ds => ds.Read(read => read.Action("GetTotals", "Home")))
        .Series(series =>
        {
            series.Column(model => model.Total).Name("Total").Labels(lables => lables.Visible(true));
        })
    )

    More detailed information about the Kendo UI Chart configuration options is available in our online documentation. Also, here is an online demo which illustrates the above mentioned approach in action.

    Kind regards,
    Iliana Nikolova
    the Telerik team
    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
Back to Top