Hi, for plotting charts I found that the y axis labels are not ordered like largest number on top, lowest number on bottom. I assumed this was a bug due to the rendering being done top to bottom and the y axis usually runs bottom to top.
In line 395 to 400 in src/components/chart.zig I changed this:
//_ = plot_height; //<-
var result: Writer.Allocating = .init(allocator);
const writer = &result.writer;
if (self.y_axis.show_labels) {
const label = y_ticks.labelForRow(plot_height - 1 - row_index) orelse ""; //<-
- removed the discard of the plot_height parameter
- reversed the index for the label row by replacing
row_index with plot_height - 1 - row_index
I'm not familiar enough with the codebase to make a PR. But this worked for me. Could you have a look in to this?
Thanks!
Hi, for plotting charts I found that the y axis labels are not ordered like largest number on top, lowest number on bottom. I assumed this was a bug due to the rendering being done top to bottom and the y axis usually runs bottom to top.
In line 395 to 400 in src/components/chart.zig I changed this:
row_indexwithplot_height - 1 - row_indexI'm not familiar enough with the codebase to make a PR. But this worked for me. Could you have a look in to this?
Thanks!