Pattern cannot be shown in Legend

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Glenn F. Henriksen
Newbie
Newbie
Posts: 52
Joined: Tue Mar 04, 2003 5:00 am

Pattern cannot be shown in Legend

Post by Glenn F. Henriksen » Fri Nov 26, 2004 3:24 am

I have created a bar chart with pattern. But the pattern cannot be shown in the legend.

Is it a bug or something else I have to set so that the pattern can be shown legend?

My version is 1.0.1189.31308.

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 Nov 26, 2004 8:33 am

Hi Annelise,

You can see an example with source code of this at the TeeChart for .NET Feature demo which comes with the installation. You should search for the example "Brush Image".
Last edited by Narcís on Fri Apr 29, 2005 10:44 am, edited 1 time in total.
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

betulus
Newbie
Newbie
Posts: 25
Joined: Wed Apr 28, 2004 4:00 am
Location: Britishland

Post by betulus » Fri Apr 29, 2005 9:56 am

Hi again,

I am trying to do a simple chart, the chart has an indeterminate number of lines and just one set / of bars. I have set the bar pattern using this code:

// code for bar
Steema.TeeChart.Styles.Bar bar = new Bar(chart);
bar.Brush.Style = System.Drawing.Drawing2D.HatchStyle.Trellis;
bar.Marks.Visible = false;
bar.BarWidthPercent = 99; // default = 70%
bar.Color = Color.Black;

But for some reason the legend for this bar series is filled with a solid pattern rather than the Trellis pattern attached to the series. Also, the box is surrounded by a dotted blue line for some reason. I have used a dotted blue line to draw a line on the same chart, but didn't expect this setting to affect every other series on the graph! Here is the code for the line if its relavent:

// code for line (repeated once for each line)
Steema.TeeChart.Styles.Line line = new Line(chart);
line.Color = seriesDef.Colour;
line.LinePen.Style = System.Drawing.Drawing2D.DashStyle.Dash;
line.LinePen.Width = 2;

I would really appreciate your help.
Thanks
Matt

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 Apr 29, 2005 11:24 am

Hi Matt,

It works fine here using the latest version (Build 1.1.1937.15964) available at our Customer Download Area. Could you please download it if it's not your current version?

If it doesn't work for you could you please send us a sample application we can run "as-is" to reproduce the problem here?

You can post it at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.
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

betulus
Newbie
Newbie
Posts: 25
Joined: Wed Apr 28, 2004 4:00 am
Location: Britishland

Post by betulus » Tue May 03, 2005 2:11 pm

Narcis,
I have uploaded the code, though I forgot to include the TeeChart dll. Please confirm whether you have received or not.
Thanks
matt

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

Post by Narcís » Tue May 03, 2005 2:54 pm

Hi Matt,
I have upgraded to the latest version of TeeChart. The Download section said this is 1.1.1879.21176 so I used that.
That's not the latest version from our download section, it's Build 1.1.1937.15964.

Also I haven't been able to run your example application because the below
references are missing.

The referenced component 'BL.Common.WebControls' could not be found.
The referenced component 'BL.Common.Debug' could not be found.
The referenced component 'BL.Common.PortalUtils' could not be found.


Could you please arrange your application so that I can run it?

Thanks in advance.
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

betulus
Newbie
Newbie
Posts: 25
Joined: Wed Apr 28, 2004 4:00 am
Location: Britishland

Post by betulus » Wed May 04, 2005 7:25 am

Hi Narcis,

I have uploaded another version, hopefully this one will work better. I look forward to hearing from you.

Thanks
Matt

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

Post by Narcís » Thu May 05, 2005 11:43 am

Hi Matt,
With regards the download version, I am a bit confused. Your site says:

Download:

Latest Binary version: 25th Feb. 2005 04:00 PM, Build 1.1.1879.21176

TeeChart Pro for Microsoft Visual Studio .Net - Registered version. Supports
installation in Visual Studio.NET 2003 Framework v1.1.4322.

So that certainly looks like the latest version. I noticed there was
2.0.1938.29194, but that is obviously for version 2 of .Net,which we don't
currently use.
Yes, you are right. I confussed myself as the version I mentioned hasn't been released yet.
1. Legend problem as mentioned on the forum, I always seem to have a dotted
line around the 'IPD Performance' box.
Yes, this is a bug which I have already added to our defect list to be fixed for future releases.
2. When I scroll backwards and forwards the vertical line labelled September
2004 redraws in a different place.
Drawing a line using the code bellow works fine when scrolling.

Code: Select all

private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
float datePos = (sender as Steema.TeeChart.TChart).Axes.Bottom.CalcXPosValue(DateTime.Parse("01/08/2005").ToOADate());
System.Drawing.PointF start = new PointF(datePos, 0);
System.Drawing.PointF end = new PointF(datePos, 300);

g.DrawLine(Pens.Blue, start, end);

}
3. The bar sizes are too narrow. This is despite setting the width to 99
percent : bar.BarWidthPercent = 99; // default = 70%
This is a known bug which has already been fixed for the next release.
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

betulus
Newbie
Newbie
Posts: 25
Joined: Wed Apr 28, 2004 4:00 am
Location: Britishland

Post by betulus » Thu May 05, 2005 12:47 pm

Thanks Narcis, its good to know its not just me!

1. With regards point 1 - the dotted line, it there a workaround for this?

2. With regards point 2 - the moving line, your solution doesn't work for me because my version of TeeChart.Drawing.Graphics3D doesn't have a DrawLine method, though I will try it using the simple draw method.

3. With regards point 3 - the bar width issue, when is the next release due that fixes this problem?

Matt

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

Post by Narcís » Thu May 05, 2005 1:49 pm

Hi Matt,
1. With regards point 1 - the dotted line, it there a workaround for this?


Not really a workaround, but you could set tChart1.Legend.Symbol.DefaultPen to false and then set the legend pen style you wish for all legend symbols as shown below.

Code: Select all

	tChart1.Legend.Symbol.DefaultPen=false;
				tChart1.Legend.Symbol.Pen.Style = System.Drawing.Drawing2D.DashStyle.Solid;
				tChart1.Legend.Symbol.Pen.Width = 1;
				tChart1.Legend.Symbol.Pen.Color = System.Drawing.Color.Black;
2. With regards point 2 - the moving line, your solution doesn't work for me because my version of TeeChart.Drawing.Graphics3D doesn't have a DrawLine method, though I will try it using the simple draw method.


Well, it's not much different :wink:, just use:

Code: Select all

private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g) { 
int datePos = (sender as Steema.TeeChart.TChart).Axes.Bottom.CalcXPosValue(DateTime.Parse("01/08/2005").ToOADate()); 
System.Drawing.Point start = new Point(datePos, 0); 
System.Drawing.Point end = new Point(datePos, 300); 
g.Line(start, end); 
}
3. With regards point 3 - the bar width issue, when is the next release due that fixes this problem?
I can't tell you an exact date but will be soon.
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

betulus
Newbie
Newbie
Posts: 25
Joined: Wed Apr 28, 2004 4:00 am
Location: Britishland

Post by betulus » Thu May 05, 2005 2:42 pm

Yeppee, the marker line is working now when I scroll. Thank you. :D

Post Reply