SergioFeitoza Posted December 4, 2019 Share Posted December 4, 2019 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 ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 5, 2019 Share Posted December 5, 2019 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; Quote Link to comment Share on other sites More sharing options...
SergioFeitoza Posted December 5, 2019 Author Share Posted December 5, 2019 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.