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

For fill in chart using

2 Answers 81 Views
ChartView
This is a migrated thread and some comments may be shown as answers.
Lee
Top achievements
Rank 1
Lee asked on 25 Apr 2014, 02:34 AM
YAxis is created each series.

Currently, all axis's color is same.

I want to adjust 'fill in chart'.

But RadCartesianChart's initialize value is null.

How can I do it?

Please answer about that.

Below, my XAML code

                            <telerik:CategoricalSeriesDescriptor.Style>
                                <Style TargetType="chartView:LineSeries">
                                    <Setter Property="LegendSettings">
                                        <Setter.Value>
                                            <telerik:SeriesLegendSettings Title="{Binding Name}"/>
                                        </Setter.Value>
                                    </Setter>
                                    <Setter Property="VerticalAxis" Value="{Binding Data, Converter={StaticResource additionalVerticalAxisConverter}}"/>
                                </Style>
                            </telerik:CategoricalSeriesDescriptor.Style>

2 Answers, 1 is accepted

Sort by
0
Klemens
Top achievements
Rank 1
answered on 25 Apr 2014, 06:40 AM
Have you looked at the documentation?

Axis

Regards Markus
0
Pavel R. Pavlov
Telerik team
answered on 29 Apr 2014, 06:22 AM
Hi Lee,

You can try binding the ElementBrush property of the corresponding axis. You can see how we demonstrated this approach in our Multiple Axis online demo.

<telerik:LineSeries CategoryBinding="Year" ValueBinding="{Binding GdpIndicatorBinding}" ItemsSource="{Binding GdpSelection}">
    <telerik:LineSeries.VerticalAxis>
        <telerik:LinearAxis Title="{Binding GdpIndicatorLabel, Converter={StaticResource upperCaseConverter}}"
                              ElementBrush="{Binding ElementName=chart, Path=Palette.GlobalEntries[1].Fill}"
                              HorizontalLocation="Right" />
    </telerik:LineSeries.VerticalAxis>
    <telerik:LineSeries.PointTemplate>
        <DataTemplate>
            <Ellipse Height="7" Width="7"
                     Fill="{Binding ElementName=chart, Path=Palette.GlobalEntries[1].Fill}"
                     Visibility="{Binding Converter={StaticResource emptyValueToVisibilityConverter}}" />
        </DataTemplate>
    </telerik:LineSeries.PointTemplate>
</telerik:LineSeries>
Please give this approach a try and let us know if you need any further assistance.

Regards,
Pavel R. Pavlov
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
ChartView
Asked by
Lee
Top achievements
Rank 1
Answers by
Klemens
Top achievements
Rank 1
Pavel R. Pavlov
Telerik team
Share this question
or