Skip to content

Conversation

@magnustymoteus
Copy link
Contributor

  • Add treemap module in js with RTreeMapPainter.mjs and RTreeMapToolTip.mjs that constitute:
    • Base drawing logic
    • Interactive features
      • Hovering on a field/column which shows the tooltip with extra information
      • Scoping which zooms in or out into the corresponding field
      • Hovering on a legend entry highlights the columns with the hovered type

I am still a little confused about the ROOT file I need to attach for testing purposes. Since the RTreeMap visualization is available for any ROOT file with an RNTuple, is it okay if I just attach a ROOT file with an RNTuple in it?:
treemap.zip
(This is a .zip file with .root file in it because github refuses to accept .root files)

demo

@linev linev changed the base branch from master to dev September 18, 2025 08:10
@linev
Copy link
Member

linev commented Sep 18, 2025

I change to dev branch.

Can you move your files to modules/draw sub-directory?

Also in your file you have RNTuple object, but you implement RTreeMapPainter class.
So one need instance of that class in the ROOT file to be able test functionality.

@silverweed
Copy link
Contributor

Also in your file you have RNTuple object, but you implement RTreeMapPainter class.
So one need instance of that class in the ROOT file to be able test functionality.

Why is this needed? I don't think we ever want to store a TreeMapPainter in a ROOT file

@magnustymoteus
Copy link
Contributor Author

Moved files in /modules/treemap to modules/draw and deleted the treemap directory

@linev
Copy link
Member

linev commented Sep 18, 2025

I don't think we ever want to store a TreeMapPainter in a ROOT file

While then I can add it to JSROOT CI tests - see here:

https://github.com/root-project/jsroot/actions/runs/17647937723/job/50150808637#step:10:1

@silverweed
Copy link
Contributor

I don't think we ever want to store a TreeMapPainter in a ROOT file

While then I can add it to JSROOT CI tests - see here:

https://github.com/root-project/jsroot/actions/runs/17647937723/job/50150808637#step:10:1

I still don't understand. Does Patryk need to provide a ROOT file containing a TreeMapPainter? How is this ROOT file used exactly?

@linev
Copy link
Member

linev commented Sep 18, 2025

Does Patryk need to provide a ROOT file containing a TreeMapPainter

Yes.

How is this ROOT file used exactly?

It will be add to set of our examples https://root.cern/js/latest/examples.htm and regularly checked.

@magnustymoteus
Copy link
Contributor Author

magnustymoteus commented Sep 18, 2025

This compressed root file should have an RTreeMapPainter instance inside:
treemap.zip

@linev
Copy link
Member

linev commented Sep 18, 2025

This compressed root file should have an RTreeMapPainter instance inside:

This is exactly that I need.

I test code locally on my machine and if it works as expected I will merge PR and add file to jsroot testing

@linev
Copy link
Member

linev commented Sep 18, 2025

I add several commits to fix several problems.

@linev
Copy link
Member

linev commented Sep 18, 2025

There are many eslint warnings about coding conventions.
You can see them in CI or if you install it locally with

npm install
npm run check

You can fix them later if you want.

@linev linev self-assigned this Sep 18, 2025
@linev
Copy link
Member

linev commented Sep 18, 2025

Here how file is integrated into CI:

https://github.com/linev/jsroot-test/blob/master/Misc/treemap.svg

And this is how it shown in my dev environment:

https://jsroot.gsi.de/dev/examples.htm#misc_treemap

@linev
Copy link
Member

linev commented Sep 18, 2025

And after merging of this PR.

One can write JavaScript code to directly display RNTuple from JSROOT.
We have code which read RNTuple structures so we can directly create RTreeMapPainter in JavaScript and display it.
I hope it can be done straight-forward.

@magnustymoteus
Copy link
Contributor Author

magnustymoteus commented Sep 18, 2025

There are many eslint warnings about coding conventions. You can see them in CI or if you install it locally with

npm install
npm run check

You can fix them later if you want.

I fixed them by running eslint fix on the corresponding files

@linev linev merged commit c701ff4 into root-project:dev Sep 18, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants