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

Tree Chart Component - react-charting - Update README #23932

Merged
merged 72 commits into from
Jul 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
ef149f5
structure added
Apurva-tech Jun 21, 2022
3107ba7
add: tree chart structure-two layer
Apurva-tech Jun 22, 2022
d39306b
fix: svg size and node spacing
Apurva-tech Jun 23, 2022
7806a75
add: three layer-long/compact composition
Apurva-tech Jun 25, 2022
69fd23c
Merge pull request #1 from Apurva-tech/usr/Apurva-tech/TreeChart
Apurva-tech Jun 25, 2022
8890e7a
Merge branch 'microsoft:master' into master
Apurva-tech Jun 27, 2022
ed51a39
fix: node and text spacing
Apurva-tech Jun 27, 2022
0e4d865
Merge branch 'microsoft:master' into usr/Apurva-tech/TreeChart
Apurva-tech Jun 28, 2022
81d2a41
fix: imports with individual package and build errors
Apurva-tech Jun 28, 2022
ab07c3c
Merge branch 'usr/Apurva-tech/TreeChart' of https://github.com/Apurva…
Apurva-tech Jun 28, 2022
62a34bd
Merge branch 'master' of https://github.com/Apurva-tech/fluentui into…
Apurva-tech Jun 28, 2022
67472f7
Merge pull request #2 from Apurva-tech/usr/Apurva-tech/TreeChart
Apurva-tech Jun 28, 2022
5c143da
Merge branch 'microsoft:master' into master
Apurva-tech Jun 28, 2022
60990f2
add: yarn change file
Apurva-tech Jun 28, 2022
a1dfeef
Merge pull request #3 from Apurva-tech/usr/Apurva-tech/TreeChart
Apurva-tech Jun 28, 2022
a8172fd
fix: d3-hierarchy version
Apurva-tech Jun 29, 2022
a153fda
Merge pull request #4 from Apurva-tech/usr/Apurva-tech/TreeChart
Apurva-tech Jun 29, 2022
5a420ff
fix(try1): react-examples error in draft PR
Apurva-tech Jun 29, 2022
025dfee
fix(try 2): react-examples error in draft PR-data import fixed
Apurva-tech Jun 29, 2022
30ac2b6
fix: add tree example code in react-examples
Apurva-tech Jun 29, 2022
a93f705
Delete @fluentui-react-charting-5967e697-3ab3-4d6f-88c2-75846bba8372.…
Apurva-tech Jun 30, 2022
8d766e8
fix: addressed review comments
Apurva-tech Jun 30, 2022
34cf473
Merge branch 'master' of https://github.com/Apurva-tech/fluentui
Apurva-tech Jun 30, 2022
1248ef3
fix: Data structure naming
Apurva-tech Jun 30, 2022
7b3002a
fix: tree chart test
Apurva-tech Jun 30, 2022
e4d5e1f
add: component styling & wrap in <g> element
Apurva-tech Jul 2, 2022
9876b00
fix: try to fix build fail
Apurva-tech Jul 2, 2022
87a6282
fix: build issue
Apurva-tech Jul 2, 2022
adc9e5c
add: interaction testing & rootElem div; remove: margin propsv
Apurva-tech Jul 4, 2022
20dc247
add: comments in treechartbase
Apurva-tech Jul 4, 2022
bd40ea3
add: readme; fix: testing
Apurva-tech Jul 4, 2022
78640e7
Merge branch 'microsoft:master' into master
Apurva-tech Jul 4, 2022
da88cec
fix: testing error in build
Apurva-tech Jul 4, 2022
3330fbd
Merge branch 'master' of https://github.com/Apurva-tech/fluentui
Apurva-tech Jul 4, 2022
bd285aa
Update TreeChart.md
Apurva-tech Jul 4, 2022
63e955a
fix: text alignment and review comments
Apurva-tech Jul 5, 2022
dcb9d30
Merge branch 'master' of https://github.com/Apurva-tech/fluentui
Apurva-tech Jul 5, 2022
d73796d
add: snapshot testing & fix: text alignment
Apurva-tech Jul 6, 2022
968cb26
Merge branch 'microsoft:master' into master
Apurva-tech Jul 6, 2022
ac627b6
fix: review comments
Apurva-tech Jul 6, 2022
ccd4523
Merge remote-tracking branch 'upstream/master'
Apurva-tech Jul 6, 2022
dd8e191
Merge branch 'microsoft:master' into master
Apurva-tech Jul 6, 2022
952466b
fix: build error
Apurva-tech Jul 6, 2022
2b87aca
Merge branch 'master' of https://github.com/Apurva-tech/fluentui
Apurva-tech Jul 6, 2022
f5de2e9
Merge branch 'microsoft:master' into master
Apurva-tech Jul 8, 2022
2f52aba
Merge branch 'microsoft:master' into master
Apurva-tech Jul 8, 2022
b960d70
fix: UI/UX; add: automatic composition
Apurva-tech Jul 9, 2022
a1e3e0a
Merge branch 'master' of https://github.com/Apurva-tech/fluentui
Apurva-tech Jul 9, 2022
3f21a83
add: navigation props
Apurva-tech Jul 11, 2022
0184ac3
Merge branch 'microsoft:master' into master
Apurva-tech Jul 11, 2022
9360e10
address review comments
Apurva-tech Jul 11, 2022
ec90d1f
update: snapshot test file
Apurva-tech Jul 11, 2022
15cf2f1
Merge branch 'microsoft:master' into master
Apurva-tech Jul 11, 2022
3de659c
Merge branch 'microsoft:master' into master
Apurva-tech Jul 11, 2022
06db2fc
Merge branch 'microsoft:master' into master
Apurva-tech Jul 12, 2022
55470dd
Merge branch 'microsoft:master' into master
Apurva-tech Jul 12, 2022
994be17
fix: production issue (width-height of SVG)
Apurva-tech Jul 13, 2022
1c4e1a7
Merge branch 'microsoft:master' into usr/Apurva-tech/Fixes
Apurva-tech Jul 13, 2022
a86c47d
add: yarn change file
Apurva-tech Jul 13, 2022
0db5fa9
Merge branch 'usr/Apurva-tech/Fixes' of https://github.com/Apurva-tec…
Apurva-tech Jul 13, 2022
51ae84c
add: truncated text-ellipsis value
Apurva-tech Jul 13, 2022
44a2f62
add: reflow and slider
Apurva-tech Jul 13, 2022
9d274d1
Merge branch 'microsoft:master' into usr/Apurva-tech/Reflow
Apurva-tech Jul 13, 2022
8bf4a37
add: comments for layoutWidth
Apurva-tech Jul 14, 2022
bd344d5
update: snap file
Apurva-tech Jul 14, 2022
d62d014
Merge branch 'usr/Apurva-tech/Reflow' of https://github.com/Apurva-te…
Apurva-tech Jul 14, 2022
0426fc1
Merge branch 'microsoft:master' into usr/Apurva-tech/Reflow
Apurva-tech Jul 14, 2022
fa83b42
fix: review comments
Apurva-tech Jul 14, 2022
5d04dd3
Merge branch 'usr/Apurva-tech/Reflow' of https://github.com/Apurva-te…
Apurva-tech Jul 14, 2022
4a00d7c
fix: review comments
Apurva-tech Jul 14, 2022
c7d87d0
Merge branch 'microsoft:master' into usr/Apurva-tech/README
Apurva-tech Jul 15, 2022
bc7eb9a
Update TreeChart.md
Apurva-tech Jul 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: production issue (width-height of SVG)",
"packageName": "@fluentui/react-charting",
"email": "apurva.sharma866@gmail.com",
"dependentChangeType": "patch"
}
21 changes: 12 additions & 9 deletions packages/react-charting/src/components/TreeChart/TreeChart.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
Nodes

- Contains main text and subtext, positioned in the middle of rectangle.

![image](https://user-images.githubusercontent.com/59837325/177205565-cfb22522-ba11-4db3-8664-816387f7d66a.png)
![image](https://user-images.githubusercontent.com/59837325/179209802-e5211059-b144-449f-9160-a98589d34a7e.png)


Branch
Expand Down Expand Up @@ -114,8 +113,8 @@ interface ITreeProps {
- The main text and subtext are added consecutively, and rectangle shapes with specific width and height are added for both parents.
- The Node border color is extracted from the JSON Data Structure.
- Example of the two-layer structure:
- ![image](https://user-images.githubusercontent.com/59837325/179209918-0769a3b4-ac04-4c3c-95a9-1c7590f89889.png)

![image](https://user-images.githubusercontent.com/59837325/177205659-1a6ff078-37c6-4d75-8d4e-5ea6bea8c6f0.png)

## Structure

Expand All @@ -133,28 +132,32 @@ interface ITreeProps {

- The compact composition positions nodes in the form of two stacks, left stack and right stack.
- The links are generated differently for the leaf nodes.

![image](https://user-images.githubusercontent.com/59837325/177205690-d98a1d4c-6f86-4bb0-9e05-781d4ab8e70c.png)
![image](https://user-images.githubusercontent.com/59837325/179210047-bcdc5774-8d44-4f93-aaa8-a5ea5285b275.png)

- The long compositions positions nodes in form of a single stack in the middle.
![image](https://user-images.githubusercontent.com/59837325/179210095-1d9abbe9-e1ff-417d-81ef-e1d8bea3e0d4.png)

![image](https://user-images.githubusercontent.com/59837325/177205723-5b6c3ca5-9393-442e-a434-158dd644e7c4.png)

## Structure

**For compact composition:**
![Group 4](https://user-images.githubusercontent.com/59837325/179210243-09b11e61-9c46-4946-9283-673605419b65.png)

- We add visited parents to a set and add all the children of that parent at once, and never visit children of that parent again.
- Stack the even/left leaf nodes i.e., leaf1, and leaf2 are positioned at dx1, and similarly stack right nodes at dx2, and increment dy.

![image](https://user-images.githubusercontent.com/59837325/177205763-ab02d924-c404-4503-8210-b36ecf29be91.png)

**For long composition:**
![Group 3](https://user-images.githubusercontent.com/59837325/179210275-3a612028-9c05-4a6f-ae15-59ed49f520ed.png)

- We stack the nodes one by one, for long composition.
- Link implementation is similar to compact composition.

![image](https://user-images.githubusercontent.com/59837325/177205788-83659fd0-f34e-4056-8b54-340337612d9b.png)
**Automatic composition:**
![image](https://user-images.githubusercontent.com/59837325/179210543-bae398da-e87a-41bd-a033-f007781c77d2.png)

- When there is constraint on the space for each leaf node.
- Example:
![Group 5](https://user-images.githubusercontent.com/59837325/179210459-1dda7117-83ee-4445-9641-74705489b676.png)

# Component Styling

Expand Down