Jump to content

TunilineSeries.active:=false


SergioFeitoza

Recommended Posts

10 hours ago, SergioFeitoza said:

In VCL when I draw a  chart with many series and want that some of them do not appear I do , for example MyTinichartSeries.active:= false;  What is the equivalent property in TiniLineseries to do this ?  Visible ?

Hello,

Can you try this approach..?

procedure TMainForm.UniButton1Click(Sender: TObject); //use "OnClick", "OnReady" events...
begin
  with UniChart1 do
    JSInterface.JSCall('chart.getSeries()[0].setHidden', [True]); //False
end;

 

Link to comment
Share on other sites

Hi Sherzod: Thank you for the suggestion. It looks nice but something do not work here

First I tried to put inside the code (not in an event) like:

 

Var IG:integer:

Begin

for IG:= 7 to 10 do with DBchartTop    do JSInterface.JSCall('chart.getSeries()[IG].setHidden', [True]); //False

….

It compiles but when running it comes an ajax error (see Figure) saying that “ IG is not defined"  .  I tried also to replace the IG (integer) by IntToStr(IG)  but the same happens. 

Then I removed variable IG and did like this only to make  series 7 and 8 to not appear. Actually I am not putting values in these two series and they were created in degign time without values..

with DBchartTop    do JSInterface.JSCall('chart.getSeries()[7].setHidden', [True]); //False

with DBchartTop    do JSInterface.JSCall('chart.getSeries()[8].setHidden', [True]); //False

 

When I run I did not receive any error or message but the two series 7 and 8 (see the legend in the right side of the Figure) are there (in the legend).

 

In VCL when I put series7.avtive:= false it will not appear in the legend .  

Please comment

AjaxError.thumb.png.ccca15287670d12a41f4e435db22c3fe.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...