diff --git a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts index 8585ff3f9eba676814c124d1e823899b84d4eb98..57118bf4f06255b79f257e381a0df067b1b06326 100755 --- a/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts +++ b/Frontend Angular 4/src/app/layout/plotter/graph2D/graph2D.component.ts @@ -60,6 +60,12 @@ export class Graph2DComponent { var num = this.getRandomArbitrary(0,4); var color = colores[num]; + var tipoGraf; + if (obj.conj.baseDom != 'R'){ + tipoGraf = 'scatter'; + }else{ + tipoGraf = 'polyline'; + } functionPlot({ target: '#graph2D-container', width: 620, @@ -70,7 +76,7 @@ export class Graph2DComponent { fn: function(scope) { return fun(scope.x) }, - graphType: 'scatter', + graphType: tipoGraf, color: color }] }) @@ -120,9 +126,9 @@ export class Graph2DComponent { } else if (exp.kind == 'app') { if (exp.fun == 'cos') { exp.fun = 'Math.cos' - } else if (exp.fun == 'sen') { + } else if (exp.fun == 'sin') { exp.fun = 'Math.sin' - } else if (exp.fun == 'red') { + } else if (exp.fun == 'round') { exp.fun = 'Math.round' } expresion = ' ' + exp.fun + '(' + exp.args.map(e => this.generarExpresion(e)).join() + ') '; @@ -261,7 +267,7 @@ export class Graph2DComponent { } else if (exp.kind == 'app') { if (exp.fun == 'cos') { exp.fun = 'Math.cos' - } else if (exp.fun == 'sen') { + } else if (exp.fun == 'sin') { exp.fun = 'Math.sin' } else if (exp.fun == 'round') { exp.fun = 'Math.round' diff --git a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts index 71e76cdbd34b905d7c82c62d4d4c4bc6dc14d4a1..ea76ae23be54c3299a5b370f84cd78630fe23be5 100644 --- a/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts +++ b/Frontend Angular 4/src/app/layout/plotter/graph3D/graph3D.component.ts @@ -27,7 +27,6 @@ export class Graph3DComponent { speed: 1000 }; - constructor(ghciService: GHCIService, private zone: NgZone) { this.ghciServiceSub = ghciService.messages.subscribe( message => {