DashStyles.Dot does not show

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

DashStyles.Dot does not show

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

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

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

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

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

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

Post by Sandra » Tue May 12, 2009 8:04 am

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.
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 » Tue May 12, 2009 11:36 am

Great. I've made the needed changes and it looks like it works.

Thanks
Christo

Post Reply