From 267935713c89b9316f0dd8750e9080072e78dcab Mon Sep 17 00:00:00 2001 From: Reda Al Sulais Date: Fri, 25 Aug 2023 16:07:28 +0300 Subject: [PATCH 1/3] fix(pie): align slices and legend orders --- packages/mermaid/src/diagrams/pie/pieRenderer.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/mermaid/src/diagrams/pie/pieRenderer.ts b/packages/mermaid/src/diagrams/pie/pieRenderer.ts index 5ef081842..80f4f0a5a 100644 --- a/packages/mermaid/src/diagrams/pie/pieRenderer.ts +++ b/packages/mermaid/src/diagrams/pie/pieRenderer.ts @@ -12,14 +12,16 @@ import { selectSvgElement } from '../../rendering-util/selectSvgElement.js'; const createPieArcs = (sections: Sections): d3.PieArcDatum[] => { // Compute the position of each group on the pie: - const pieData: D3Sections[] = Object.entries(sections).map( - (element: [string, number]): D3Sections => { + const pieData: D3Sections[] = Object.entries(sections) + .map((element: [string, number]): D3Sections => { return { label: element[0], value: element[1], }; - } - ); + }) + .sort((a: D3Sections, b: D3Sections): number => { + return b.value - a.value; + }); const pie: d3.Pie = d3pie().value( (d3Section: D3Sections): number => d3Section.value ); From 92d9f35f89e07286d3a95273b0fe028583565b1b Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sat, 26 Aug 2023 01:20:17 +0530 Subject: [PATCH 2/3] Update docs --- docs/syntax/flowchart.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/syntax/flowchart.md b/docs/syntax/flowchart.md index ee635d451..2b92822b2 100644 --- a/docs/syntax/flowchart.md +++ b/docs/syntax/flowchart.md @@ -1098,7 +1098,7 @@ The icons are accessed via the syntax fa:#icon class name#. ```mermaid-example flowchart TD - B["fab:fa-twitter for peace"] + B["fa:fa-twitter for peace"] B-->C[fa:fa-ban forbidden] B-->D(fa:fa-spinner) B-->E(A fa:fa-camera-retro perhaps?) @@ -1106,7 +1106,7 @@ flowchart TD ```mermaid flowchart TD - B["fab:fa-twitter for peace"] + B["fa:fa-twitter for peace"] B-->C[fa:fa-ban forbidden] B-->D(fa:fa-spinner) B-->E(A fa:fa-camera-retro perhaps?) From ecf14cd4e3fa406d555d1b435b3339a1b008c668 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sat, 26 Aug 2023 01:33:15 +0530 Subject: [PATCH 3/3] docs: Fix link --- README.md | 2 +- README.zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0f47ceca2..98741a689 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Use Mermaid with your favorite applications, check out the list of [Integrations You can also use Mermaid within [GitHub](https://github.blog/2022-02-14-include-diagrams-markdown-files-mermaid/) as well many of your other favorite applications—check out the list of [Integrations and Usages of Mermaid](./docs/ecosystem/integrations.md). -For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/intro/n00b-gettingStarted.md), [Usage](./docs/config/usage.md) and [Tutorials](./docs/config/Tutorials.md). +For a more detailed introduction to Mermaid and some of its more basic uses, look to the [Beginner's Guide](./docs/intro/getting-started.md), [Usage](./docs/config/usage.md) and [Tutorials](./docs/config/Tutorials.md). In our release process we rely heavily on visual regression tests using [applitools](https://applitools.com/). Applitools is a great service which has been easy to use and integrate with our tests. diff --git a/README.zh-CN.md b/README.zh-CN.md index 0cc05906e..80e715509 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -55,7 +55,7 @@ Mermaid 通过允许用户创建便于修改的图表来解决这一难题,它 Mermaid 甚至能让非程序员也能通过 [Mermaid Live Editor](https://mermaid.live/) 轻松创建详细的图表。
你可以访问 [教程](./docs/config/Tutorials.md) 来查看 Live Editor 的视频教程,也可以查看 [Mermaid 的集成和使用](./docs/ecosystem/integrations.md) 这个清单来检查你的文档工具是否已经集成了 Mermaid 支持。 -如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/intro/n00b-gettingStarted.md), [用法](./docs/config/usage.md) 和 [教程](./docs/config/Tutorials.md). +如果想要查看关于 Mermaid 更详细的介绍及基础使用方式,可以查看 [入门指引](./docs/intro/getting-started.md), [用法](./docs/config/usage.md) 和 [教程](./docs/config/Tutorials.md).