Pattern cannot be shown in Legend
-
- Newbie
- Posts: 52
- Joined: Tue Mar 04, 2003 5:00 am
Pattern cannot be shown in Legend
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.
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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".
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 |
Instructions - How to post in this forum |
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
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.
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Matt,
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.
That's not the latest version from our download section, it's Build 1.1.1937.15964.I have upgraded to the latest version of TeeChart. The Download section said this is 1.1.1879.21176 so I used that.
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Matt,
Yes, you are right. I confussed myself as the version I mentioned hasn't been released yet.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, this is a bug which I have already added to our defect list to be fixed for future releases.1. Legend problem as mentioned on the forum, I always seem to have a dotted
line around the 'IPD Performance' box.
Drawing a line using the code bellow works fine when scrolling.2. When I scroll backwards and forwards the vertical line labelled September
2004 redraws in a different place.
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);
}
This is a known bug which has already been fixed for the next release.3. The bar sizes are too narrow. This is despite setting the width to 99
percent : bar.BarWidthPercent = 99; // default = 70%
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
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
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
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Matt,
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.
Well, it's not much different , just use:
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 , 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);
}
I can't tell you an exact date but will be soon.3. With regards point 3 - the bar width issue, when is the next release due that fixes this problem?
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |