adrai / adrai/flowchart.js

Method outlined in README failing due to TypeError

Ouverte
#82 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
8.7k
Forks
1.2k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.