Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/31/14 16:37:29 (10 years ago)
Author:
mroscoe
Message:
 
File:
1 edited

Legend:

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

    r11246 r11252  
    478478  var @(destinationTag)PlotOptions = {
    479479    title: "@title",
     480    highlighter: {
     481      show: true,
     482      sizeAdjust: 7.5
     483    },
    480484    axes: {
    481485      xaxis: {
     
    502506          @:max: window["@(dataName)Data" + 0][window["@(dataName)Data" + 0].length - 1][1] + upperYBuffer,
    503507        }
    504         numberTicks: 6
     508        numberTicks: 5
    505509      }
    506510    },
     
    510514        show: false
    511515      }
     516    },
     517    cursor: {
     518      show: true,
     519      showTooltip: false,
     520      zoom: true,
     521      clickReset: false,
     522      dblClickReset: false,
     523      constrainZoomTo: 'x'
    512524    }
    513525  };
     
    836848            '<button class="collapse" onclick="CollapseSection(this)">-</button>' +
    837849            '<div id="UserTask@(taskState)Plot" class="noXTicks"></div>' +
     850            '<label id="UserTask@(taskState)PlotInfo"></label>' +
    838851          '</section>'
    839852        );
    840853      }
    841854      var userTasks = [];
     855      var userNameLabels = [];
    842856      var userNames = [];
    843857      for (i=0; i < result.length; i++) {
    844858        userTasks[i] = [result[i].Value];
    845         userNames[i] = { label: result[i].Key };
     859        userNameLabels[i] = { label: result[i].Key };
     860        userNames[i] = result[i].Key;
    846861      }
    847862      window["UserTask@(taskState)Plot"] = $.jqplot("UserTask@(taskState)Plot", userTasks, {
     
    852867          pointLabels: {show: true, formatString: '%.3f'}
    853868        },
    854         series: userNames,
     869        series: userNameLabels,
    855870        legend: {
    856871          show: true,
     
    872887        }
    873888      });
     889      /* Bind a datalistener to each chart and display details of clicked
     890        upon data in the label below the chart */
     891      $("#UserTask" + "@(taskState)Plot").bind('jqplotDataClick', function (ev, seriesIndex, pointIndex, data) {
     892        $(this).next("label").html(userNames[seriesIndex] + " Tasks @(taskState): "  + data[1]);
     893      });
    874894    }});
    875895  </text>
Note: See TracChangeset for help on using the changeset viewer.