Disappearing title text on chart with polar series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Christo Zietsman
Newbie
Newbie
Posts: 34
Joined: Thu Sep 04, 2008 12:00 am

Disappearing title text on chart with polar series

Post by Christo Zietsman » Thu May 07, 2009 2:07 pm

I've got two charts in a list view. If I select the second chart and select the first one again, the title of the second chart vanishes and doesn't come back again.

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
            }
        }
    }
}

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Post by Sandra » Fri May 08, 2009 10:07 am

Hello Christo Zietsman,

I could reproduce your issue here, and I have added to the list of Bug Report with number [TW16014139] we will try to fix it for next versions of TeeChart .NET WPF.

Also, I think that bug occurs when use next code:

Code: Select all

<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> 
Please, you could check that remove this code not ocurrs the issue when you select with click the charts.


Thanks,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Christo Zietsman
Newbie
Newbie
Posts: 34
Joined: Thu Sep 04, 2008 12:00 am

Post by Christo Zietsman » Fri May 08, 2009 12:20 pm

Hi Sandra

I'm not exactly sure what you mean, but it doesn't matter.

If I uncomment the line

Code: Select all

polar.CircleLabels = true;
then the title does not disappear. We want the labels though.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri May 08, 2009 1:24 pm

Hi Christo,

Thanks for your feedback. I could reproduce this and updated issue's log. I think Sandra wanted to say that using the charts outside ListView works fine too.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply