Open rferreira98 opened 2 years ago
Would you be able to post your whole chart and data on CodePen/jsFiddle so that we can test?
Would you be able to post your whole chart and data on CodePen/jsFiddle so that we can test?
@martynasma will do in a matter of minutes
@martynasma here it is https://codesandbox.io/s/intelligent-roentgen-tyg0jg?file=/src/App.js
If you want to have two columns here, you should use HorizontalLayout instead of GridLayout. Also, set width for the legend to some percent value: https://codesandbox.io/s/young-sound-mfyc93?file=/src/LineChart.js:3849-3872
If you want to have two columns here, you should use HorizontalLayout instead of GridLayout. Also, set width for the legend to some percent value: https://codesandbox.io/s/young-sound-mfyc93?file=/src/LineChart.js:3849-3872
Although it looks better, the gridLayout does not work as expected inside the legend: Questions are overflowing
@rferreira98 Looks like you may have to change the Legend layout as well. On line 124, you have layout: root.gridLayout
but you probably want layout: root.verticalLayout
.
@rferreira98 Looks like you may have to change the Legend layout as well. On line 124, you have
layout: root.gridLayout
but you probably wantlayout: root.verticalLayout
.
Having a verticalLayout will not be responsive as per bigger screens. Will always be vertical and will occupy a massive space
This is a problem on our side, we will fix it in next release. Meanwhile you can solve this by adding a legend into another Container: https://codepen.io/team/amcharts/pen/PoEzyaO/111218e738a8696a07b3c44e2fd66a42
@martynasma @zeroin @sassomedia Thank you for the incredible attention to this issue and the workaround as well. Looking forward for the fix. 🚀
After some testing I find out that I can't apply the fix, as it causes some other issues. So I am afraid having a legend in a additional container might be a permanent solution.
If it is so, I'll use the legend workaround. Thank you!
Bug description
I'm trying to reproduce a 2 column legend + label layout. First I add set the
GridLayout
on the topAxesContainer:Then, I set the Legend first in order to get it first(on the left).
And finally I add the label after to add it to the right.
I should be getting a 2 column layout, with legend and custom label side by side on the topAxesContainer and what I get is:
Environment (if applicable)