SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

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:

http://imgur.com/mzlauuP

  • 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 responseI 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.