psumstr Posted October 29, 2014 Share Posted October 29, 2014 Hello, I'm in the data visualization field and I'm trying to see if I can leverage Pixi.js to create various charts that I've typically be created with SVG. Right now, I'm trying to create a bar chart with position and height changes as the data updates. I've been creating one PIXI.Graphics per bar and I'm updating the graphics width, height, and y positions when the data changes. // This runs ones per barvar rect = new PIXI.Graphics();rect.beginFill(0x4682B4);rect.drawRect(0, y, width, height);doc.addChild(rect); // When updating barsrect.clear();rect.beginFill(0x4682B4);rect.drawRect(0, y, width, height); My questions are:1. If I'm planning to draw hundreds of bars, is Graphics the right object to use?2. Can I use sprites if I'm going to have different fills, width, and heights for each bar? I'm very new to PIXI, so I'm still trying to learn the API and figure what's the right set of objects to use for the job. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.