# Pie charts are always centered and very large

**URL:** <https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428>\
**Category:** Help\
**Tags:** mermaid\
**Created:** [April 13, 2021, 4:22am UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428 "2021-04-13T04:22:50Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![luckman212](https://forum.obsidian.md/user_avatar/forum.obsidian.md/luckman212/32/3445_2.png) [@luckman212](https://forum.obsidian.md/u/luckman212)\
**Post date:** [April 13, 2021, 4:22am UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428/1 "2021-04-13T04:22:50Z")

</div>

### Facts

- Obsidian 0.11.13
- This is not quite a bug, but not really a feature request either.

### Summary of problem

Pie charts in mermaid seem to be always centered or slightly off centered, with large amounts of whitespace and can’t be left aligned with CSS as far as I can tell (I tried and failed)

In split-pane view this is problematic because part of the chart and usually most or all of the legend appears out of view.

Other graph types such as Flowchart don’t have this problem.

_Can this be improved? is there a way to left-align the pie?_

### Screenshot

Some css flair was added to show the grid borders

 ![image](https://forum.obsidian.md/uploads/default/original/2X/b/b57fe9ae392a4ff858479e95a2f182a999122b32.png)

### and here’s the CSS I used…

```css
.markdown-preview-view .mermaid {
	border: 1px solid #ff0000;
	padding: 0px 40px 0px 0px;
}

.markdown-preview-view .mermaid svg {
	max-height: 350px;
	max-width: 100%;
	border: 1px solid #21ff06;
	padding: 0px 20px 0px 0px;
}

```

---

<div class="post-metadata">

**Author:** ![WhiteNoise](https://forum.obsidian.md/user_avatar/forum.obsidian.md/whitenoise/32/11_2.png) [@WhiteNoise](https://forum.obsidian.md/u/WhiteNoise)\
**Post date:** [April 13, 2021, 12:17pm UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428/2 "2021-04-13T12:17:15Z")

</div>

This is a mermaid thing. Same things happensin their live editor,. I am gonna move this to help.

---

<div class="post-metadata">

**Author:** ![luckman212](https://forum.obsidian.md/user_avatar/forum.obsidian.md/luckman212/32/3445_2.png) [@luckman212](https://forum.obsidian.md/u/luckman212)\
**Post date:** [April 13, 2021, 2:08pm UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428/3 "2021-04-13T14:08:06Z")

</div>

got it @WhiteNoise thanks  
I filed an issue on the upstream GitHub

> <https://github.com/mermaid-js/mermaid/issues/1983>
>
> I am starting to work with Mermaidjs inside of Obsidian. One issue I am hitting is there does not seem to...

---

<div class="post-metadata">

**Author:** ![fuzzybear3965](https://forum.obsidian.md/user_avatar/forum.obsidian.md/fuzzybear3965/32/14517_2.png) [@fuzzybear3965](https://forum.obsidian.md/u/fuzzybear3965)\
**Post date:** [May 11, 2021, 10:21am UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428/4 "2021-05-11T10:21:49Z")

</div>

The seemingly-related [Mermaid diagram too large](https://forum.obsidian.md/t/mermaid-diagram-too-large/16876) seems to be fixed for me on v0.12.3. See an updated screenshot there.

---

<div class="post-metadata">

**Author:** ![luckman212](https://forum.obsidian.md/user_avatar/forum.obsidian.md/luckman212/32/3445_2.png) [@luckman212](https://forum.obsidian.md/u/luckman212)\
**Post date:** [May 11, 2021, 11:58am UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428/5 "2021-05-11T11:58:33Z")

</div>

@fuzzybear3965 Thanks, the charts may have gotten a bit smaller with 0.12.3 but my main gripe here is about the centering, which hasn’t changed. As far as that though, I don’t think there’s anything Obsidian can do, seems like an upstream issue.

---

<div class="post-metadata">

**Author:** ![system](https://forum.obsidian.md/uploads/default/original/3X/b/e/bec35fbd23ab28909bb6bfe62cb32eb82dd34019.png) [@system](https://forum.obsidian.md/u/system)\
**Post date:** [June 10, 2021, 11:59am UTC](https://forum.obsidian.md/t/pie-charts-are-always-centered-and-very-large/16428/6 "2021-06-10T11:59:29Z")

</div>

Closed on June 10, 2021, 11:59am UTC

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