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
6 changes: 5 additions & 1 deletion tensorboard/components/vz_line_chart2/line-chart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,11 @@ export class LineChart {
this.xAccessor = xComponents.accessor;
this.xScale = xComponents.scale;
this.xAxis = xComponents.axis;
(this.xAxis.margin(0) as Plottable.Axes.Numeric).tickLabelPadding(3);
// Default margin is 15 pixels but we do not need it. Setting it to zero
// makes space calculation a bit too tight and hide axis label by mistake.
// To workaround the tight tolerance issue, we add 1px of margin.
// See https://github.com/tensorflow/tensorboard/issues/5077.
(this.xAxis.margin(1) as Plottable.Axes.Numeric).tickLabelPadding(3);
if (xAxisFormatter) {
this.xAxis.formatter(xAxisFormatter);
}
Expand Down