Creating Graphs in Nifty

So I’ve read the Nifty GUI manual but there is no information on producing graphs (only need to produce simple graphs like bar charts and pie charts).

Ive searched online and I cant see many related links. The only link I could find was -

So I was wondering how would I go about creating graphs in Nifty?

Thanks in advance.

I actually could not give you a straight answer. But there is one idea that I have been thinking about, on this very subject of graphics in Nifty. I hadn’t tried this, so please bare with me.

If you have Nifty do your gui in a buffer and then use OpenGL to draw your lines to that same buffer in the exact space you need it inside the nifty GUI, and then save that buffer as an image like some sort of overlay, and then copy / move that image in front of your 3D camera, it could do all this on the fly.

I’m not sure I’m saying all this right, but hopefully you can grasp the concept. I have tried it with other things as for buffering to an image, so I don’t see why this wouldn’t work. And since its to a buffer … or spot in memory, then when it puts it on the screen, its less lag since it only has to deal with 1 image.

Just my untested thoughts.

Thank you for responding, I will test out your way.

@robacityleg said: Thank you for responding, I will test out your way.

You’re welcome. Wish I could do more, but I hope the concept works for ya.

Also you could try this you can paint in a nifty-image whatever you want :slight_smile: .

Thanks relucri and jack for your comments, in the end I used JFreeChart to produce the basic graphs and then saved the charts as images in runtime. Then used the saved images to display in nifty and when I closed the application I deleted the graph images (Hopefully that makes sense). Its probably not the best way to do it but it does the trick.

Cheers anyways for your comments