Update category axis labels on chart refresh

1 posts, 0 answers
  1. Mohammed
    Mohammed avatar
    1 posts
    Member since:
    Nov 2012

    Posted 21 Nov 2012 Link to this post

    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
            .Legend(legend => legend
                    //.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

Back to Top