This is a migrated thread and some comments may be shown as answers.

setting ZIndex when using ChartSeriesProvider

1 Answer 106 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 05 Jan 2015, 03:43 PM
Hello,

When displaying scatter plots, I like to use the following three properties on my ScatterSeries:
ClipToBounds=False, ClipToPlotArea=False, and ZIndex=1000 
to ensure the points don't get clipped by the axes and boundary scrollbars.  See attached pic for the result, when using a single series.

I'm not quite sure how to set the ZIndex of the scatter series when using a ChartSeriesProvider though for dynamic series.  It lets me set the ClipToBounds and ClipToPlotArea properties, but not the ZIndex using attached properties.

<telerik:ChartSeriesProvider Source="{Binding MultiSeriesData}">
    <telerik:ChartSeriesProvider.SeriesDescriptors>
        <telerik:ScatterSeriesDescriptor ItemsSourcePath="Data" XValuePath="X" YValuePath="Y">
            <telerik:ScatterSeriesDescriptor.Style>
                <Style TargetType="telerik:ScatterPointSeries" BasedOn="{StaticResource ScatterPointSeriesStyle}">
                    <Setter Property="ClipToBounds" Value="False" />
                    <Setter Property="ClipToPlotArea" Value="False" />
            <!-- I'd like to be able to do the following, but it causes an error -->
            <!-- <Setter Property="ZIndex" Value="1000" /> -->
                </Style>
            </telerik:ScatterSeriesDescriptor.Style>
        </telerik:ScatterSeriesDescriptor>
    </telerik:ChartSeriesProvider.SeriesDescriptors>
</telerik:ChartSeriesProvider>

Any suggestion on how to set the ZIndex of the dynamic scatter series?  It doesn't matter to me if they're all the same value, they just need to be higher than the chart boundary scrollbars.

1 Answer, 1 is accepted

Sort by
0
Petar Marchev
Telerik team
answered on 06 Jan 2015, 07:42 AM
Hello Joe,

The reason you cannot set the ZIndex property within a setter is that it is not a dependency property. Bindings to it would not work either. You can create an attached property and in the changed handler you can get the series and change it's ZIndex in code.

Regards,
Petar Marchev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ChartView
Asked by
Joe
Top achievements
Rank 1
Answers by
Petar Marchev
Telerik team
Share this question
or