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

Update category axis labels on chart refresh

0 Answers 209 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Mohammed
Top achievements
Rank 1
Mohammed asked on 21 Nov 2012, 03:00 PM
Hi all,

I want to update the labels shown in the category axis in line chart when new data is bound and refresh method is called.
All the values are getting shown in the chart except the labels present in the category axis. FYI the category axis is showing time. So after each minute the category axis should update the time label shown in the chart.

Any help will be very much helpful to me.

Posting my Code for your reference
 @(Html.Kendo().Chart(Model)
        .Name("RPMchart")
        
        .Legend(legend => legend
            .Position(ChartLegendPosition.Bottom)
        )
                //.DataSource(ds => ds.Read(read => read.Action("MonitoringJson", "Application")))
        .Series(series => {
            series.Line(model => model.RequestsPerMinute)
                .Name("Request Per Minute")
                .Labels(labels => labels.Format("{0}").Visible(false));
        })
        .CategoryAxis(axis => axis
            .Categories(model => model.Minute.TimeOfDay)
                            .Labels(labels => labels.Format("{0}").Rotation(-90))
            
        )
        .HtmlAttributes(new { style = "height:400px;width:400px" })
        .ValueAxis(axis => axis.Numeric()
                    .Labels(labels => labels.Format("{0:N0}"))
                    
                ).Tooltip(tooltip => tooltip
                    .Visible(true)
                    .Format("{0:N0}")
                )
    ) 



Thanks
Alam

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Mohammed
Top achievements
Rank 1
Share this question
or