diff --git a/Frontend Angular 4/package.json b/Frontend Angular 4/package.json index b3ae46fc289f0384b525b6df11fad15d7bb7a5de..ad159b1b4d28071c04cadbaa03b55fb32ea71d3e 100755 --- a/Frontend Angular 4/package.json +++ b/Frontend Angular 4/package.json @@ -24,7 +24,7 @@ "core-js": "^2.4.1", "d3": "^4.12.2", "font-awesome": "^4.7.0", - "function-plot": "^1.18.1", + "function-plot": "git+https://github.com/diego-rey/function-plot.git#feature/shape-type", "ionicons": "^3.0.0", "jq-console": "^2.13.2", "jquery": "^3.2.1", diff --git a/Frontend Angular 4/src/app/layout/plotter/plotter.component.ts b/Frontend Angular 4/src/app/layout/plotter/plotter.component.ts index c3056fa879f7ff80cbae4b124f24c101fe73cec6..38c7d4fea285ff84463c320ee482d9f309cced15 100755 --- a/Frontend Angular 4/src/app/layout/plotter/plotter.component.ts +++ b/Frontend Angular 4/src/app/layout/plotter/plotter.component.ts @@ -18,18 +18,43 @@ export class PlotterComponent { var jsonCanvas = JSON.parse(canvas.resultado); let fun = eval(this.generarFuncion(jsonCanvas)); + functionPlot({ target: '#plotter-container', - width: 620, - height: 450, + width: 770, + height: 720, + tip: { + color: 'green' + }, + xAxis: { + label: 'x - axis', + scale: 'linear', + domain: { + initial: [-4, 4], + type: 'discrete' + } + }, data: [{ - sampler: 'builtIn', - fn: function(scope) { - return fun(scope.x) - }, - graphType: 'polyline' + graphType: 'scatter', + fn: function (scope) { + // scope.x = Number + return fun(scope.x) + } }] }) + + // functionPlot({ + // target: '#plotter-container', + // width: 620, + // height: 450, + // data: [{ + // sampler: 'builtIn', + // fn: function(scope) { + // return fun(scope.x) + // }, + // graphType: 'polyline' + // }] + // }) } }, error=>{ diff --git a/Frontend Angular 4/src/app/shared/config.ts b/Frontend Angular 4/src/app/shared/config.ts index e8dc54205e9d3bd9fce5d40421c2f80db16e30f0..85af34a7927b7193fcd816725361aa4465e248eb 100755 --- a/Frontend Angular 4/src/app/shared/config.ts +++ b/Frontend Angular 4/src/app/shared/config.ts @@ -4,9 +4,12 @@ //export const SERVER = 'http://localhost:9090'; //export const GHCI_URL = 'ws://localhost:9090/endpoint'; +export const SERVER = 'http://localhost:8080'; +export const GHCI_URL = 'ws://localhost:8080/endpoint'; + //Configuracion dinamica pensando en servidor con ip dinamica //export const SERVER = window.location.protocol + '//' + window.location.host;//'http://localhost:9090'; //export const GHCI_URL = window.location.protocol == 'http:'? 'ws://'+window.location.host+'/endpoint': 'wss://'+window.location.host+'/endpoint'; -export const SERVER = 'http://ec2-52-15-74-22.us-east-2.compute.amazonaws.com:9090'; -export const GHCI_URL = 'ws://ec2-52-15-74-22.us-east-2.compute.amazonaws.com:9090/endpoint'; \ No newline at end of file +//export const SERVER = 'http://ec2-52-15-74-22.us-east-2.compute.amazonaws.com:9090'; +//export const GHCI_URL = 'ws://ec2-52-15-74-22.us-east-2.compute.amazonaws.com:9090/endpoint'; \ No newline at end of file