Pre loader

Set legend max height

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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.

Version
4.2.2
  • You must to post comments
1
0

Hi Andy,

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”):
https://www.scichart.com/documentation/v4.x/webframe.html#LegendModifier.html

Best regards,
Yuriy Z.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies