Changeset 11252 for branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code
- Timestamp:
- 07/31/14 16:37:29 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources/HeuristicLab.Services.Hive.Statistics/3.3/App_Code/ChartHelper.cshtml
r11246 r11252 478 478 var @(destinationTag)PlotOptions = { 479 479 title: "@title", 480 highlighter: { 481 show: true, 482 sizeAdjust: 7.5 483 }, 480 484 axes: { 481 485 xaxis: { … … 502 506 @:max: window["@(dataName)Data" + 0][window["@(dataName)Data" + 0].length - 1][1] + upperYBuffer, 503 507 } 504 numberTicks: 6508 numberTicks: 5 505 509 } 506 510 }, … … 510 514 show: false 511 515 } 516 }, 517 cursor: { 518 show: true, 519 showTooltip: false, 520 zoom: true, 521 clickReset: false, 522 dblClickReset: false, 523 constrainZoomTo: 'x' 512 524 } 513 525 }; … … 836 848 '<button class="collapse" onclick="CollapseSection(this)">-</button>' + 837 849 '<div id="UserTask@(taskState)Plot" class="noXTicks"></div>' + 850 '<label id="UserTask@(taskState)PlotInfo"></label>' + 838 851 '</section>' 839 852 ); 840 853 } 841 854 var userTasks = []; 855 var userNameLabels = []; 842 856 var userNames = []; 843 857 for (i=0; i < result.length; i++) { 844 858 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; 846 861 } 847 862 window["UserTask@(taskState)Plot"] = $.jqplot("UserTask@(taskState)Plot", userTasks, { … … 852 867 pointLabels: {show: true, formatString: '%.3f'} 853 868 }, 854 series: userName s,869 series: userNameLabels, 855 870 legend: { 856 871 show: true, … … 872 887 } 873 888 }); 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 }); 874 894 }}); 875 895 </text>
Note: See TracChangeset
for help on using the changeset viewer.