This is a migrated thread and some comments may be shown as answers.

DataViz Chart - Showing Values?

1 Answer 97 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Richard Weeks
Top achievements
Rank 2
Richard Weeks asked on 12 Jul 2012, 04:16 AM
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

1 Answer, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 16 Jul 2012, 08:57 AM
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!
Tags
Charts
Asked by
Richard Weeks
Top achievements
Rank 2
Answers by
Iliana Dyankova
Telerik team
Share this question
or