Automatically move scroll bar to the right in wide dataviewjs code block

Hi all,

I’m using Contribution Graph to track a couple of habits. I display a tracking graph in my daily note and show the last 300 days of tracking. When my Obsidian window is quite narrow, the graph gets truncated and I need to scroll horizontally to see the entries for the past couple of days.

Is there a way to have the rendered code block always scrolled to the right?

Here is my code snippet, data contains all the the tracked data:

```dataviewjs

const calendarData = {
    data: data,
    days: 300,
    showCellRuleIndicators: false
};

renderContributionGraph(data, calendarData);
```

I tried various AI suggestions using CSS and javascript but none worked.

Thanks for your suggestions!

Best,
M

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.