How to set chart series from jQuery script?

2 posts, 0 answers
  1. Kim
    Kim avatar
    15 posts
    Member since:
    Nov 2014

    Posted 04 Dec 2014 Link to this post

    I have a script like this:

            url: '@Url.Action("GetThrowData", "UserConsoleViewModels")',
            type: 'POST',
            dataType: 'json',
                throwId: _throwId
            function (response) {
            function (xhr, status, error) {

    Right now the RawData property (a comma delimited list of floats) is just being printed to a label.  What I would like to do is apply it as a series in a chart similar to this:

      .Title("Switch Current Graph")
      .Legend(legend => legend
      .ValueAxis(axis => axis.Numeric()
          .Labels(labels => labels.Format("{0}"))
      ).HtmlAttributes(new { style = "height:300px" })
      .Tooltip(tooltip => tooltip

    How would I do that?
  2. Hristo Germanov
    Hristo Germanov avatar
    703 posts

    Posted 08 Dec 2014 Link to this post

    Hello Morgan,

    In this case the you should create the chart with javascript instead of using wrappers. You can examine this online example and you can try to build the chart with the response in the jquery ajax done.

    I hope this helps.

    Hristo Germanov

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top