@@ -13,12 +13,15 @@ The *LineChartRasterizer* currently uses the min and the max of the datasets to
...
@@ -13,12 +13,15 @@ The *LineChartRasterizer* currently uses the min and the max of the datasets to
There is not much to say about the axis itself, the *LineChartRasterizer* does not use an arrow head to show continuity of the datasets because there is none. It ends with tha max value on the x axis which was present on the dataset. As for the tickmarksize, the *LineChartRasterizer* currently uses 2.
There is not much to say about the axis itself, the *LineChartRasterizer* does not use an arrow head to show continuity of the datasets because there is none. It ends with tha max value on the x axis which was present on the dataset. As for the tickmarksize, the *LineChartRasterizer* currently uses 2.
## **Line rasterizing algorithm**
## **Line rasterizing algorithm**
The *LineChartRasterizer* currently uses the **bresenham** algorithm to draw a line between two datapoints as nearly to the ideal line as possible. Because **bresenham** assumes an equal distant grid, there is a conversion to be done between the geometrical position (for example in milimetres) and the dot position, measured in braillecell/ dots. The current implementation looksup the nearest point, which is why there are sometime aritfact points.
The *LineChartRasterizer* currently uses the **bresenham** algorithm to draw a line between two datapoints as nearly to the ideal line as possible. Because **bresenham** assumes an equal distant grid, there is a conversion to be done between the geometrical position (for example in milimetres) and the dot position, measured in braillecell/ dots. The current implementation looksup the nearest point, which is why there are sometime aritfact points.
There is also the issue that on the canvas, the y coordinates grow bigger as they go down, but bresenham assumes that the origin of the y coordinates is in the left bottom corner.