Modularise Nutmeg's drawing of shapes
kitizz opened this issue · 1 comments
Currently, for something like LinePlot, it has an associated LineCanvas.
LineCanvas assumes that its parent is a LinePlot and extracts the data it requires by accessing the LinePlot's properties.
A better architecture would be for the Canvas to have the properties of the things it can draw. For example, LineCanvas would have xData and yData properties. These properties are then bound at the QML side.
This then allows for a nice way to "construct" different types of plots. For example, a BarGraphPlot may have a RectangleCanvas and a TextCanvas (for labels).
Related to #40
This has been implemented by CanvasPlot. But it would be nice to have "models" as well. Where a set of line segments are drawn based on four array properties: x1, y1, x2, y2.
This requires some thought...