Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/chart.zig
Original file line number Diff line number Diff line change
Expand Up @@ -392,12 +392,12 @@ pub const Chart = struct {
}

fn renderPlotRow(self: *const Chart, allocator: std.mem.Allocator, row_index: usize, plot_line: []const u8, plot_height: usize, y_label_width: usize, y_ticks: *const TickSet) ![]const u8 {
_ = plot_height;
var result: Writer.Allocating = .init(allocator);
const writer = &result.writer;

if (self.y_axis.show_labels) {
const label = y_ticks.labelForRow(row_index) orelse "";
const tick_row = if (plot_height > 0) plot_height - 1 - row_index else row_index;
const label = y_ticks.labelForRow(tick_row) orelse "";
const padded = try renderPaddedLabel(allocator, label, y_label_width, self.y_axis.label_style);
defer allocator.free(padded);
try writer.writeAll(padded);
Expand Down
Loading