Skip to content

Conversation

mierin12
Copy link
Contributor

@mierin12 mierin12 commented Sep 22, 2025

Hello, this is just a draft POC from @hendrikm78 proposition here : #2719 (comment)

I figured out the following:

  • pp.getInitialHeight & pp.getInitialWidth return -4, seems the dimensions can not be determined when the script is called

To avoid this problem I did two workarounds:

  1. Limit the output of these two functions to >= 50
  2. add a EventListener "load" to the flare and pie chart

For details see attachment. (I am not familar with git, so I would do it this way)
The Flare-Chart works fine, but the Pie-Chart is a little bit tricky. Sometimes you have to switch to another Taxonomy and go back.

I do not have Linux myself, but as per the comments in the linked discussion, it seems this is fixing the "sunburst" pie chart, but not fixing the "donut" pie chart.
So this seems promising, I think this is worth a bit of visibility, in case Linux contributors want to further investigate.
On my side, both "sunburst" and "donut" pie chart keep functioning as intended on Windows 11.

If this goes somewhere, the contributor is hendrikm78, not me.

@buchen
Copy link
Member

buchen commented Oct 3, 2025

I tested in on Linux.

Interesting: I get to see the pie charts in the taxonomy, but only if that is the initial view to be shown. If the taxonomy view opens with something else, then I see a small (I assume 50 by 50 pixel) thing and then an empty screen.

@buchen
Copy link
Member

buchen commented Oct 3, 2025

BTW, that fits to the behavior that @hendrikm78 reported:

The Flare-Chart works fine, but the Pie-Chart is a little bit tricky. Sometimes you have to switch to another Taxonomy and go back.

@buchen
Copy link
Member

buchen commented Oct 3, 2025

I tested it on macOS and Windows - there the scripts continue to work as expected. I think we can merge this, but I think the default on Linux should still be the SWT charts

@mierin12
Copy link
Contributor Author

mierin12 commented Oct 3, 2025

I tested in on Linux.

Interesting: I get to see the pie charts in the taxonomy, but only if that is the initial view to be shown. If the taxonomy view opens with something else, then I see a small (I assume 50 by 50 pixel) thing and then an empty screen.

Does this initial vs non initial behaviour happens for both charts, or only for the donut chart, and flare is working correctly unconditionally all the time ?

@buchen
Copy link
Member

buchen commented Oct 4, 2025

Does this initial vs non initial behaviour happens for both charts, or only for the donut chart, and flare is working correctly unconditionally all the time ?

Only for the pie charts (holdings and donut). The flare chart seems to work all the time.

@buchen
Copy link
Member

buchen commented Oct 4, 2025

This is how it looks now (I merged it with fbe8eab).

You if one opens the donut the first time around, there is a small square of labels (I assume the 50 by 50). And then the chart is gone. If the chart is the default view to be opened for this taxonomy, then it is shown:

Bildschirmaufnahme.2025-10-04.um.07.42.26.mp4

@mierin12
Copy link
Contributor Author

mierin12 commented Oct 4, 2025

It is great then if it is an improvement for Linux for the Flare. It is a bit puzzling that the behaviour is different between those two charts, while the implementation seems quite similar.

I wonder if there is a small side effect after all on Windows. I think there a visible one frame flicker when changing the accounts or the option "with/without Unclassified", "with/without securities level" ? On the Holdings, the change of selected accounts seems smoother.

@buchen
Copy link
Member

buchen commented Oct 10, 2025

I wonder if there is a small side effect after all on Windows. I think there a visible one frame flicker when changing the accounts or the option "with/without Unclassified", "with/without securities level" ?

To be honest, I only briefly tested on Windows with this change.

You mean there is now additional flicker on Windows when applying a "filtering options" such as "with/without unclassified"? I am not sure if that is new. If the file changes (new prices, new filter), I need to reload the HTML page. And for one frame, it renders an empty page. One could get around this - maybe - by triggering a method to update the pie chart. I haven't tried. I find it super hard to develop this because I could not find a debug console for the embedded browser.

@mierin12
Copy link
Contributor Author

I am not sure if this is new either to be honest, I can double check on an older version.

I took a video where we see the two behaviors :

  • Taxonomy : reload can be seen as there is a empty view in between
  • Statement of assets holdings : generally* without the "in between empty view" reload

*at the end of the video we can see it is here too. But it is not really reproductible and I think quite rare there.

Enregistrement.7.mp4

I agree this seems complicated while it is only a very small topic.

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.

2 participants