SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I have a legend modifier and I’m trying to set the max height like this:
<s:LegendModifier ShowLegend="True" Orientation="Vertical" LegendPlacement="Inside" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" MaxHeight="165" />
However the setting has no effect on the max height. Is there somewhere else I need to set this? Thank you.
Let me post the answer here too to benefit the community.
The reason for this behavior is that LegendModifier isn’t a Legend that you see on a chart, it just provides API for configuring a SciChartLegend control. It gets created internally by a modifier instance and have some of its properties bound.
To set the size of a Legend, you need to set it directly on the SciChartLegend control. It is quite easy to do, you can set it on a ControlTemplate for the LegendTemplate property. Please find an example in our docs here (see the “Templating the SciChartLegend Control”):
Please login first to submit.