You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When there are multiple series being added to the chart, the legend and tool tip get cut off on the edge.
i.e.:
Additionally, when legend is put on the side, for example, LegendPosition = Left in this case, while hovering over the right most points the tooltip doesn't show up.
To Reproduce
var seriesCollection = new ISeries[]
{
new LineSeries<int>
{
Values = new []{ 2, 5, 10, 6, 0 },
Name = "Test 1",
},
new LineSeries<int>
{
Values = new []{ 3, 17, 2, 9, 14 },
Name = "Test 2",
},
new LineSeries<int>
{
Values = new []{ 2, 15, 4, 2, 6 },
Name = "Test 3"
},
new LineSeries<int>
{
Values = new []{ 3, 7, 12, 9, 4 },
Name = "Test 4"
},
new LineSeries<int>
{
Values = new []{ 2, 15, 4, 2, 24 },
Name = "Test 5"
},
new LineSeries<int>
{
Values = new []{ 3, 7, 2, 9, 19 },
Name = "Test 6"
},
new LineSeries<int>
{
Values = new []{ 3, 5, 5, 8, 6 },
Name = "Test 7"
},
new LineSeries<int>
{
Values = new []{ 3, 7, 2, 9, 4 },
Name = "Test 8"
}
};
chartDemo.Series = seriesCollection;
chartDemo.LegendPosition = LiveChartsCore.Measure.LegendPosition.Bottom;
Expected behavior
Legends wrapped in multiple lines, and tooltip able to float outside of the chart container. (Like the old livecharts!)
Screenshots
See above.
Desktop (please complete the following information):
OS: Windows 10 Pro 21H2
Visual Studio 2022 .Net6.0
The text was updated successfully, but these errors were encountered:
This is known issue (at least the legend clipping part, see #832) and I think actually affects almost all backends because it's down to the layouting of each backend not taking wrapping into account. In the Skia backend, which is what I'm using, the layout in done in a StackPanel that is used as both a container for the legends and the legends themselves. There isn't really a workaround other than changing position, but eventually you're also going to run out of vertical space if you have many datasets. The layouting process uses internal classes and variables so the only way to fix this is by forking the repo, which I did.
So here's the patch for fixing the (horizontal) wrapping issue in the Skia backend: gist. I looked into it and on WinForms DefaultLegend also does manual layouting like in Skia, so you should be able to reuse this logic there. Mind you that WeirdOffset is something particular to the Skia backend.
Describe the bug
When there are multiple series being added to the chart, the legend and tool tip get cut off on the edge.
i.e.:
![image](https://user-images.githubusercontent.com/66186773/234218613-c37496c4-c8ce-4f5b-a04d-036797ae2063.png)
Additionally, when legend is put on the side, for example, LegendPosition = Left in this case, while hovering over the right most points the tooltip doesn't show up.
![image](https://user-images.githubusercontent.com/66186773/234219523-dbdfa6a1-3afc-4517-a8ac-4d83f833af5e.png)
To Reproduce
Expected behavior
Legends wrapped in multiple lines, and tooltip able to float outside of the chart container. (Like the old livecharts!)
Screenshots
See above.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: