Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/18/13 17:24:29 (11 years ago)
Author:
pfleck
Message:

#2063:
Added time selection for charts.
Implemented redrawing of charts using Ajax.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml

    r9628 r9643  
    5050            },
    5151            dataRenderer: ajaxDataRenderer,
    52             dataRendererOptions: {
    53                 unusedOptionalUrl: "@url"
    54             },
    5552            axes: {
    5653                xaxis: {
     
    9794    </script>
    9895}
     96
     97@helper RefreshChart(string destinationTag, string url, string startDateVar, string endDateVar) {
     98    @:$.ajax({url: "@(new HtmlString(url))?start=" + @startDateVar + "&end=" + @endDateVar, datatype: "json", success: function(result) {
     99    @:    for (var i = 0; i < result.length; i++) {
     100    @:        @(destinationTag)Plot.series[i].data = result[i];
     101    @:    }
     102    @:    @(destinationTag)Plot.replot( {resetAxes: true} )
     103    @:}});
     104}
Note: See TracChangeset for help on using the changeset viewer.