Telerik Forums
UI for Silverlight Forum
3 answers
134 views
I'm trying to figure out how to animate my chart. There seems to be no default animation. I'm using a simple static example as follows in a child window:

<graph:RadCartesianChart x:Name="chart">

                <graph:RadCartesianChart.HorizontalAxis>

                    <telerik:CategoricalAxis/>

                </graph:RadCartesianChart.HorizontalAxis>

                <graph:RadCartesianChart.VerticalAxis>

                    <telerik:LinearAxis Maximum="100"/>

                </graph:RadCartesianChart.VerticalAxis>

                <graph:RadCartesianChart.Series>

                    <telerik:LineSeries Stroke="Orange"

                         StrokeThickness="2">

                        <telerik:LineSeries.DataPoints>

                            <telerik:CategoricalDataPoint Value="20"/>

                            <telerik:CategoricalDataPoint Value="40"/>

                            <telerik:CategoricalDataPoint Value="35"/>

                            <telerik:CategoricalDataPoint Value="40"/>

                            <telerik:CategoricalDataPoint Value="30"/>

                            <telerik:CategoricalDataPoint Value="90"/>

                        </telerik:LineSeries.DataPoints>

                    </telerik:LineSeries>

                </graph:RadCartesianChart.Series>

            </graph:RadCartesianChart>

Martin Ivanov
Telerik team
 answered on 13 Jul 2015
5 answers
472 views
I am using ChartView, and I am not able to format my double value in x-axis in percent format, for example, the value is 0.005 and I want to display it as 0.5% in my x-axis. below is my code

<chart:ChartDataSource x:Name="DataSource" ItemsSource="{Binding Data}" SamplingUnit="NONE" />
 
<chart:RadCartesianChart Palette="Metro" Grid.Row="1" ClipToBounds="False" >
    <chartView:BarSeries ItemsSource="{Binding ElementName="DataSource"} CategoryBinding="Value" ValueBinding="Count" ShowLabels="True" />
        <chart:RadCartesianChart.HorizontalAxis>
            <chartView:CategoricalAxis MajorTickInterval="1" LabelInterval="1" LabelFormat="P" PlotMode="OnTicksPadded"/>
            <chart:RadCartesianChart.VerticalAxis>
                <chartView:LinearAxis />
            </chart:RadCartesianChart.VerticalAxis>
</chart:RadCartesianChart>

As you can see from above code, I try to use LabelFormat="P" to formate x-axis as I did in old telerik Chart but it doesn't work
Petar Marchev
Telerik team
 answered on 03 Jul 2015
2 answers
100 views

This is my first usage or RadChart and I wen thru the online documentation/examples but can't seem to get the RadChart binding to work.  I've verified my observableCollection and data values are there, just not binding.  I'm probably missing something easy ... here is the XAML:

 

<telerik:RadChart x:Name="SizeTrendingRadChart" Grid.Row="2" Grid.RowSpan="4" Grid.Column="7" Grid.ColumnSpan="2" Margin="2" ItemsSource="{Binding Path=Sizes}">
    <telerik:RadChart.DefaultView>
        <telerik:ChartDefaultView>
            <telerik:ChartDefaultView.ChartTitle>
                <telerik:ChartTitle Content="Market Trend" HorizontalAlignment="Center" Height="20" FontSize="9" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="Black" OuterBorderBrush="{x:Null}" Padding="1"  />
            </telerik:ChartDefaultView.ChartTitle>
            <telerik:ChartDefaultView.ChartLegend>
                <telerik:ChartLegend Visibility="Collapsed" />
            </telerik:ChartDefaultView.ChartLegend>
        </telerik:ChartDefaultView>
    </telerik:RadChart.DefaultView>
    <telerik:RadChart.SeriesMappings>
        <telerik:SeriesMapping LegendLabel="Rate" CollectionIndex="0">
            <telerik:SeriesMapping.SeriesDefinition>
                <telerik:LineSeriesDefinition ShowItemLabels="True"/>
            </telerik:SeriesMapping.SeriesDefinition>
            <telerik:SeriesMapping.ItemMappings>
                <telerik:ItemMapping DataPointMember="YValue" FieldName="{Binding CurrentSizeRate}"/>
                <telerik:ItemMapping DataPointMember="XValue" FieldName="{Binding TotalSizeRentRates}"/>
            </telerik:SeriesMapping.ItemMappings>
        </telerik:SeriesMapping>
    </telerik:RadChart.SeriesMappings>
</telerik:RadChart>

I basically used your documentation example and just adjusted for my needs, but I'm not seeing my data in the Chart.  No errors, just nothing is displayed.

Any suggestions?

Thanks, Rob.

 

Rob Ainscough
Top achievements
Rank 1
 answered on 25 Jun 2015
5 answers
210 views
We have 2 Y-axis on the same chart and we need to force the 0s lined up for these two Y-axis.  What's the best way to do this?

Take a look the attached png file, you can see two Y-axis have 0 at different levels.
Petar Marchev
Telerik team
 answered on 27 Apr 2015
1 answer
146 views

Hello All,

Unable to display line-color indicator in the legend box for the "Price" series. I would expect to see a gray square immediately to the left of Price inside the legend. See attachment.

Here is the markup:

  <telerik:RadCartesianChart Grid.Row="1" Grid.Column="0" VerticalAlignment="Stretch" Margin="0,0,20,0"
                                   Palette="Windows8" Name="HistoryChart"
                                   TrackBallLineStyle="{StaticResource TrackBallLineStyle}"
                                   TrackBallInfoStyle="{StaticResource TrackBallInfoStyle}">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis LabelFitMode="MultiLine"
                                                LabelInterval="1" LabelFormat="MMM d" />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartTrackBallBehavior ShowIntersectionPoints="True" SnapMode="AllClosePoints"
                                                TrackInfoUpdated="ChartTrackBallBehavior_TrackInfoUpdated" />
            </telerik:RadCartesianChart.Behaviors>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis LabelStyle="{StaticResource LeftLabelStyle}" />
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:AreaSeries CategoryBinding="BusinessDate"
                                    ValueBinding="Price"
                                    ItemsSource="{Binding ChartingWrapper.ChartingData}"
                                    Fill="{Binding ChartingWrapper.ChartingData, Converter={StaticResource ChartDataGradiantConverter}}"
                                    StrokeMode="Points" Stroke="{StaticResource MktPriceBrush}" StrokeThickness="2">
                    <telerik:AreaSeries.LegendSettings>
                        <telerik:SeriesLegendSettings Title="Price" />
                    </telerik:AreaSeries.LegendSettings>
                </telerik:AreaSeries>
                <telerik:LineSeries ValueBinding="TargetPriceUp" Stroke="{StaticResource UpsideBrush}">
                    <telerik:LineSeries.LegendSettings>
                        <telerik:SeriesLegendSettings Title="Target Price Up" />
                    </telerik:LineSeries.LegendSettings>
                </telerik:LineSeries>
                <telerik:LineSeries ValueBinding="TargetPriceDown" Stroke="{StaticResource DownsideBrush}">
                    <telerik:LineSeries.LegendSettings>
                        <telerik:SeriesLegendSettings Title="Target Price Down" />
                    </telerik:LineSeries.LegendSettings>
                </telerik:LineSeries>
            </telerik:RadCartesianChart.Series>
            <telerik:RadCartesianChart.Grid>
                <telerik:CartesianChartGrid StripLinesVisibility="None" MajorLinesVisibility="X" />
            </telerik:RadCartesianChart.Grid>
        </telerik:RadCartesianChart>
        <telerik:RadLegend BorderThickness="1" BorderBrush="LightGray"
                           Items="{Binding LegendItems, ElementName=HistoryChart}"
                           Margin="50,10" Grid.Row="1" Grid.Column="0"
                           HorizontalAlignment="Left"
                           VerticalAlignment="Top" />

 â€‹

Petar Marchev
Telerik team
 answered on 13 Apr 2015
9 answers
118 views
Hello

I am working on a chart type StackedBar and would like to add
Scroll to him.
are many columns and viewing area is small.

How can I do this in XAML?
Peshito
Telerik team
 answered on 31 Mar 2015
2 answers
60 views
Hi there,

I don't know if what I want is supported out of the box somehow but I haven't been able to figure it out in any case. I have some horizontal stacked bars, as shown in the attachment, and I want to sort them by the sum of the stack, so that the longest stack is rendered at the top of the chart, the second longest after that and so on. I know that the stack sum is available through the format expression "#STSUM" but I haven't been able to make use of that for sorting purposes. Maybe I was barking up the wrong tree with that idea.

I appreciate any and all help I can get.

Thanks,
Jonathan
Jonathan
Top achievements
Rank 1
 answered on 18 Mar 2015
1 answer
94 views
Hi,

I'm having some difficulties adding a binding to my radChart programmatically. When using the following XAML everything works as intended and the chart responds to changes to the underlying data:

<telerik:RadChart.SeriesMappings>
    <telerik:SeriesMapping LegendLabel="test" ItemsSource="{Binding MyData}">
        <telerik:SeriesMapping.SeriesDefinition>
            <telerik:StackedBarSeriesDefinition />
        </telerik:SeriesMapping.SeriesDefinition>
        <telerik:ItemMapping DataPointMember="YValue" FieldName="Length" />
        <telerik:ItemMapping DataPointMember="XCategory" FieldName="Name" />
    </telerik:SeriesMapping>
</telerik:RadChart.SeriesMappings>

However I need to add the series mappings dynamically, so I tried the following approach:

private SeriesMapping createSeries(string itemsSourceBindingPath, string legendLabel)
{
    SeriesMapping series = new SeriesMapping()
    {
        LegendLabel = legendLabel,
        SeriesDefinition = new HorizontalStackedBarSeriesDefinition()
    };
 
    series.ItemMappings.Add(itemMapping1);
    series.ItemMappings.Add(itemMapping2);
 
    BindingOperations.SetBinding(series, SeriesMapping.ItemsSourceProperty, new Binding(itemsSourceBindingPath));
 
    return series;
}

I then add the series to my chart like this:
myChart.SeriesMappings.Add(createSeries("MyData", "Stuff"));
myChart.SeriesMappings.Add(createSeries("MyData2", "More stuff"));
myChart.SeriesMappings.Add(createSeries("MyData2", "Other stuff"));

But after doing this the chart is not responding to changes to the data like it did when I manually added the series mappings in the XAML. Any ideas on where the issue lies?

Thanks,
Jonathan
Peshito
Telerik team
 answered on 13 Mar 2015
7 answers
95 views
We have an issue with the new RenderMode property in LineSeries. When set to Light it is fantastic for performance of our charts but we lose the DashArray capability. Is there anyway to keep the dasharray effect ?
Our scenario is we have a RadTileView which can contain several complex charts (which is why we want to RenderMode Light as the performance wasn't great without it). But would like to keep DashArray available as several charts have different lineseries that need to be differentiated. We would at least want this when a Tile (Chart) is maximised.

Any thoughts ??

Cheers ... Rob.
Meliton
Top achievements
Rank 1
 answered on 05 Mar 2015
2 answers
42 views
Hi.  I have an Area chart that uses an DateTimeContinuousAxis as its x-axis.  Since the number of points that feed it will change often and it is a small chart I would only like to label the "ends" of the axis.  In other words, show a label min and max of the x values and nothing in between.  This way, I can avoid the problem I am having in the attached screen capture.

I can wire to the LayoutUpdated event and set the MajorStep to the difference in the ActualRange Min and Max but that will fire very often and was hoping for a better way.

Thanks
Ernie
Ernie S
Top achievements
Rank 1
 answered on 16 Feb 2015
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?