Page 1 of 1

DashStyles.Dot does not show

Posted: Thu May 07, 2009 3:29 pm
by 13050248
Using TeeChart.WPF: 3.5.3371.26406

DashStyles Solid & Dash looks ok, but the rest isn't that good and Dot doesn't show anything.

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">    
    <Grid>
        <WPF:TChart Grid.Column="0" x:Name="Chart1" Margin="10" />
    </Grid>
</Window>

Code: Select all

using System;
using System.Windows;
using System.Windows.Media;
using Line=Steema.TeeChart.WPF.Styles.Line;

namespace WPFDemo
{
    /// <summary>
    /// Interaction logic for Window7.xaml
    /// </summary>
    public partial class Window7 : Window
    {
        public Window7()
        {
            InitializeComponent();
            var random = new Random(10);

            Chart1.Header.Text = "My Title 1";
            Chart1.Aspect.View3D = false;
            var line = new Line();
            line.ShowInLegend = false;            
            line.LinePen.Style = DashStyles.Dot;
            line.LinePen.Width = 2.75;
            line.Color = Colors.Blue;
            for (int i = 0; i < 10; i++)
            {
                line.Add(i, random.NextDouble());
            }
            Chart1.Series.Add(line);

            //Chart2.Header.Text = "My Title 2";
            //var series = createPolarSeries();
            //series.ShowInLegend = false;            
            //for (int i = 0; i < 36; i++)
            //{
            //    series.Add(i*10, random.NextDouble());
            //}
            //addSeries(Chart2, series);
        }
    }
}

Posted: Fri May 08, 2009 10:46 am
by 10050769
Hello Christo Zietsman,

I could reproduce your problem and I have added to the list of Bug Report with number [TW16014142] we will try to fix it for next versions of TeeChartFor .Net WPF.


Thanks,

Posted: Tue May 12, 2009 8:04 am
by 10050769
Hello Christo Zietsman,


We have found a solution for your problem, using next code:


InitializeChart:

Code: Select all

private void InitializeChart()
        {
            var line = new Steema.TeeChart.WPF.Styles.Line(Chart1.Chart);
            var random = new Random(10);
            Chart1.Header.Text = "My Title 1";
            Chart1.Aspect.View3D = false;
            line.ShowInLegend = false;
            line.LinePen.Style = DashStyles.Dot;
            line.LinePen.DashCap = PenLineCap.Square; 
            line.FillSampleValues();
            line.LinePen.Color = Colors.Black;
            line.LinePen.Width = 2.75;
            line.Color = Colors.Blue;
            for (int i = 0; i < 10; i++)
            {
                line.Add(i, random.NextDouble());
            }
            Chart1.Series.Add(line);
        }
I hope that will help.

Posted: Tue May 12, 2009 11:36 am
by 13050248
Great. I've made the needed changes and it looks like it works.

Thanks
Christo