Skip to content

Commit 9745532

Browse files
committed
Add vertical gridlines for generic xy charts for non-time-axis case
This will make the buckets for xRanges and xCategories more visible. Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
1 parent 8abb924 commit 9745532

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

local-libs/traceviewer-libs/react-components/src/components/generic-xy-output-component.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ export class GenericXYOutputComponent extends AbstractTreeOutputComponent<Generi
464464

465465
private makeChartOptions(allYZero: boolean): ChartOptions {
466466
const yTickFix = allYZero ? { min: 0, suggestedMax: 1, beginAtZero: true } : { beginAtZero: true };
467-
467+
const gridColor = '#' + (this.props.backgroundTheme === 'light' ? 0xdddddd : 0x34383c).toString(16);
468468
return {
469469
responsive: true,
470470
maintainAspectRatio: false,
@@ -486,8 +486,8 @@ export class GenericXYOutputComponent extends AbstractTreeOutputComponent<Generi
486486
{
487487
type: 'category',
488488
position: 'bottom',
489-
display: false,
490-
gridLines: { display: false, drawBorder: false, drawTicks: false },
489+
display: !this.isTimeAxis,
490+
gridLines: { display: !this.isTimeAxis, drawBorder: false, drawTicks: !this.isTimeAxis, color: gridColor },
491491
ticks: {
492492
display: false
493493
}

0 commit comments

Comments
 (0)