add bar charts
This commit is contained in:
@@ -17,6 +17,7 @@ export class PlotService {
|
||||
this.plotTypes.push(new PlotType("CUM_DISTRIBUTION", "Cumulative Distribution", "cumulative-distribution-chart", true, DataType.Percent, DataType.Duration));
|
||||
this.plotTypes.push(new PlotType("HISTOGRAM", "Histogram", "histogram", true, DataType.HistogramBin, DataType.HistogramCount));
|
||||
this.plotTypes.push(new PlotType("PARALLEL", "Parallel Requests", "parallel-requests-chart", true, DataType.Time, DataType.Count));
|
||||
this.plotTypes.push(new PlotType("BAR", "Bar", "bar-chart", true, DataType.Group, DataType.Count));
|
||||
|
||||
this.plotTypes.push(new PlotType("HEATMAP", "Heatmap", "heatmap", false, DataType.Other, DataType.Other));
|
||||
this.plotTypes.push(new PlotType("CONTOUR", "Contour", "contour-chart", false, DataType.Time, DataType.Duration));
|
||||
@@ -25,7 +26,6 @@ export class PlotService {
|
||||
this.plotTypes.push(new PlotType("VIOLIN", "Violin", "violin-chart", false, DataType.Group, DataType.Duration));
|
||||
this.plotTypes.push(new PlotType("STRIP", "Strip", "strip-chart", false, DataType.Group, DataType.Duration));
|
||||
this.plotTypes.push(new PlotType("PIE", "Pie", "pie-chart", false, DataType.Other, DataType.Other));
|
||||
this.plotTypes.push(new PlotType("BAR", "Bar", "bar-chart", false, DataType.Other, DataType.Other));
|
||||
this.plotTypes.push(new PlotType("STEP_FIT", "Step Fit", "step-fit", false, DataType.Other, DataType.Other));
|
||||
this.plotTypes.push(new PlotType("LAG", "Lag", "lag-plot", false, DataType.Other, DataType.Other));
|
||||
this.plotTypes.push(new PlotType("ACF", "ACF", "acf-plot", false, DataType.Other, DataType.Other));
|
||||
|
||||
@@ -22,11 +22,13 @@ function initInvaders(parentDivId) {
|
||||
var parent = $('#'+parentDivId);
|
||||
var height = parent.height();
|
||||
var width = parent.width();
|
||||
$('body').append('<div id="'+invaders_parentDivId+'"><div id="invaders_points">Points: 0</div><div id="invaders_kills">Kills: 0</div><div id="invaders_game_over"><div class="invader_notify">Game Over</div></div></div>');
|
||||
$('body').append('<canvas id="'+invaders_parentDivId+'"><div id="invaders_points">Points: 0</div><div id="invaders_kills">Kills: 0</div><div id="invaders_game_over"><div class="invader_notify">Game Over</div></div></canvas>');
|
||||
$('#'+invaders_parentDivId).offset({ top: parent.offset().top, left: parent.offset().left})
|
||||
$('#'+invaders_parentDivId).height(parent.height());
|
||||
$('#'+invaders_parentDivId).width(parent.width());
|
||||
|
||||
$('#'+invaders_parentDivId)
|
||||
|
||||
$('.invader_notify').click(function() {
|
||||
// restart the game
|
||||
$('#'+invaders_parentDivId).remove();
|
||||
@@ -81,7 +83,7 @@ function addInvader()
|
||||
var top = 10; // start at the top
|
||||
var left = invaders_margin + random(width-2*invaders_margin); // spread horizontally, but keep margin to left and right
|
||||
|
||||
parent.append('<div id="'+id+'" class="invader" style="position:absolute;top:'+top+'px;left:'+left+'px;"/>');
|
||||
parent.append('<span id="'+id+'" class="invader" style="position:absolute;top:'+top+'px;left:'+left+'px;"/>');
|
||||
|
||||
$("#"+id).click(function()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user