Pre loader

Legend Font not working after update to v6.5.1

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

1
0

I have a SciChartLegend below my chart that was using the default item template in v6.4, and I could change the color of my legend labels simply by setting the Foreground property of the SciChartLegend. However, when I updated to SciChart 6.5.1, the font of my legend labels changed to all black. If I investigate my UI using Snoop, I see the following Binding error on the TextBlock.Foreground property for one of my legend items:

System.Windows.Data Error: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.LegendPlaceholder’, AncestorLevel=’1”. BindingExpression:Path=Foreground; DataItem=null; target element is ‘TextBlock’ (Name=”); target property is ‘Foreground’ (type ‘Brush’)

I also tried v6.5.0, and this behavior did not occur – it is new in v6.5.1

Below is the definition of my legend.

<s:SciChartLegend x:Name="legend"
                  LegendData="{Binding ElementName=LegendModifier, Path=LegendData}"
                  Orientation="Horizontal"
                  BorderBrush="White"
                  FontSize="14"
                  BorderThickness="1"
                  HorizontalAlignment="Stretch"
                  VerticalAlignment="Stretch"
                  ShowVisibilityCheckboxes="True">
    <s:SciChartLegend.ItemsPanel>
        <ItemsPanelTemplate>
            <chartUtils:UniformWrapPanel Orientation="Horizontal"/>
        </ItemsPanelTemplate>
    </s:SciChartLegend.ItemsPanel>
</s:SciChartLegend>
Version
6.5.1
  • You must to post comments
1
0

Hi, I seem to be getting exactly the same issue. Previously I was using V6.3.0 which had no issue, now I jumped to V8.3.0 and am getting this exception.

System.Windows.Data Warning: 4 : Cannot find source for binding with reference ‘RelativeSource FindAncestor, AncestorType=’SciChart.Charting.Visuals.RenderableSeries.LegendPlaceholder’, AncestorLevel=’1”. BindingExpression:Path=Foreground; DataItem=null; target element is ‘TextBlock’ (Name=”); target property is ‘Foreground’ (type ‘Brush’)

Has the problem reappeared in the latest release?

  • You must to post comments
1
0

Hi Brandon,

Thank you for your patience with this issue.
I’m glad to inform you that we have published a fix for the reported issue within a new SciChart Nightly build.
The changes are available in SciChart v7.0.1.27123 and newer.

Here is how to get our nightly builds:
https://support.scichart.com/index.php?/Knowledgebase/Article/View/17232/37/getting-nightly-builds-with-nuget

Please try it out and let us know your feedback.

  • You must to post comments
Showing 2 results
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