From cde843789795665aea985d0252e6d6e29f3a8461 Mon Sep 17 00:00:00 2001 From: Diego Rey <diego.despaux@izundo.com> Date: Wed, 11 Jul 2018 20:32:19 -0300 Subject: [PATCH] Add function plot v2 - This new version of function plot has: - Handler for shape rendering - Handler for integer, real and enumerated domains and codomain --- Frontend Angular 4/package-lock.json | 4 +-- Frontend Angular 4/package.json | 2 +- .../plotter/graph2D/graph2D.component.ts | 28 +++++++++++++------ 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Frontend Angular 4/package-lock.json b/Frontend Angular 4/package-lock.json index 7d1db213..a868de0c 100644 --- a/Frontend Angular 4/package-lock.json +++ b/Frontend Angular 4/package-lock.json @@ -4139,8 +4139,8 @@ "dev": true }, "function-plot": { - "version": "git+https://github.com/diego-rey/function-plot.git#8e0045a0abcfc93662df118da951a056812141dc", - "from": "git+https://github.com/diego-rey/function-plot.git#feature/shape-type", + "version": "git+https://github.com/diego-rey/function-plot.git#9aeb9257649497939ba3c89cf69f1c338e91d436", + "from": "git+https://github.com/diego-rey/function-plot.git#feature/integration-domain-shape", "requires": { "array-range": "^1.0.1", "built-in-math-eval": "^0.3.0", diff --git a/Frontend Angular 4/package.json b/Frontend Angular 4/package.json index 8da84009..e9814d97 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": "git+https://github.com/diego-rey/function-plot.git#feature/shape-type", + "function-plot": "git+https://github.com/diego-rey/function-plot.git#feature/integration-domain-shape", "ionicons": "^3.0.0", "jq-console": "^2.13.2", "jquery": "^3.2.1", 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 9c7bdf94..291024bb 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 @@ -20,29 +20,41 @@ export class Graph2DComponent { functionPlot({ - target: '#graph2D-container', - width: 770, - height: 720, - tip: { - color: 'green' - }, + target: '#implicit-complex', xAxis: { label: 'x - axis', scale: 'linear', domain: { initial: [-4, 4], type: 'discrete' + }, + yAxis: { + domain: [-4, 4] + }, + + + }, + conj: { + radio: 2, + baseDom: 'Z', + baseCod: 'Z', + cod: 'Numer', + dom: 'Func', + sets: { + fcod:['Lun','Mart','Mier','Juev','Vier','Saba','Dom','Lunes'], + fdom: function (x) { + // scope.x = Number + return (0 <= x); + } } }, data: [{ graphType: 'scatter', fn: function (scope) { - // scope.x = Number return fun(scope.x) } }] }) - // functionPlot({ // target: '#graph2D-container', // width: 620, -- GitLab