(datap)
| 4 | export class Graph extends PIXI.Sprite{ |
| 5 | |
| 6 | constructor(datap){ |
| 7 | super(); |
| 8 | |
| 9 | this.axis=new PIXI.Sprite(loader.resources["images/graph/axis.png"].texture); |
| 10 | this.axis.x=window.innerWidth-240; |
| 11 | this.axis.y=layout.BOTTOMBUFFER-230; |
| 12 | this.axis.scale.set(0.8); |
| 13 | this.axis.name="axis"; |
| 14 | |
| 15 | this.bg = new PIXI.Sprite(loader.resources["images/graph/graph.png"].texture); |
| 16 | this.bg.height=200; |
| 17 | this.bg.width=200; |
| 18 | |
| 19 | this.bg.x=67; |
| 20 | this.bg.y=15; |
| 21 | |
| 22 | this.pointslength = datap.points.length; |
| 23 | |
| 24 | |
| 25 | this.axis.addChild(this.bg) |
| 26 | |
| 27 | this.fakedata=new data(0, ["strawberry","blueberry"],["length","roundness"]); |
| 28 | |
| 29 | this.bgpointsize = 20; |
| 30 | this.numbgpoints = 200/this.bgpointsize; |
| 31 | |
| 32 | |
| 33 | this.posAxis() |
| 34 | |
| 35 | this.populateGraph(datap); |
| 36 | } |
| 37 | |
| 38 | getGraph(){ |
| 39 | return this.axis; |
nothing calls this directly
no test coverage detected