Series.Marks.OnTop property breaks SVG export

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
QPR
Newbie
Newbie
Posts: 1
Joined: Mon Sep 26, 2011 12:00 am

Series.Marks.OnTop property breaks SVG export

Post by QPR » Thu Aug 09, 2012 1:00 pm

Setting the Series.Marks.OnTop property to True results in incorreclty generated (actually corrupted) SVG export code for charts with marks: chart has incorrect position and two closing </g> tags are missing.
Replication:
1. Set Series.Marks.OnTop = True for some series of a chart with marks visible (I set it programmatically);
2. Call SVG export for the chart above (in my case programmatically genertated SVG code is saved to a file);
3. Open the resulting SVG in web browser - FireFox gives XML parse error and does not open SVG at all, IE9 displays the chart in incorrect position.
Note that adding two closing </g> tags to the end of this SVG code allows this SVG to be opened in FireFox but the position of the chart is still incorrect.
Not using Series.Marks.OnTop (meaning it is False) produces openable and correct SVG code.
I am using Steema TChart version 2012.05.

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

Re: Series.Marks.OnTop property breaks SVG export

Post by Yeray » Fri Aug 10, 2012 1:43 pm

Hi,

I've tried it with Delphi 7 and both TeeChart v2012.5 and the actual v2012.06 and the code below seems to give me a correct result.

Code: Select all

uses Series, TeeSVGCanvas;

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=0 to 5 do
    with Chart1.AddSeries(TBarSeries) do
    begin
      Add(i*10, 'Series' + IntToStr(i));
      Add(50-i*10, 'Series' + IntToStr(i));
      Marks.Visible:=true;
      Marks.OnTop:=true;
    end;

  Chart1.Axes.Bottom.LabelStyle:=talValue;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  TeeSaveToSVGFile(Chart1,'C:\tmp\Chart1.svg');
end;
Could you please give it a try and modify the code above if you find I've missed some important step?
Thanks in advance.
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