I'm using the latest maintenance release: 3.5.3371.26406
Code: Select all
<Window x:Class="WPFDemo.Window7"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WPF="clr-namespace:Steema.TeeChart.WPF;assembly=TeeChart.WPF"
Title="Window7" Width="800" Height="600">
<ScrollViewer>
<ListView
SelectedIndex="0"
ScrollViewer.CanContentScroll="False"
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
<ListView.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>
<WPF:TChart x:Name="Chart1" Margin="10" Width="300" Height="300"/>
<WPF:TChart x:Name="Chart2" Margin="10" Width="300" Height="300"/>
</ListView>
</ScrollViewer>
</Window>
Code: Select all
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.Shapes;
using Steema.TeeChart.WPF;
using Steema.TeeChart.WPF.Styles;
namespace WPFDemo
{
/// <summary>
/// Interaction logic for Window7.xaml
/// </summary>
public partial class Window7 : Window
{
public Window7()
{
InitializeComponent();
Chart1.Header.Text = "My Title 1";
Chart2.Header.Text = "My Title 2";
var series = createPolarSeries();
series.ShowInLegend = false;
var random = new Random(10);
for (int i = 0; i < 36; i++)
{
series.Add(i*10, random.NextDouble());
}
addSeries(Chart2, series);
}
private Polar createPolarSeries()
{
Polar polar = new Polar();
polar.Brush.Visible = false;
polar.CircleLabels = true;
polar.Circled = true;
polar.RotationAngle = 90; // zero degrees is at top
polar.RadiusIncrement = 2; // 2 dB increments
return polar;
}
private void addSeries(TChart chart, Series plot)
{
if (plot is Polar)
{
Polar polar = (Polar)plot;
polar.ClockWiseLabels = true; // angles increment clockwise
}
chart.Series.Add(plot);
if (plot is Polar)
{
Polar polar = (Polar)plot;
polar.AngleIncrement = 30; // 30 degrees increments
}
}
}
}