adrai / adrai/flowchart.js

Method outlined in README failing due to TypeError

Abierto
#82 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
8.7k
Forks
1.2k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi,

I have been trying to try out flowchart.js using this HTML file:

``` html





var diagram = flowchart.parse("the code definition");
diagram.drawSVG('diagram');

// you can also try to pass options:

diagram.drawSVG('diagram', {
'x': 0,
'y': 0,
'line-width': 3,
'line-length': 50,
'text-margin': 10,
'font-size': 14,
'font-color': 'black',
'line-color': 'black',
'element-color': 'black',
'fill': 'white',
'yes-text': 'yes',
'no-text': 'no',
'arrow-end': 'block',
'scale': 1,
// style symbol types
'symbols': {
'start': {
'font-color': 'red',
'element-color': 'green',
'fill': 'yellow'
},
'end':{
'class': 'end-element'
}
},
// even flowstate support ;-)
'flowstate' : {
'past' : { 'fill' : '#CCCCCC', 'font-size' : 12},
'current' : {'fill' : 'yellow', 'font-color' : 'red', 'font-weight' : 'bold'},
'future' : { 'fill' : '#FFFF99'},
'request' : { 'fill' : 'blue'},
'invalid': {'fill' : '#444444'},
'approved' : { 'fill' : '#58C4A3', 'font-size' : 12, 'yes-text' : 'APPROVED', 'no-text' : 'n/a' },
'rejected' : { 'fill' : '#C45879', 'font-size' : 12, 'yes-text' : 'n/a', 'no-text' : 'REJECTED' }
}
})




```

(which is copied from http://flowchart.js.org/) but whenever I open this HTML file in my browser I get the following error in my console:

``` js
raphael.min.js:11Uncaught TypeError: Cannot read property 'x' of undefinedr._engine.create @ raphael.min.js:11r @ raphael.min.js:9FlowChart @ flowchart-latest.js:725chart.drawSVG @ flowchart-latest.js:561(anonymous function) @ layout.html:7
```

the raphael.min.js file I used is the exact same one used by the example page (http://flowchart.js.org/raphael-min.js) and the flowchart-latest.js I used was also that used on the example page (i.e., http://flowchart.js.org/flowchart-latest.js). My knowledge of JS is fairly limited, I am merely using flowchart.js to draw diagrams on [my website](https://fusion809.github.io).

Thanks for your time,
Brenton

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.