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

feat(treemap): Extend tree map API. #1089

Open
wants to merge 32 commits into
base: master
from
Open

feat(treemap): Extend tree map API. #1089

wants to merge 32 commits into from

Conversation

@Akiyamka
Copy link

Akiyamka commented Jan 18, 2019

Motivation: For creating complex tree map example we need more control over rendering.
Adding these props allows you to create, for example, nested treemaps.
Example

Akiyamka added 2 commits Jan 17, 2019
- getChildren
- getContent
@CLAassistant
Copy link

CLAassistant commented Jan 18, 2019

CLA assistant check
All committers have signed the CLA.

@mcnuttandrew
Copy link
Collaborator

mcnuttandrew commented Jan 18, 2019

Hey @Akiyamka,
This is great work so far! Mind adding some tests and an example to the showcase to document (in code) how these feature work?

@Akiyamka
Copy link
Author

Akiyamka commented Jan 24, 2019

@mcnuttandrew done, I added example in showcase and few more options for visual styling.

Akiyamka added 2 commits Jan 24, 2019
Reason - in that case it's ok.
Copy link
Collaborator

mcnuttandrew left a comment

This continues to be good work! Thanks!!!
I have a few notes:

  • It doesn't look like you use the simply.json dataset you included. You should either use it in your example or delete it, whichever
  • I like the showcase example, would you mind adding some tests against it? See the treemap-tests file for examples
src/styles/treemap.scss Outdated Show resolved Hide resolved
docs/treemap.md Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Show resolved Hide resolved
showcase/treemap/zoomable-treemap.js Show resolved Hide resolved
showcase/treemap/tree-tools.js Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/zoomable-treemap.js Outdated Show resolved Hide resolved
padding={gap}
margin={0}
getColor={colorFromValue}
renderMode='DOM'

This comment has been minimized.

@mcnuttandrew

mcnuttandrew Jan 24, 2019 Collaborator

Do your changes work in SVG and DOM mode?

This comment has been minimized.

@Akiyamka

Akiyamka Jan 25, 2019 Author

Yes, changes work in svg mode, but because onLeafClick not trigger in svg mode, navigation looks broken.

Copy link
Collaborator

mcnuttandrew left a comment

(see prev review)

src/treemap/index.js Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
docs/treemap.md Outdated Show resolved Hide resolved
src/treemap/index.js Outdated Show resolved Hide resolved
src/treemap/index.js Outdated Show resolved Hide resolved
Komzpa and others added 4 commits Jan 25, 2019
Co-Authored-By: Akiyamka <Akiyamka@gmail.com>
Co-Authored-By: Akiyamka <Akiyamka@gmail.com>
Co-Authored-By: Akiyamka <Akiyamka@gmail.com>
Co-Authored-By: Akiyamka <Akiyamka@gmail.com>
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
@Akiyamka Akiyamka force-pushed the konturio:master branch from c2d79bb to fe15254 Jan 25, 2019
Akiyamka added 3 commits Jan 25, 2019
@Akiyamka
Copy link
Author

Akiyamka commented Jan 30, 2019

@mcnuttandrew, please check changes, is everything OK or is there anything else to change?

@mcnuttandrew
Copy link
Collaborator

mcnuttandrew commented Jan 30, 2019

Hey @Akiyamka would you mind taking a look at both of my comments from the previous review (remove unused file and add tests)

@mcnuttandrew
Copy link
Collaborator

mcnuttandrew commented Jan 30, 2019

I tried downloading your branch to play around with your example and there are few bugs

  • Clicking on leaf nodes causes an error which causes the whole component to crash
  • It appears to crash on SVG mode

Also a few comments

  • I think it is not a good approach to include dangerouslySetInnerHTML, instead add a class to that component (zoomable-treemap or something) and add those styles examples.scss targeting only that component.
  • i turned on animation, it's pretty fun for your example
showcase/treemap/tree-tools.js Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
showcase/treemap/tree-tools.js Outdated Show resolved Hide resolved
@Akiyamka
Copy link
Author

Akiyamka commented Jan 31, 2019

@mcnuttandrew, thanks for the review!
I fixed crash in svg mode, but unfortunately I can't make it work the same way as in dom mode, because the component has different APIs in these modes. For example, clicking on a sheet does not return the sheet in svg mode. I think I need another pull request to fix this.

@id0Sch
Copy link
Contributor

id0Sch commented Jan 7, 2020

is this going to be merged soon? i'd love to use it :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants
You can’t perform that action at this time.