Pre loader

How to apply CustomTooltipsWithModifiers (Styles,Templates) to programmatically generated RenderableSeries?

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

In your example “CustomTooltipsWithModifiers” you show how to apply custom styles and templates to XML generated RenderableSeries, like: (works fine)

<s:SciChartSurface.RenderableSeries> 
<s:FastLineRenderableSeries 
Stroke="#ff6495ed" 
StrokeThickness="2" 
s:VerticalSliceModifier.TooltipContainerStyle="{StaticResource TooltipStyle1}" 
s:VerticalSliceModifier.TooltipTemplate="{StaticResource VerticalSliceTooltipTemplate1}"/>

In your example “ChangeSeriesTypeInCode” you generate the RenderableSeries in code programmatically, like: (works fine)

var series = new StackedMountainRenderableSeries() 
{ 
Name = "any Name", 
IsVisible = "any visibility", 
StrokeThickness = "any int", 
Stroke = "any Color", 
Fill = "any Brush", 
DataSeries = "any dataSeries" 
}; 
Chart.RenderableSeries.Add(series);

My Question: How do I apply the Templates and Styles for Modifiers to the programmatically generated RenderableSeries?

Thanks for help.

Version
4.2.2
  • You must to post comments
2
0

UPDATE: Just found it out myself.

Adding after : Chart.RenderableSeries.Add(series);

VerticalSliceModifier.SetTooltipTemplate(series, (DataTemplate)this.FindResource(“Desired_XML_Resource_Template”));
VerticalSliceModifier.SetTooltipContainerStyle(series, (Style)this.FindResource(“Desired_XML_Resource_Style”));

Thanks…

  • 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