How to draw graphs on canvas?

I am new to XOJO but made good progress with File I/O, sliders, do events, etc. but stuck on canvas.

What I want to do is quite simple. I would like to write a few methods on a canvas class. One for lines, another for circles and one for crosses. I would also need to write a method to plotting a grid using the mentioned method. With these I can plot all the graphics I need for now, as I did withVB6.

Any help appreciated. Thanks in advance.

This might help

There is also ChartDirector from MBS
https://www.monkeybreadsoftware.de/xojo/plugin-chartdirector.shtml

2 Likes

Thanks will review.

I found this post by Michel Bujardet (Tester) on Dec 2014:

I am sure XOJO can do much more but this is what I wanted and will get me started.

My problem solved

usually you would subclass a canvas. see context menu.
then you can add methods and own propertys there. and also events can handled.
in the window the ui object have the super set to as example GraphCanvas class name.
avter a call to .Invalidate the Paint event is triggered.
from Paint Event you can forward the g = Graphics argument to other methods inside of your class.

Thank you - will give it a “whirl”

1 Like

Is it free now? :blush: