Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Clone Chart in C++

 Post Reply Post Reply
Author
Patterson Russell View Drop Down
New Member
New Member
Avatar

Joined: 11 Feb 2019
Posts: 11
Post Options Post Options   Quote Patterson Russell Quote  Post ReplyReply Direct Link To This Post Topic: Clone Chart in C++
    Posted: 01 Sep 2019 at 9:36pm
Hi,

I've been working in Rad Studio 10.3.2 (C++ Builder) with the TChart component.  It has flaked out enough that i'm now trying TMS FNC Chart hoping for more stability.  In my present approach i have a template chart that i clone when the user adds a chart to the display.  Below is how i do it with the TChart.  How can I do similar with the TMS FNC Chart?

TChart *C = new TChart(Form1);
C->Parent = Form1->Laytout1;
CloneChart(C, Form->ChartTemplate, Form1, false);

Alternatively, how can i create a new TMS FNC Chart at runtime and set its properties and add series etc.?

thank you,
russ
Back to Top
Patterson Russell View Drop Down
New Member
New Member
Avatar

Joined: 11 Feb 2019
Posts: 11
Post Options Post Options   Quote Patterson Russell Quote  Post ReplyReply Direct Link To This Post Posted: 02 Sep 2019 at 5:01am
To clarify - i'm just trying to figure out how to plot x-y data in a C++Builder FMX app.  I tried to follow along with the example starting bottom page 23 of http://www.tmssoftware.biz/Download/Manuals/TMSFNCChartDevGuide.pdf but I can't translate the Delphi code to C++.

Anyone able to convert the code below to C++ Builder to give me a jump start?

var   I: Integer;   s: TTMSFNCChartSerie;
 
begin   TMSFNCChart1.BeginUpdate;   TMSFNCChart1.Clear;   TMSFNCChart1.Series.Add; //adds ?Serie 0? by default   TMSFNCChart1.Series.Add; //adds ?Serie 1? by default
 
  s := TMSFNCChart1.SerieByName['Serie 0'];   for I := 0 to 7 do     s.AddPoint(Random(100));
 
  s := TMSFNCChart1.SerieByName['Serie 1'];   for I := 0 to 7 do     s.AddPoint(Random(100));
 
  TMSFNCChart1.EndUpdate; end;
 
var   I: Integer;   s: TTMSFNCChartSerie; begin   TMSFNCChart1.BeginUpdate;   TMSFNCChart1.Clear;   s := TMSFNCChart1.Series.Add;   s.LegendText := 'Mercedes';   TMSFNCChart1.EndUpdate; end;
 
var   s: TTMSFNCChartSerie; begin   s := TMSFNCChart1.SerieByName['Mercedes'];   for I := 0 to 7 do     s.AddPoint(Random(100)); end;
 
thanks,
russ
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3302
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 04 Sep 2019 at 8:45am
This question has been answered via email.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down