Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new chart xychart #4413

Merged
merged 54 commits into from Oct 6, 2023

Conversation

subhash-halder
Copy link
Contributor

@subhash-halder subhash-halder commented May 20, 2023

📑 Summary

This PR will contain the implementation of the XY chart

Resolves #4269

📏 Design Decisions

Describe the way your implementation works or what design decisions you made if applicable.

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added unit/e2e tests (if appropriate)
  • 📓 have added documentation (if appropriate)
  • 🔖 targeted develop branch

@jgreywolf jgreywolf removed the feature label Jun 7, 2023
@subhash-halder subhash-halder force-pushed the feature/4269_add_xychart branch 2 times, most recently from 2be34e8 to 203b53b Compare July 4, 2023 15:12
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #4413 (936319b) into develop (157c90e) will increase coverage by 5.82%.
The diff coverage is 83.19%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #4413      +/-   ##
===========================================
+ Coverage    74.11%   79.94%   +5.82%     
===========================================
  Files          143      164      +21     
  Lines        12697    13623     +926     
  Branches       601      693      +92     
===========================================
+ Hits          9411    10891    +1480     
+ Misses        3132     2583     -549     
+ Partials       154      149       -5     
Flag Coverage Δ
e2e 85.23% <93.18%> (+7.21%) ⬆️
unit 43.29% <23.59%> (-0.38%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/mermaid/src/defaultConfig.ts 47.98% <100.00%> (+0.77%) ⬆️
...s/mermaid/src/diagram-api/diagram-orchestration.ts 83.33% <ø> (ø)
...aid/src/diagrams/quadrant-chart/quadrantBuilder.ts 80.53% <ø> (ø)
...rams/xychart/chartBuilder/components/axis/index.ts 100.00% <100.00%> (ø)
...xychart/chartBuilder/components/axis/linearAxis.ts 100.00% <100.00%> (ø)
...ms/xychart/chartBuilder/components/plot/barPlot.ts 100.00% <100.00%> (ø)
...mermaid/src/diagrams/xychart/chartBuilder/index.ts 100.00% <100.00%> (ø)
...id/src/diagrams/xychart/chartBuilder/interfaces.ts 100.00% <100.00%> (ø)
.../src/diagrams/xychart/chartBuilder/orchestrator.ts 100.00% <100.00%> (ø)
...es/mermaid/src/diagrams/xychart/xychartDetector.ts 100.00% <100.00%> (ø)
... and 15 more

... and 33 files with indirect coverage changes

@subhash-halder
Copy link
Contributor Author

@sidharthv96 The PR is working only thing left is to add the style part and test cases, for now, the cosmetics are static.

@sidharthv96
Copy link
Member

Due to the size of the PR, it might take some time for proper review from everyone. :)

@subhash-halder
Copy link
Contributor Author

@sidharthv96 No problem, I don't think there will be any huge structural changes.

@nirname
Copy link
Contributor

nirname commented Sep 16, 2023

I think we are finalizing it. There are some minor changes that should be done for the sake of code and documentation quality. Other than that all is fine.

Kudos to @subhash-halder for implementing this enormous and formidable task single-handedly.

@subhash-halder
Copy link
Contributor Author

@nirname @sidharthv96 I must appreciate your reviewing skills and patience. Thanks again for the detailed review.

Copy link
Contributor

@nirname nirname left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are some lines of code that are not covered by test. And a couple of questions about documentation, that could be clarified. Apart from this, everything is OK.

@nirname nirname requested review from knsv and removed request for ibrahimWassouf September 19, 2023 18:40
@nirname
Copy link
Contributor

nirname commented Sep 19, 2023

@knsv there is one more diagram to the project, if you are willing to you can review this. There is a couple of approves already, so you can merge it as it is

@nirname
Copy link
Contributor

nirname commented Sep 20, 2023

@subhash-halder I re-run e2e tests because they failed but seemed to be working previously... and documentation update should've not influenced them. Meantime, try fixing whatever code coverage recommends.

@subhash-halder
Copy link
Contributor Author

@nirname I am not able to see any error, everything seems to be passed.

@nirname
Copy link
Contributor

nirname commented Sep 24, 2023

@subhash-halder Please, update your PR one more time, there are conflicts in pnpm-lock.yaml. Let's wait a little bit more for everyone willing to make a proper review of this feature. In case no one add valuable comments in the nearest future we will merge it. There is an ongoing refactoring and standardizing of mermaid, but verification of compliance with what we are targeting will be the following step, I think. There is no point in slowing you down.

Copy link
Member

@Yokozuna59 Yokozuna59 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't fully reviewed the PR because I'm not really sure how strict I should be about types and structure.
I don't want to be that strict, which would stop the merge of this PR. It has been open for a while, and it has two approvals already.

packages/mermaid/src/rendering-util/createText.ts Outdated Show resolved Hide resolved
packages/mermaid/src/themes/theme-default.js Show resolved Hide resolved
packages/mermaid/src/diagrams/xychart/xychartDetector.ts Outdated Show resolved Hide resolved
packages/mermaid/src/diagrams/xychart/xychartDetector.ts Outdated Show resolved Hide resolved
packages/mermaid/src/schemas/config.schema.yaml Outdated Show resolved Hide resolved
@nirname nirname added this pull request to the merge queue Oct 6, 2023
Merged via the queue into mermaid-js:develop with commit a4020da Oct 6, 2023
17 checks passed
@mermaid-bot
Copy link

mermaid-bot bot commented Oct 6, 2023

@subhash-halder, Thank you for the contribution!
You are now eligible for a year of Premium account on MermaidChart.
Sign up with your GitHub account to activate.

fuxingloh pushed a commit to fuxingloh/contented that referenced this pull request Nov 3, 2023
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [mermaid](https://togithub.com/mermaid-js/mermaid) | [`10.5.1` ->
`10.6.0`](https://renovatebot.com/diffs/npm/mermaid/10.5.1/10.6.0) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/mermaid/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/mermaid/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/mermaid/10.5.1/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/mermaid/10.5.1/10.6.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>mermaid-js/mermaid (mermaid)</summary>

###
[`v10.6.0`](https://togithub.com/mermaid-js/mermaid/releases/tag/v10.6.0):
10.6.0

[Compare
Source](https://togithub.com/mermaid-js/mermaid/compare/v10.5.1...v10.6.0)

#### What's Changed

- Add new chart xychart by
[@&#8203;subhash-halder](https://togithub.com/subhash-halder) in
[mermaid-js/mermaid#4413

#### Fix

- bug/4849\_center_axis_labels by
[@&#8203;dreathed](https://togithub.com/dreathed) in
[mermaid-js/mermaid#4860
- Better handling of large flowcharts and long edges
[@&#8203;knsv](https://togithub.com/knsv)

#### Docs

- Add new Atlassian integrations by
[@&#8203;janjonas](https://togithub.com/janjonas) in
[mermaid-js/mermaid#4862
- docs: fix typo by
[@&#8203;dennis0324](https://togithub.com/dennis0324) in
[mermaid-js/mermaid#4887
- Update notes on orientation in GitGraph documentation by
[@&#8203;guypursey](https://togithub.com/guypursey) in
[mermaid-js/mermaid#4897
- Enhancment: twitter logo in doc by
[@&#8203;chaursiyasanjeet](https://togithub.com/chaursiyasanjeet) in
[mermaid-js/mermaid#4925
- Update link for the Mermaid integration in JetBrains IDEs by
[@&#8203;FirstTimeInForever](https://togithub.com/FirstTimeInForever) in
[mermaid-js/mermaid#4883

#### Chores

- Wait for `marker_unique_id.html` E2E test to render before taking a
screenshot by [@&#8203;aloi](https://togithub.com/aloi)

sklink[mermaid-js/mermaid#4847
- Wait for `theme-directives.html` E2E test to render before taking a
screenshot by [@&#8203;aloisklink](https://togithub.com/aloisklink) in
[mermaid-js/mermaid#4846
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4851
- chore(dev-deps): update `@typescript-eslint/*` plugins to v6 (major)
by [@&#8203;aloisklink](https://togithub.com/aloisklink) in
[mermaid-js/mermaid#4857
- chore: shorten `flow-huge.spec.js` test case using `.repeat` by
[@&#8203;Yokozuna59](https://togithub.com/Yokozuna59) in
[mermaid-js/mermaid#4859
- Publish Live Editor previews for the `develop` & `next` branches by
[@&#8203;sidharthv96](https://togithub.com/sidharthv96) in
[mermaid-js/mermaid#4841
- chore(deps): update all minor dependencies (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4870
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4869
- Commented out broken test by
[@&#8203;nirname](https://togithub.com/nirname) in
[mermaid-js/mermaid#4913
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4891
- fix(class): avoid duplicate definition of fill by
[@&#8203;Mister-Hope](https://togithub.com/Mister-Hope) in
[mermaid-js/mermaid#4929
- chore(deps): update all minor dependencies (minor) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4892
- making consitent config imports from diagramAPI by
[@&#8203;dreathed](https://togithub.com/dreathed) in
[mermaid-js/mermaid#4889
- fix(typos): Fix minor typos in the source code by
[@&#8203;mribeirodantas](https://togithub.com/mribeirodantas) in
[mermaid-js/mermaid#4928
- chore(deps): update all patch dependencies (patch) by
[@&#8203;renovate](https://togithub.com/renovate) in
[mermaid-js/mermaid#4945
- Bump [@&#8203;babel/traverse](https://togithub.com/babel/traverse)
from 7.22.10 to 7.23.2 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[mermaid-js/mermaid#4951
- Replace rehype-mermaidjs with rehype-mermaid by
[@&#8203;remcohaszing](https://togithub.com/remcohaszing) in
[mermaid-js/mermaid#4970

#### New Contributors

- [@&#8203;dreathed](https://togithub.com/dreathed) made their first
contribution in
[mermaid-js/mermaid#4860
- [@&#8203;janjonas](https://togithub.com/janjonas) made their first
contribution in
[mermaid-js/mermaid#4862
- [@&#8203;dennis0324](https://togithub.com/dennis0324) made their first
contribution in
[mermaid-js/mermaid#4887
- [@&#8203;FirstTimeInForever](https://togithub.com/FirstTimeInForever)
made their first contribution in
[mermaid-js/mermaid#4883
- [@&#8203;guypursey](https://togithub.com/guypursey) made their first
contribution in
[mermaid-js/mermaid#4897
- [@&#8203;chaursiyasanjeet](https://togithub.com/chaursiyasanjeet) made
their first contribution in
[mermaid-js/mermaid#4925
- [@&#8203;mribeirodantas](https://togithub.com/mribeirodantas) made
their first contribution in
[mermaid-js/mermaid#4928

**Full Changelog**:
mermaid-js/mermaid@v10.5.1...v10.6.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/levaintech/contented).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMS41IiwidXBkYXRlZEluVmVyIjoiMzcuMzEuNSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Line chart and bar graph
7 participants