Export TeeChart to xaml Bug.

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
neurosoft
Newbie
Newbie
Posts: 35
Joined: Thu May 06, 2010 12:00 am

Export TeeChart to xaml Bug.

Post by neurosoft » Tue Jul 20, 2010 9:53 am

Hello.
I have problems with exporting of WPF TChart to Xaml.
So, I have created TeeChart instance by the following code:

Code: Select all

TChart tChart = new TChart();
tChart.Series.Add(new Bar());
Bar series = tChart[0] as Bar;
series.Brush.ForegroundColor = Colors.Black;
GeometryDrawing drawing = new GeometryDrawing(Brushes.Black, new Pen(Brushes.Black, 1), new LineGeometry(new Point (0, 10), new Point(10, 0)));
series.Brush.Drawing = drawing;
tChart.Aspect.View3D = false;
for (int i = 0; i < 10; i++)
{
    series.Add(i);
}            
series.ShowInLegend = false;
The result is represented by the picture:
TeeChartSource.jpg
TeeChartSource.jpg (19.02 KiB) Viewed 11346 times
And when I try to export this TeeChart to xaml, I recieve incorrect result (exported xaml in attachment
ExportedTeeChart.xaml.ZIP
(2.26 KiB) Downloaded 419 times
):
ExportedTeeChart.jpg
ExportedTeeChart.jpg (18.31 KiB) Viewed 11347 times
As you see, dashed lines are very thick and exported chart has no DrawingGeometry texture in Bar.

Thanks.

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

Re: Export TeeChart to xaml Bug.

Post by Sandra » Thu Jul 22, 2010 1:21 pm

retard Hello neurosoft,


Sorry for the delay, I can reproduce your problem and I communicate you that I have added bug in wish-list with number [TF02015043]. We will try to fix it for next maintenances releases of TeeChart.Net.


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

neurosoft
Newbie
Newbie
Posts: 35
Joined: Thu May 06, 2010 12:00 am

Re: Export TeeChart to xaml Bug.

Post by neurosoft » Thu Jul 22, 2010 1:40 pm

Sandra, thanks for reply. I'll wait for next release with the hope, that the bug is fixed.

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

Re: Export TeeChart to xaml Bug.

Post by Sandra » Mon Aug 02, 2010 8:43 am

Hello neurosoft,

I inform that bug with number (TF02015043) is not a bug, because HatchBrush does not exist in WPF/XAML. Moreover, I have added it in wish-list as a future request with number[TW16015062]to be implemented in future releases of TeeChartWPF.


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

neurosoft
Newbie
Newbie
Posts: 35
Joined: Thu May 06, 2010 12:00 am

Re: Export TeeChart to xaml Bug.

Post by neurosoft » Wed Aug 11, 2010 6:35 am

Hello Sandra!
1) Besides export of DrawingGeometry, I wrote about very thick dashed grid lines in exported xaml picture (vertical and horizontal lines). Please, pay attention to this remark.
2) I did't create HatchBrush for the Bar, because HatchBrush is not System.Windows.Media.Brush. In Windows Forms TChart I used property Style of the Steema.TeeChart.Drawing.Brush to set HatchStyle of the Bar. But in WPF version type Steema.TeeChart.WPF.Drawing.Brush has no Style property. For creating texture of the Bar I use property Drawing. And it works. But, as you see, I have problems with export TChart to xaml. So, if you consider, that is not a bug (that is wrong for my opinion), tell me how I can create Hatch in the Bar with the correct exporting.

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

Re: Export TeeChart to xaml Bug.

Post by Sandra » Thu Aug 12, 2010 9:11 am

Hello neurosoft,

2) I did't create HatchBrush for the Bar, because HatchBrush is not System.Windows.Media.Brush. In Windows Forms TChart I used property Style of the Steema.TeeChart.Drawing.Brush to set HatchStyle of the Bar. But in WPF version type Steema.TeeChart.WPF.Drawing.Brush has no Style property. For creating texture of the Bar I use property Drawing. And it works. But, as you see, I have problems with export TChart to xaml.
OK. Could you please, send us a simple project in WPF, because we can reproduce your exactly problem here?
So, if you consider, that is not a bug (that is wrong for my opinion), tell me how I can create Hatch in the Bar with the correct exporting
We don't consider it as a bug because TeeChart.WPF doesn't have HatchStyle property, so it's more a lack than a problem. We call this type of problems as "Feature Request" but, actually, wish or bug/defect lists are internally the same list. What changes is the category of the issue but most important for us is the priority we give to each issue and this is quite an important one.


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

neurosoft
Newbie
Newbie
Posts: 35
Joined: Thu May 06, 2010 12:00 am

Re: Export TeeChart to xaml Bug.

Post by neurosoft » Thu Aug 12, 2010 12:24 pm

Hello!
OK. Could you please, send us a simple project in WPF, because we can reproduce your exactly problem here?
Ok. I have created a simple WPF Application (
TChartExportTest.ZIP
(42.29 KiB) Downloaded 397 times
).
Please, add TeeChart.WPF.dll to the project references and run application. Then click "Export..." and choose the file for saving TeeChart. You will see that the exported TeeChart does not correspond to the original:
1) Dashed grid lines is very thick;
2) Background of the Bars became solid color, but in source TeeChart it was diagonal lines texture.
Is it normal behavior for the export? By the way, export to bitmap image works normally.
And I have not received the answer for the question about very thick dashed grid lines.

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

Re: Export TeeChart to xaml Bug.

Post by Sandra » Fri Aug 13, 2010 11:38 am

Hello neurosoft,

We haven forgotten you, we'll inform you asap.

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

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export TeeChart to xaml Bug.

Post by Yeray » Mon Aug 23, 2010 3:20 pm

Hello neurosoft,

Excuse us for the delay. I could reproduce also in WinForms so we will study the problem and try to found what's wrong or missing here.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

neurosoft
Newbie
Newbie
Posts: 35
Joined: Thu May 06, 2010 12:00 am

Re: Export TeeChart to xaml Bug.

Post by neurosoft » Tue Aug 24, 2010 5:24 am

Thanks, Yeray!
We'll hope, that you will solve this issue.

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export TeeChart to xaml Bug.

Post by Yeray » Mon Aug 30, 2010 9:26 am

Hi neurosoft,

As we thought initially, implementing the HatchBrush property in WPF, would allow this in WPF and in extension in XAML exports (or vice versa).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

neurosoft
Newbie
Newbie
Posts: 35
Joined: Thu May 06, 2010 12:00 am

Re: Export TeeChart to xaml Bug.

Post by neurosoft » Tue Aug 31, 2010 11:31 am

Hi Yeray!
I have created TChart, represented by the picture
TeeChartSource.jpg
TeeChartSource.jpg (19.02 KiB) Viewed 11081 times
with help of following code:

Code: Select all

TChart tChart = new TChart();
tChart.Series.Add(new Bar());
Bar series = tChart[0] as Bar;
series.Brush.ForegroundColor = Colors.Black;
GeometryDrawing drawing = new GeometryDrawing(Brushes.Black, new Pen(Brushes.Black, 1), new LineGeometry(new Point (0, 10), new Point(10, 0)));
series.Brush.Drawing = drawing;
tChart.Aspect.View3D = false;
for (int i = 0; i < 10; i++)
{
    series.Add(i);
}           
series.ShowInLegend = false;
Exporting to xaml of the Drawing property has no require the HatchBrush property. It is easy to present the GeometryDrawing from the code, described above, in xaml:

Code: Select all

    <GeometryDrawing Geometry="M 0,10 L 10,0 Z">
        <GeometryDrawing.Pen>
            <Pen Brush="Black" Thickness="1"/>
        </GeometryDrawing.Pen>
    </GeometryDrawing>
In other words, Steema.TeeChart.WPF.Drawing.ChartBrush has the Drawing property. Why this property is ignored by the exporting to xaml?
Now the Bar in the xaml (
ExportedTeeChart.xaml.ZIP
(2.26 KiB) Downloaded 431 times
) of the exported TChart is represented by the following code:

Code: Select all

<Rectangle Fill="#FF4466A3" Stroke="#FF293D62"
 Canvas.Left="..." Canvas.Top="..." Width="..." Height="..."/>
I think that it have to be represented by the another xaml:

Code: Select all

<Rectangle Fill="#FF4466A3" Stroke="#FF293D62"
 Canvas.Left="..." Canvas.Top="..." Width="..." Height="...">
    <Rectangle.Fill>
        <DrawingBrush TileMode="Tile" Viewport="0,0,10,10" ViewportUnits="Absolute">
           <DrawingBrush.Drawing>
               <GeometryDrawing Geometry="M 0,10 L 10,0 Z">
                   <GeometryDrawing.Pen>
                       <Pen Brush="Black" Thickness="1"/>
                  </GeometryDrawing.Pen>
               </GeometryDrawing>
           </DrawingBrush.Drawing>
        </DrawingBrush>
    </Rectangle.Fill>
</Rectangle>
So, the main question is how can I receive the correct xaml of a TChart with Drawing in the series Brush?

Yeray
Site Admin
Site Admin
Posts: 9612
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Export TeeChart to xaml Bug.

Post by Yeray » Thu Sep 02, 2010 9:57 am

Hi neurosoft,

We've implemented the HatchBrush property in WPF so the following will be possible with the next maintenance release:

Code: Select all

            tChart1.Aspect.View3D = false;

            Steema.TeeChart.WPF.Styles.Bar series = new Steema.TeeChart.WPF.Styles.Bar(tChart1.Chart);
            series.FillSampleValues(6);

            series.Brush.ForegroundColor = Colors.Black;
            series.Brush.Style = Steema.TeeChart.WPF.Drawing.HatchStyle.DarkUpwardDiagonal;
HatchStyle.png
HatchStyle.png (17.78 KiB) Viewed 11068 times
However, this still will not export to XAML. We are looking into getting this to export successfully to XAML.
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply