Pre loader

FastLineRender Series Selection highlight

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

Answered
0
0

Hi

I’m trying to highlight the RenderableSeries when it’s selected instead of having them change color like the example found here: http://support.scichart.com/index.php?/Knowledgebase/Article/View/17185/28/series-selection-and-selected-series-styling

I was thinking the easiest way to do it would be by using an OutlineEffect or DropShadowEffect shader being applied to the series line. But I’m not sure where to put the Effect in the style as

                        <Style TargetType="SciChart:FastLineRenderableSeries">
                            <Setter Property="Effect">
                                <Setter.Value>
                                    <DropShadowEffect BlurRadius="12" Color="Yellow" ShadowDepth="0"/>
                                </Setter.Value>
                            </Setter>
                        </Style

This doesn’t do anything, and looking at the application using snoop shows me that an image is being created out of the render series, and hovering over RenderableSeries is not showing me what that control looks like in Snoop making me guess that RenderSeries isn’t actually rendering anything.

On a seperate note, I want to do this for every type of series so this isn’t just for the Line series. And I want to avoid adding a seperate Series from the ViewModel of thickness “regularSeries.Thickness + 2”, because that would just make things more complicated than it needs to be. It would also be OK to do it in a controlTemplate, however I don’t know how to template any of the series and what to add in them. I’m planning to set the Effect on a “IsSelected” trigger on the style.

I’ve made an illustration on what type of thing I’m looking to do:

View post on imgur.com

  • You must to post comments
Good Answer
1
0

Hi Kewur,

This won’t do anything I’m afraid, as the RenderableSeries are not typical UIElements like other WPF elements.

See What is a RenderableSeries and what is a DataSeries

The best you can do is change a property of the RenderableSeries such as SeriesColor, StrokeThickness, Opacity or PointMarkerTemplate.

Hope this helps,

Best regards,
Andrew

  • kewur
    Hi Andrew, Thanks for the quick response I was trying to set the template to have a "highlight series" under the hood, would this approach be possible? <SciChart:SciChartSurface.ChartModifier> <SciChart:SeriesSelectionModifier> <SciChart:SeriesSelectionModifier.SelectedSeriesStyle> <Style TargetType="SciChart:BaseRenderableSeries"> <Setter Property="SelectedSeriesStyle"> <Setter.Value> <Style TargetType="SciChart:FastLineRenderableSeries"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="SciChart:FastLineRenderableSeries"> <Grid> <SciChart:FastLineRenderableSeries x:Name="Highlight" SeriesColor="Yellow" DataSeries="{TemplateBinding DataSeries}" StrokeThickness="{TemplateBinding StrokeThickness, Converter={StaticResource MathConverter}, ConverterParameter=x+2}" /> <SciChart:FastLineRenderableSeries x:Name="Regular" SeriesColor="{TemplateBinding SeriesColor}" StrokeThickness="{TemplateBinding StrokeThickness}" DataSeries="{TemplateBinding DataSeries}"/> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </Setter.Value> </Setter> </Style> </SciChart:SeriesSelectionModifier.SelectedSeriesStyle> </SciChart:SeriesSelectionModifier> </SciChart:SciChartSurface.ChartModifier> Edit: Nevermind I don't think this approach would work etiher, I'm going to have to add them from the ViewModel.
  • 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