Hello,
I use the following code, I created a pie chart that appears with label displayed in spider mode (SpiderModeEnabled = true). However, did not displayed label of "Foo". (image1.jpg)
MainWindow.xaml
MainWindow.xaml.cs
In addition, connecter disappeared when after making resize to small window until a pie chart disappears, restore to the original size. (image2.jpg)
Do you have problem solution?
Thanks,
I use the following code, I created a pie chart that appears with label displayed in spider mode (SpiderModeEnabled = true). However, did not displayed label of "Foo". (image1.jpg)
MainWindow.xaml
<Window x:Class="Test.MainWindow" Title="MainWindow" Height="250" Width="495" xmlns:TelerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting" xmlns:TelerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"> <Grid> <TelerikChart:RadChart x:Name="m_RadChart" /> </Grid></Window>MainWindow.xaml.cs
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using Telerik.Windows.Controls.Charting;using Telerik.Windows.Controls;namespace Test{ // Data model. public class ChartRecord { public string Legend { get; set; } public int Value { get; set; } } public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); // Create data source. List<ChartRecord> source = new List<ChartRecord>(); source.Add(new ChartRecord() { Legend = "Foo", Value = 50 }); source.Add(new ChartRecord() { Legend = "Bar", Value = 30 }); source.Add(new ChartRecord() { Legend = "Baz", Value = 20 }); m_RadChart.ItemsSource = source; m_RadChart.DefaultView.ChartArea.SmartLabelsEnabled = true; PieSeriesDefinition definition = new PieSeriesDefinition(); // Setup label settings. RadialLabelSettings labelSettings = new RadialLabelSettings(); labelSettings.SpiderModeEnabled = true; labelSettings.ShowConnectors = true; definition.LabelSettings = labelSettings; // Setup mappings. SeriesMapping seriesMapping = new SeriesMapping(); seriesMapping.SeriesDefinition = definition; seriesMapping.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue)); seriesMapping.ItemMappings.Add(new ItemMapping("Legend", DataPointMember.XCategory)); m_RadChart.SeriesMappings.Add(seriesMapping); } }}In addition, connecter disappeared when after making resize to small window until a pie chart disappears, restore to the original size. (image2.jpg)
Do you have problem solution?
Thanks,