I have a script like this:
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:
How would I do that?
$.ajax(
{
url: '@Url.Action("GetThrowData", "UserConsoleViewModels")',
type: 'POST',
dataType: 'json',
data:
{
throwId: _throwId
}
}
).done(
function (response) {
console.log(response);
$("#direction").text(response.Data.Action);
$("#lblRawData").text(response.Data.RawData);
}
).error(
function (xhr, status, error) {
alert(xhr.responseText);
}
);
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:
@(Html.Kendo().Chart()
.Name("currentGraph")
.Title("Switch Current Graph")
.Legend(legend => legend
.Position(ChartLegendPosition.Bottom)
)
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels.Format("{0}"))
.Title("Current")
).HtmlAttributes(new { style = "height:300px" })
.Tooltip(tooltip => tooltip
.Visible(true)
.Format("{0}")
)
)
How would I do that?