Commit Graph

59 Commits

Author SHA1 Message Date
Knut Sveidqvist c3160b2693
Merge pull request #4748 from mermaid-js/feature/4674_sankeyValues
feat(sankey): Show values
2023-08-23 07:42:30 +00:00
Sidharth Vinod 11b599d77c
chore: Fix type imports 2023-08-22 13:44:11 +05:30
Sidharth Vinod 4d84f1cd71
feat(sankey): Show values (#4674) 2023-08-20 21:18:09 +05:30
Alois Klink b989ff5362 fix: change sankey config types to be unions
Replace the TypeScript `enum {a = "a", b = "b"}` types with
TypeScript's literal types (e.g. `"a" | "b"`).

This is because TypeScript enums are
[_not_ a type-level addition to JavaScript][1], and even the official
TypeScript docs say to be careful when using.

[1]: https://www.typescriptlang.org/docs/handbook/2/everyday-types.html#enums
2023-07-02 23:44:19 +01:00
Nikolay Rozhkov 084b765e9f Added tests for colors and fully setup cypress in Docker 2023-07-02 01:10:06 +03:00
Nikolay Rozhkov a62719826a Docker+Cypress, better run, removed unused syntax
Added cypress container (from their official image),
may be reconsidered later to choose our own
The only minor problem is node JS version mistmatch
package.json 18.16.0
docker-compose mermaid 18.16.1
docker-compose cypress 18.16.0

Host option in cypress docker container must be removed
in favor of possible configuration option.
http://localhost:9000 are currently hard-coded, that is bad

Updated ./run script with better documentation
and added some styles too it as well

Started sankey.spec.js as an example
2023-07-01 16:17:25 +03:00
Nikolay Rozhkov 9177350a39 Fixed double quotes, docs, demo and added more examples to run script 2023-06-29 20:16:25 +03:00
Nikolay Rozhkov 8e3f8b1a57 Fixes after review 2023-06-29 15:39:50 +03:00
Nikolay Rozhkov 8b111760b1 Updates after review 2023-06-27 17:50:51 +03:00
Nikolay Rozhkov f0231ad9b1 Lint 2023-06-27 16:22:12 +03:00
Nikolay Rozhkov 0bbf0555d3 Fix linters 2023-06-27 16:17:55 +03:00
Nikolay Rozhkov d4d7ce5a4b Fixed majority of ts errors for sankey 2023-06-27 16:12:44 +03:00
Nikolay Rozhkov bbba643288 Rmoved unnecessary imports in tests 2023-06-27 15:30:53 +03:00
Nikolay Rozhkov 830319e3db Removed unnecessary TODO 2023-06-27 15:21:36 +03:00
Nikolay Rozhkov 32c8524317 Put d3-sankey under mermaid package 2023-06-27 15:15:34 +03:00
Nikolay Rozhkov 616c5e6914 Move UID to separate file, refine run sh 2023-06-27 15:05:25 +03:00
Nikolay Rozhkov 605e8d4a92 Sankey refactoring 2023-06-27 14:11:06 +03:00
Nikolay Rozhkov b0825ebb35 Import at the top 2023-06-26 18:37:41 +03:00
Nikolay Rozhkov a38733346f Removed unnecessary configs and extra code 2023-06-25 21:56:14 +03:00
Nikolay Rozhkov 6a893a758b Styles are optional 2023-06-25 01:07:11 +03:00
Nikolay Rozhkov 1d6074dbfa Sankey: Use [] instead of Array 2023-06-25 00:42:12 +03:00
Nikolay Rozhkov b23e86aea3 Added options for coloring 2023-06-25 00:22:36 +03:00
Nikolay Rozhkov 1674f12b62 Renamed sankey to sankey-beta 2023-06-24 23:11:54 +03:00
Nikolay Rozhkov 2f281ba228 Improvements for sankey diagram after review 2023-06-24 22:02:18 +03:00
Nikolay Rozhkov d766ac6d20 Prettier 2023-06-22 23:50:11 +03:00
Nikolay Rozhkov 7ace602a6c Fixed linters 2023-06-22 23:24:41 +03:00
Nikolay Rozhkov c75c106490 Put styles back 2023-06-22 23:02:13 +03:00
Nikolay Rozhkov d9036c7af1 Added gradient for sankey and cleaned code 2023-06-22 21:26:39 +03:00
Nikolay Rozhkov 518da3236f Remove unnecessary parsing stage from render and prepare text before parsing 2023-06-22 18:28:02 +03:00
Nikolay Rozhkov 104aece46e Cleanup sankey diagrams according code review 2023-06-22 17:35:46 +03:00
Nikolay Rozhkov 9a29066426 Ensure that sankey keyword does not intefere with csv 2023-06-22 16:53:44 +03:00
Nikolay Rozhkov be9cd480aa Sankey syntax has beed reduced 2023-06-22 15:58:09 +03:00
Nikolay Rozhkov 272615e580 Fixed tests and added node alignment 2023-06-21 03:54:55 +03:00
Nikolay Rozhkov 7bc5c1930e Fix specs 2023-06-21 02:58:25 +03:00
Nikolay Rozhkov 24d9f59d69 Fix specs 2023-06-21 02:52:21 +03:00
Nikolay Rozhkov 6c6efb24f4 Fix graph width 2023-06-21 01:58:57 +03:00
Nikolay Rozhkov 362648b74b Trim trailing spaces 2023-06-21 01:37:06 +03:00
Nikolay Rozhkov a2c055ba5d CSV syntax implementation 2023-06-21 01:29:34 +03:00
Nikolay Rozhkov 6077ba5405 Updated syntax and fixed comments from review 2023-06-20 03:06:47 +03:00
Nikolay Rozhkov 1009bb8fb7 Prettify 2023-06-19 04:29:41 +03:00
Nikolay Rozhkov 6722ac7540 Multiple improvements on syntax
Syntax has been simplified
Removed extra initial states
Removed unused groups
Nodes can be wrapped in double qotes
Updated demo page
2023-06-19 04:02:40 +03:00
Nikolay Rozhkov 9dbb9872bc Fix linters 2023-06-19 01:05:33 +03:00
Nikolay Rozhkov 19f858b73b Fixed nodes duplicates 2023-06-19 01:05:33 +03:00
Nikolay Rozhkov d22131e2fb It can read syntax and draw diagram 2023-06-19 01:05:33 +03:00
Nikolay Rozhkov f5add81e29 Simple flow is done 2023-06-19 01:05:33 +03:00
Nikolay Rozhkov c41fc67254 Added nodes and paths 2023-06-19 01:05:33 +03:00
Nikolay Rozhkov 81542142f5 Fix errors 2023-06-19 01:05:33 +03:00
Nikolay Rozhkov afaf87e414 At last something is working 2023-06-19 01:05:20 +03:00
Nikolay Rozhkov 1782f69c8f Increased mem for lint, fixed spell checking, run lint 2023-06-19 01:05:20 +03:00
Nikolay Rozhkov 40f7105ae4 Started renderer development 2023-06-19 01:05:20 +03:00